Hermes enabled bundle causes white screen when installed from Google Play
See original GitHub issueCompiling a release with Hermes enabled causes a white screen after downloading from Google Play.
Literally everything else works fine, it only breaks after being uploaded to Google Play.
- Debug builds work.
./gradlew installRelease
works.- Even extracting the apks from the
.aab
using bundletool and installing them with adb on a device works.
I know that Hermes is running because global.HermesInternal != null
, not to mention it’s lightning fast 💨.
React Native version: 0.65.0 System: OS: macOS 10.14.6 CPU: (4) x64 Intel® Core™ i7-7660U CPU @ 2.50GHz Memory: 22.53 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 11.6.0 - /usr/local/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.8.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 Android SDK: API Levels: 23, 26, 27, 28, 29 Build Tools: 27.0.3, 28.0.3 System Images: android-26 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1
Steps To Reproduce
- Compile and package release build with Hermes enabled
- Upload it to Google Play (Alpha or Beta)
- Once the app is available download and install the version from Google Play
- Launch the app -> White Screen
Describe what you expected to happen:
I expect bundles compiled with Hermes enabled to behave the same after being uploaded to Google Play.
Snack, code example, screenshot, or link to a repository:
- My build.gradle
- Device logs from
adb logcat
when launching the Play Store version of the app: hermes-prod-logs.txt
Issue Analytics
- State:
- Created 4 years ago
- Reactions:123
- Comments:83 (14 by maintainers)
Hey 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 hope it works for you too 😃
This solution works with real devices but breaks react-native run-android on emulators, the app’s crashing after open with errors like this:
Fixed According to
master
branch of react-native https://github.com/facebook/react-native/blob/master/ReactAndroid/gradle.properties you need to change SoLoader version to 0.8.2