-
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
Hermes does not work when extracting apk from android app bundles (.abb) #25927
Comments
Yup, can confirm, just happened to me as well. |
same issue here |
Same issue 👍 |
Also happens to me |
Same issue :( |
Same here, Apks are working but not the Bundles |
I'm fairly sure this is a bug in SoLoader: facebook/SoLoader#43 |
It also happens to me |
Same issue |
Same issue here |
Same issue 😬 |
Same thing happened to me. Specifically, a call to In my case, Then just to test, I explicitly removed the android {
packagingOptions{
exclude '**/libjscexecutor.so'
}
} This solved the problem Of course this is not a real fix to the problem as |
@gabrielhuff You're on to something there. I've been testing modifying the last bit of the Here's what I have so far: def isRelease = targetName.toLowerCase().contains("release")
def libDir = "$buildDir/intermediates/merged_native_libs/"
def vmSelectionAction = {
fileTree(libDir).matching {
if (enableHermes) {
// For Hermes, delete all the libjsc* files
include "**/libjsc*.so"
if (isRelease) {
// Reduce size by deleting the debugger/inspector
include '**/libhermes-inspector.so'
include '**/libhermes-executor-debug.so'
} else {
// Release libs take precedence and must be removed
// to allow debugging
include '**/libhermes-executor-release.so'
}
} else {
// For JSC, delete all the libhermes* files
include "**/libhermes*.so"
}
}.visit { details ->
def targetVariant = ".*/merged_native_libs/${targetPath}/.*"
def path = details.file.getAbsolutePath().replace(File.separatorChar, '/' as char)
if (path.matches(targetVariant) && details.file.isFile()) {
details.file.delete()
}
}
}
def mergeNativeLibs = tasks.findByName("merge${targetName}NativeLibs")
if (mergeNativeLibs != null) {
mergeNativeLibs.doLast(vmSelectionAction)
} I've only tested when using app bundles & gradle plugin 3.5.0 so far. When using app bundles the intermediates directory changes from |
Agreed I think you both are onto something. I inspected a release APK vs. an APK generated from an android app bundle and noticed the app bundle is adding in the following libraries:
None of those should be there and when building an APK they are not present. |
When can this issue will addressed. im actually waiting for this ;) |
Adding the following packaging options to your app gradle file causes APKs generated from AABs to have the same set of .so libraries as old fashioned APKs.
So far our app seems happy with that change. (Updated on 10/1/2019 to only apply the packaging options when building an app bundle) |
@smacgregor your solution is not working, i think we need to see other options. |
@ursnj - you got an error in a release build complaining libjscexecutor.so?
after excluding libjscexecutor.so in your gradle file? That sounds like the gradle command didn't properly run or is not in the right spot if the .so is still present in your APK. |
@smacgregor worked for me 👍 Edit: take that back. This worked when I built the release aab locally using fastlane, but failed after releasing to the beta store and installing from there. No idea what would be different. |
@vanydeasy does this work when uploading the bundle to Google Play? |
@vanydeasy I'm curious too |
This comment has been minimized.
This comment has been minimized.
"couldn't find DSO to load: libhermes.so " |
Still launching to only white screen when downloading from google play. |
gabrielhuff's solution worked for me, now app-bundle works both for local and play store delivering. But the thing that worries me the much is that i don't know what does it actually effect. Can anyone explain the side effects of this solution or offer a better one? react-native: 0.61.2 |
@radko93 @heyman333 yes, I have published it to Google Play and it works fine. You should still try to bundle and test it first on your local tho. Just make sure that no |
@kirillpisarev @TylerNRobertson please test this #26400 (comment) and let me know so I can try and make a PR. |
@radko93 works fine at least for local delivering via bundletool, i can't check via Google Play for now. |
Summary: This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play. Related to: #25927 #26400 ## Changelog [Android] [Changed] - Bump Soloader to 0.8.0 Pull Request resolved: #26759 Test Plan: A few CI tests fail, but I don't see the link with what I changed, especially the ios tests. It's working locally though, and for people on github who tried this solution as well. Differential Revision: D17828891 Pulled By: mdvacca fbshipit-source-id: 1c7809aa681b41b8ed9a4da96d041d52f3cfbb76
Summary: This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play. Related to: #25927 #26400 ## Changelog [Android] [Changed] - Bump Soloader to 0.8.0 Pull Request resolved: #26759 Test Plan: A few CI tests fail, but I don't see the link with what I changed, especially the ios tests. It's working locally though, and for people on github who tried this solution as well. Differential Revision: D17828891 Pulled By: mdvacca fbshipit-source-id: 1c7809aa681b41b8ed9a4da96d041d52f3cfbb76
same issue here |
Running ./gradlew bundleRelease is giving many similar kind of errors with different variables
Eventhough an app.abb is being created app crashes while running. |
@AndrewJack do you have further information regarding @gabrielhuff "fix"? |
Is there any lead to this issue ??? |
@Maskedman99 @Rapsssito did you try #26400 (comment)? |
It worked! Looking forward to seeing it released! |
@radko93 I tried #26400 its not working for me still getting the same errors and the abb crashes.
|
To fix : Setup your app to Multidex: multidexVersion = "2.0.1" implementation "androidx.multidex:multidex:${rootProject.ext.multidexVersion}"
And change pickFirst to this
|
Summary: This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play. Related to: facebook/react-native#25927 #26400 ## Changelog [Android] [Changed] - Bump Soloader to 0.8.0 Pull Request resolved: facebook/react-native#26759 Test Plan: A few CI tests fail, but I don't see the link with what I changed, especially the ios tests. It's working locally though, and for people on github who tried this solution as well. Differential Revision: D17828891 Pulled By: mdvacca fbshipit-source-id: 1c7809aa681b41b8ed9a4da96d041d52f3cfbb76
Changing the androidBuildToolVersion fix it for me. Initially, I was using 3.5.2 the build was completing but the app was getting stuck on the splash screen. So I've changed the build tool version to 3.4.2 now everything seems fine Atleast true for me. You guys can try it once and see if it works for you. |
I was having the exact same issue on 0.61.5 and #26400 (comment) solved it for me, as @radko93 suggested |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Enabling Hermes on android builds configured to extract apk from app bundles (.abb) will freeze on app start.
React Native version:
System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Memory: 6.54 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.17.0 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/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
Build Tools: 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-22 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: ^0.60.4 => 0.60.4
npmGlobalPackages:
create-react-native-module: 0.5.0
create-react-native-web-app: 0.1.11
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Steps To Reproduce
Describe what you expected to happen:
Extracted apks should work
Snack, code example, screenshot, or link to a repository:
The text was updated successfully, but these errors were encountered: