react-native: Hermes enabled bundle causes white screen when installed from Google Play
Compiling 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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 123
- Comments: 83 (16 by maintainers)
Commits related to this issue
- Bump SoLoader to 0.8.0 (#26759) Summary: This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play. Related to: https://github.com/facebook/react... — committed to facebook/react-native by deleted user 5 years ago
- Fix app bundle by https://github.com/facebook/react-native/issues/26400#issuecomment-539461003 — committed to iketiunn/H4x0rNews by iketiunn 5 years ago
- Fix app bundle by https://github.com/facebook/react-native/issues/26400#issuecomment-539461003 — committed to iketiunn/H4x0rNews by iketiunn 5 years ago
- Bump SoLoader to 0.8.0 (#26759) Summary: This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play. Related to: https://github.com/facebook/react... — committed to facebook/react-native by deleted user 5 years ago
- Fix android deployment https://github.com/facebook/react-native/issues/26400 — committed to lukas-krecan/NvcCards by lukas-krecan-lt 5 years ago
- Added the fix https://github.com/facebook/react-native/issues/26400 for the whitescreen on boot production version issue — committed to Theofilos-Chamalis/Find-Phone-Country by deleted user 4 years ago
- fix: force soLoader to version 0.8.2 This was the cause of the app crashing on the splash screen and is apparently a known issue with React Native v0.61.5: - https://stackoverflow.com/a/60077010/498... — committed to ianbayne/CoffeeRandomizer by ianbayne 4 years ago
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.2I’m on the 0.62.2 version and this bug has been fixed!
i’am facing this issue RN 0.61.5
Just tested with
react-native
0.61.1
. Still broken 😢@SnowLew App Still Crashes on Startup React native After installed from Play Store
“react-native”: “^0.63.3”,
I’m on 0.63.2 and this issue is still not fixed for me! Cannot run the Android App in Debug or Release with Hermes enabled or disabled on my Emulator!
Closing this issue as the original bug as described has been fixed.
I can also confirm that is fixed now without any workarounds.
@Alaa-Ben Was trying to solve this issue for past 2 days until I met your comment. Thank you very much!! I have found one problem though. Indeed bundleRelease now works in google playstore when I enable SoLoader(0.8.0), it is debug mode(i.e. just react-native run-android) that doesn’t work anymore. App crashes on start. So at the moment, I have to comment out
on android/app/build.gradle when I use debug mode to develop, and enable that part again for bundleReleases. Am I the only one with this issue??
Please upvote the first post, don’t post
+1
orsame issue
. You can subscribe to this issue on the right side.This bug has been fixed, you can see in 0.62 version.
SO_LOADER_VERSION: 0.8.0
https://github.com/facebook/react-native/blob/0.62-stable/ReactAndroid/gradle.properties
Facing the same issue @desmondmc. Recently upgraded my project from 0.57.8 to 0.60.5. Also enabled def enableSeparateBuildPerCPUArchitecture = true and def enableProguardInReleaseBuilds = true. Can you please write here if you find a solution
This still occurs with React Native and Hermes, can we re-open the issue?
I can confirm @Alaa-Ben solution fixed the blank screen issue when deployed to google play
This is very very scary since the the production build with
react-native run-android --variant=release
works totally fine, but internally it builds anapk
, while deploying to playstore it is in the form ofaab
which totally blanked out because of this issue. Many thanks again to @Alaa-Ben. Personally issue kind of reinforces how fragile is to use react native as I bump into these kind of weird things time and again.@desmondmc try uploading the apks instead of the app bundle. In my case, uploading the app bundle to the play store showed a white blank screen on start up. But, uploading all the apks generated(with def enableSeparateBuildPerCPUArchitecture = true) did the trick. Give it a try.
Using this, all work fine in React-Native 0.60.6.
still throwing this error
In addition to forcing the soloader version, I had to exclude
libjscexecutor.so
inapp/build.gradle
to get the app working. This does not seem to break anything else.Thanks, solve it with me, I was trying to find out these errors, I was able to find out when disabled Hermes. Then I searched and found this solution
The play store offers a ‘test store’ for internal tests. I recommend using it from time to time, specially when upgrading React Native versions.
same issue with @herio any test locally on debug or release is working. Only version returning the white screen is from the bundleRelease to play store
react-native: 0.60.4
I’m on react-native 0.63.4 and this is still happening for me when I have hermes enabled. Soon as the app opens up, flashes a white screen and closes. It happens when I do
gradlew assembleRelease
and install to an emulator, as well as an.aab
uploaded to the play store.Is there any way to tell which Hermes version you’re using?
A (terrible) workaround is to first run assembleRelease (so the js bundle is generated), and then run bundleRelease.
I don’t think this is related to Hermes though, since even when I disabled it I still have the same problem with bundling the app
Facing the same problem only when upload the bundleRelease to play store, assembleRelease is OK. “react-native”: “0.60.5”, “hermes-engine”: “0.1.1”,
Still the same issue with RN 0.62.1
We’ve been getting crash reports on our production app after upgrade to RN
0.61.5
. Happens only to a minority of users, and we’re unable to reproduce it on any of our test devices. We’ve released versions with hermes both disabled and enabled and we got the errorlibhermes.so could not be found
on all of these. Also tried forcing the SoLoader version at 0.8.0. Same issue. Is anyone else facing the same?What we’ve tried so far:
When we tried running a fresh RN app on an emulator, the app crashed immediately. It doesn’t seem to be the same issue, but could be related. https://github.com/facebook/react-native/issues/28308
This issue should be more visible I think. Quite some time of trying and googling until I found it. The provided solution worked for me.
For me this did not work, we’re using react-native-navigation. It works with .apk though so we switched back to that.
Confirm, this change on
app/build.gradle
file works fine with Hermes enabled and Android App Bundle:Can also confirm that @Alaa-Ben’s solution worked for me. Nice work 👍
This was done by testing in Google Play store. I use RNN and we switched back to APK to work around this issue. Are you using React Native Navigation too?
Seems to be only google play test devices that throw this error. No worries
This worked for me, thanks.
Just for other’s reference.
The previous issue was resolved. It was because of adding
apply ./react.gradle
to buid.gradle.Removing it and adding the entire path in the
react-native bundle
resolved it.@roots-ai
why do you set different JSC version when you use Hermes? You can either use JSC or Hermes.
@gamingumar I use the workaround I posted in this issue with 0.61.3 without any issues. I use CI to deploy the so the environment is always clean.
@Alaa-Ben feel free, this should look like this https://github.com/facebook/react-native/commit/07d1075f372bb864ddc62b9c8f613b03becfa568
I am getting the same issue, also only when I upload bundle to play store with Hermes enabled. assembleRelease works fine and all works fine with Hermes disabled. RN version 0.61.1