-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CRASH] Android 6.0.1 crashes with java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so #78
Comments
Thanks for the more detailed report! A few other people have reported similar issues in facebook/react-native#25601 and running |
Our build pipeline does fresh checkouts removing all gradle caches programmatically and running gradle in a non-daemon mode.
Shouldn't that be sufficient and not require us to run a |
I don't really know a lot about fastlane and how it interacts with gradle, so I'm not knowledgeable enough to answer that. Perhaps someone else is, but you might be better off opening a react-native issue, since this seems more likely to be an issue with the react native build files than the hermes build files, and there are more people paying attention to these kinds of issues over there. That said, the error you're seeing implies that the apk doesn't have a libhermes.so or a libjsc.so in it. Can you look at your apk, and see if either is there? If you're building without hermes, then libjsc.so should be in the apk, and if it's not, then that's the problem you'll need to understand and fix. |
Thanks @mhorowitz for the hint. I did look into the app bundle and extracted the apk for the device type. It contains the |
the relevant bit of code is here: https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java#L288-L296 React Native tries to load JSC, and if it's not present, it tries to load Hermes. If the latter fails, you get the exception you're seeing. Since you're building for JSC, the latter error is expected, but the first error is not. From your screen shot, libjscexecutor.so seems to be present, but the code is swallowing the error loading JSC, which is what would tell us what's wrong. I've asked someone here to improve the error reporting. In the interim, you could hack this code to comment out the try/catch. This will break enableHermes in the gradle files, but it should illuminate the problem. One hypothesis is that the failing devices are not arm32, and the libraries for that platform are different. I it makes sense to open an RN issue. I'm not sure what the problem is, but I suspect the fix will need to be in the react-native repo. You're right that those hermes .so files should be excluded, but that's a separate problem. |
Is this related to this issue I am having with Hermes not working with (.abb) bundle releases? |
Not sure if it's relevant to you guys, but I ran into a somewhat similar issue where jsc wasn't being loaded. This comment might help: facebook/react-native#25986 (comment) |
I am using firebase to track the crashes and a few of my users with following Android version are having crashes: Android 4.2.2
I am using RN 0.60.5 and split APKs. |
+1 |
I'm seeing this crash in production with RN 0.61.2, using android bundles with hermes disabled. |
Something wrong with SoLoader.loadLibrary("jscexecutor");
The crash is here facebook/react-native#25923 (comment) I'm still trying to find the solution. -!!! |
@woshi82 Did you look into my comment into the other issue? facebook/react-native#25986 (comment) |
YES,but not work. |
Hi guys, I am receiving crashes and mostly from a user with android |
Any news on this???. Crashes all over android 6.0 devices |
Would be very nice to have a fix on that, I resorted to using APK instead of AAB, but now the app is 3x bigger. |
I did a review of the issue using crashlytics. The problem seems to be on the emulator/dev devices. In my case, 100% of the events were tagged as a Nexus device using Andriod 6.0 (At this time, I was using the simulator). Hope it helps |
As observed above, this error will happen when JSC can't load, and Hermes is not enabled. I have landed a change in facebook/react-native@65d3167 to clarify the warning. I'll try to get this picked into RN 0.62, but for now I'm going to close this issue, in favor of reports based on the new code which will help us diagnose this better. |
has same issue on android 4 when hermes is disabled |
@Desintegrator minSdkVersion for react-native is 21 now, I doubt Android 4.x issues will see any attention at all. |
@mikehardy is there any official announcement about that? RN repo says it supports sdk 16 or newer. |
@Desintegrator See facebook/react-native@a17ff44 - it's happening in 0.64 |
There is a PR related to the error The PR does not fix the real issue, but it fixes the error handling. Like many have said, the error about |
Make pipeline compliant
I uploaded a release build to Google Play and they ran automated tests leading to a lot of crashes coming in with the following stack trace:
Affected OS is always 6.0.1. Interestingly Hermes is not even enabled in my build.gradle:
Setup:
The text was updated successfully, but these errors were encountered: