react-native: React Native (0.60.4) Android app crashes after splash screen when Hermes is enabled
I have upgraded my RN app from 0.59.9 to 0.60.4 manually with the help of the guide (https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.60.4). The app works normally without a problem when Hermes is not enabled. However, once Hermes is enabled by following the steps in documentation (https://facebook.github.io/react-native/docs/hermes#docsNav), the app crashes after splash screen (splash screen can show normally, but crashes when trying to show the home (main) screen).
Below is the error in my Logcat that I believe leads to this error:
2019-07-19 12:13:01.341 30913-30950/? A/libc: /Users/willholen/intern/hermes/include/hermes/VM/HandleRootOwner.h:413: hermes::vm::PinnedHermesValue *hermes::vm::GCScope::newHandle(hermes::vm::HermesValue): assertion "getHandleCountDbg() < handlesLimit_ && "Too many handles allocated in GCScope"" failed
2019-07-19 12:13:01.342 30913-30950/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 30950 (mqt_js)
React Native version:
System: OS: macOS 10.14.5 CPU: (8) x64 Intel® Core™ i5-8259U CPU @ 2.30GHz Memory: 2.80 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 11.13.0 - ~/.nvm/versions/node/v11.13.0/bin/node Yarn: 1.16.0 - /usr/local/bin/yarn npm: 6.7.0 - ~/.nvm/versions/node/v11.13.0/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: API Levels: 25, 26, 27, 28, 29 Build Tools: 28.0.3, 29.0.0, 29.0.1 System Images: android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.4 AI-183.6156.11.34.5522156 Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.4 => 0.60.4 npmGlobalPackages: react-native-cli: 2.0.1
Steps To Reproduce
- Upgrade the RN app manually from 0.59.9 to 0.60.4 by following React Native upgrade guide (https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.60.4)
- The Android app has been tested to make sure it runs normally (Hermes not enabled here).
- Update android/app/build.gradle as instructed in Documentation (https://facebook.github.io/react-native/docs/hermes#docsNav) to use Hermes.
- Run the Android app again after gradlew clean (as suggested in documentation above). I am using Android Emulator (Nexus 5X, API 26).
- Splash screen shows normally, but then the app crashes immediately after it tries to show the home (main) screen.
Describe what you expected to happen: The Android app to work normally as if Hermes isn’t enabled.
Changes made to android/app/build.gradle:
project.ext.react = [ entryFile: “index.js”, bundleCommand: “ram-bundle”, enableHermes: true, // clean and rebuild if changing ]
def enableHermes = project.ext.react.get(“enableHermes”, true);
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 43 (1 by maintainers)
Downgrading React Native works for me.
do cd android && ./gradlew clean && cd … and build again : )
The painful upgrade process to 0.60 must be the worst one so far. Fetch stops working, splash screens are not compatible with Hermes. These are not exotic edge cases, this are very common scenarios. The premature issue closing doesn’t help either.
Please disable
ram-bundle
when using Hermes. They are currently not compatible but also when you are using Hermes with bytecode and inline requires the RAM bundling optimizations should not be necessary any longer 😃@cpojer But I did not include the rum-bundle and inline-require. And I still have a problem. Why you close issue ?
Same here but it just hangs without a crash on
0.60.5
with Hermes enabled, this only happens when using./gradlew bundleRelease
and not when using./gradlew assembleRelease
+ 1
Still unclear why @cpojer closed this, as this is clearly not solved.
I just did a 0.57.4 to 0.59.10 on another project. Completely painless, done in 10 minutes. Definitely holding off on 0.60 until the dust settles on the major blockers.
still not working even hermes is not enabled
@cpojer Please re-open this issue ASAP.
@cpojer After I have removed the usage of ram-bundle and inline-require in my project (also updated metro’s config to match this), I still encounter the same problem. I think this issue should still be open.
hello,every one. i am facing the same problem,and i do the follow to fix it.
Same here, after upgrade from 0.59.2 to 0.60.3, the app is installed as expected. When launched, splash appears and crash without error. Tested on API 28 and API 29
Hello guys !
For me, it turned out it was a problem of SoLoader, which was fixed in 0.8.0. React Native 0.61.1 doesn’t use this version yet, so the solution was to set it up manually by adding the following to
app/build.gradle:
I suspect this problem happens with FlatList components. Now that I have everything set up, I can use Hermes in my app. However, once I enter any pages with a FlatList component, the app crashes again and the same error shows:
It’s incomprehensible to me that this is still a problem in RN 0.60.4
I’m having anrs all over the place with hermes, not just with onesignal. Why would they release 0.60.4 without testing it. I’m glad I halted the rollout before I nuked all my users. I’m pretty sure this is the last straw for me with RN after the signal 11 disaster in May. I’m going to just build in a web view from now on.
"couldn’t find DSO to load: libhermes.so " React Native Version: 0.61.2 enableHermes: false Still facing this issue.
@rezaarifian Yes, there is significant increase in app size due to hermes but if you are looking for playstore submission you can use “app.aab” file which is lesser than the size of “app.apk”
@rezaarifian Are you using
react-native-firebase
?Should we reopen this issue in another thread since there is no response from @cpojer?
Literally upgraded from 0.59.8 to 0.60.4 to use ram-bundles WITH Hermes, to now have this issue closed. 😄
Not workin release build, RN 0.60.4, hermess enabled, error:
******** - for security, I hid my keys, but the problem is the same. Drop on the splash screen.