Android crashes when booting on 0.68.0-rc.2 when hermes enabled
See original GitHub issueDescription
When updating to the new version the app crashes on start. I have hermes enabled. I get the following log
2022-03-11 10:47:27.653 24788-24788/com.jurishand.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.jurishand.app, PID: 24788
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found result: 0
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
at com.facebook.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:20)
at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:351)
at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:318)
at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95)
at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
at com.jurishand.app.MainApplication.onCreate(MainApplication.java:71)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
at java.lang.Runtime.load0(Runtime.java:938)
at java.lang.System.load(System.java:1631)
at com.facebook.soloader.SoLoader$1.load(SoLoader.java:529)
at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:110)
at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:63)
at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:91)
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1038)
I tried a solution that worked and the app works correctly
in android/build.gradle
add
maven {
url("$rootDir/../node_modules/jsc-android/dist")
}
in android/app/build.gradle
add
if (useIntlJsc) {
implementation 'org.webkit:android-jsc-intl:+'
} else {
implementation 'org.webkit:android-jsc:+'
}
however the const isHermes = () => !!global.HermesInternal;
returns false
Version
0.68.0-rc.2
Output of npx react-native info
System: OS: Windows 10 10.0.22000 CPU: (8) x64 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz Memory: 1.89 GB / 15.73 GB Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 23, 28, 29, 30, 31 Build Tools: 28.0.2, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0 System Images: android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8092744 Visual Studio: Not Found Languages: Java: 11.0.12 npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.0-rc.2 => 0.68.0-rc.2 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Update RN from 0.66.4 to 0.68.0-rc.2
Snack, code example, screenshot, or link to a repository
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
@cortinico I found the problem
This code snippet was at the top of my file
Doing this on my
android/app/build.gradle
resolves my problemI will do more tests and compare the two versions