-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
New app crashes enabling Hermes on Android emulators with API <= 19 #25646
Comments
Similar Error when I update from react native 0.60 to 0.60.3
react native info
|
similar issue app builds successfully tries to load a module from the metro bundle but crashes on startup.
|
RN 0.60.4 with Hermes enabled
|
Any news on this? |
Guys, had the same issue, but after a while double-checked migration guide https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.60.5 and realized I've made a mistake in |
@denieler yes, after copying the code from 0.60.4/0.60.5 my app works again without any issues. Although.. it is complaining about Gradle 6 when i
Happens the same for you? |
@msqar no, this one is not happening for me if I'm not mistaken |
Android 4.4 Creating a fresh app with "react-native init" and enabling hermes in android/app/build.gradle:80 still results in this crash when running the debug variant. Running with "react-native run-android --variant=release" causes the "java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "posix_fallocate" referenced by "libhermes.so" crash. |
Hello. Have you tried using hermes-engine 0.1.1 ?
After adding that, you'll have to edit android/app/build.gradle with the following changes:
I personally don't have any Android 4.4 device for testing. However, a couple of days ago I submitted an app with RN 0.60.5 + Hermes, and the Google Play Pre-launch Report ran it in an Android 4.3 device with no problems whatever. Cheers! |
THANK YOU @jsaraiva ! |
@jsaraiva Does it not work on hermes-engine 0.2.1 which is the current latest? |
Personally, I haven't tested it yet (busy with other projects). But I see no reason why it shouldn't. Cheers! |
Yes.. So 0.2.1 got installed. But it did not work for me. Anyways thanks. |
Have you tried specifying the older version specifically? (in package.json, specifying Maybe the devs introduced some new bugs into the engine. It happens. |
This same error is happening to me on Android Devices running Android 10 (Pixel 4, for example).
When I check I am using Screenshot of folder of EDIT it seems this only works with |
Enabling Hermes in a new app created from scratch, the app crashes at startup on Android x86 emulators from API 16 to 19.
This is the logcat in case of a debug build:
07-14 17:03:50.673 2028-2068/? E/AndroidRuntime: FATAL EXCEPTION: create_react_context
java.lang.ExceptionInInitializerError
at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:949)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: Cannot load library: reloc_library[1306]: 1170 cannot locate 'sigemptyset'...
The Release variant shows different errors based on the emulator API level. For example:
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: Cannot load library: reloc_library[1306]: 1170 cannot locate 'sigemptyset'...
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "posix_fallocate" referenced by "libhermes.so"...
The app doesn't crash if API > 19.
React Native version:
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
Memory: 1.79 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.14.1 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
Android NDK: 20.0.5594570
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.3 => 0.60.3
npmGlobalPackages:
react-native-cli: 2.0.1
Steps To Reproduce
react-native init AwesomeProject
Describe what you expected to happen:
the app shouldn't crash.
Snack, code example, or link to a repository:
The text was updated successfully, but these errors were encountered: