react-native
react-native copied to clipboard
Android App Crash: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
Description
W/SoLoader: libjscexecutor.so not found on DirectAPKSoSource: 4
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__cxa_bad_typeid" referenced by "/data/app/~~PKlY1zxnY1I_9g3kewPBDA==/com.my.app-oPmcKhUyEBL8mkHRwrWxJA==/base.apk!/lib/arm64-v8a/libjsc.so"...
at java.lang.Runtime.load0(Runtime.java:939)
at java.lang.System.load(System.java:1628)
at com.facebook.soloader.SoLoader$1.load(SoLoader.java:529)
at com.facebook.soloader.DirectApkSoSource.loadLibrary(DirectApkSoSource.java:77)
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1038)
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.JSCExecutorFactory.create(JSCExecutorFactory.java:29)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1112)
at java.lang.Thread.run(Thread.java:923)
D/SoLoader: libjscexecutor.so not found on /system/lib64
D/SoLoader: libjscexecutor.so not found on /vendor/lib64
E/SoLoader: couldn't find DSO to load: libjscexecutor.so
SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~PKlY1zxnY1I_9g3kewPBDA==/com.my.app-oPmcKhUyEBL8mkHRwrWxJA==/lib/arm64 flags = 0]
SoSource 1: com.facebook.soloader.DirectApkSoSource[root = /data/app/~~PKlY1zxnY1I_9g3kewPBDA==/com.my.app-oPmcKhUyEBL8mkHRwrWxJA==/base.apk!/lib/arm64-v8a]
SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
Native lib dir: /data/app/~~PKlY1zxnY1I_9g3kewPBDA==/com.my.app-oPmcKhUyEBL8mkHRwrWxJA==/lib/arm64
result: 0
E/AndroidRuntime: FATAL EXCEPTION: create_react_context
Process: com.my.app, PID: 17137
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~PKlY1zxnY1I_9g3kewPBDA==/com.my.app-oPmcKhUyEBL8mkHRwrWxJA==/lib/arm64 flags = 0]
SoSource 1: com.facebook.soloader.DirectApkSoSource[root = /data/app/~~PKlY1zxnY1I_9g3kewPBDA==/com.my.app-oPmcKhUyEBL8mkHRwrWxJA==/base.apk!/lib/arm64-v8a]
SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
Native lib dir: /data/app/~~PKlY1zxnY1I_9g3kewPBDA==/com.my.app-oPmcKhUyEBL8mkHRwrWxJA==/lib/arm64
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.JSCExecutorFactory.create(JSCExecutorFactory.java:29)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1112)
at java.lang.Thread.run(Thread.java:923)
Version
tried multiple versions (0.69 / 0.68.2 / 0.62 / 0.59.8 / 0.58.5)
Output of npx react-native info
info Fetching system and libraries information... System: OS: macOS 12.4 CPU: (8) arm64 Apple M1 Memory: 100.92 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.3.0 - /opt/homebrew/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.11.0 - /opt/homebrew/bin/npm Watchman: Not Found Managers: CocoaPods: Not Found SDKs: iOS SDK: Not Found Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: /undefined - /usr/bin/xcodebuild Languages: Java: 18.0.1.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found info React Native v0.69.0 is now available (your project is running on v0.68.2). info Changelog: https://github.com/facebook/react-native/releases/tag/v0.69.0. info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.68.2. info To upgrade, run "react-native upgrade". npm notice npm notice New minor version of npm available! 8.11.0 -> 8.13.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.13.1 npm notice Run npm install -g [email protected] to update! npm notice
Steps to reproduce
it crashes during initialization, can reproduce the crash every time
Snack, code example, screenshot, or link to a repository
it crashes from the Jitsi Android SDK, jitsi SDK github repo: https://github.com/jitsi/jitsi-meet
Is it a regression of this one https://github.com/facebook/react-native/issues/25537 ? It might also be related to https://github.com/facebook/react-native/issues/34143
facing same issue.
. ?
any solution on this, facing same problem in 0.69.
facing same issue. RN version (0.68.0)
Same issue in RN 0.7.20. In this version Hermes is mandatory.
Is react native actively maintained now? Seems like the latest versions have many breaking issues that are unaddressed
same here with rn 0.70.3
Same issue in RN 0.7.20. In this version Hermes is mandatory.
Nope Hermes is never mandatory. Is enabled by default. You can still opt-out if you need.
same here with rn 0.70.3
Just a heads-up that the error couldn't find DSO to load: libjscexecutor.so
could actually be caused by a variety of different reasons.
In React Native 0.71.0 we improved the way how the JS engine native library is loaded, which should hopefully fix this issue as well as others.
same here with 0.70.4.... again....
i fix this. you can override getJavaScriptExecutorFactory in your ReactNativeHost if you use hermes,force JSExecutorFactory use hermesExecutorFactory
import com.facebook.hermes.reactexecutor.HermesExecutor;
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
...
// inside your ReactNativeHost
override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory? {
HermesExecutor.loadLibrary()
return HermesExecutorFactory()
}
this helped me, but I think you meant this?
import com.facebook.hermes.reactexecutor.HermesExecutor;
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
...
// inside ReactNativeHost
@Override
protected JavaScriptExecutorFactory getJavaScriptExecutorFactory() {
HermesExecutor.loadLibrary();
return new HermesExecutorFactory();
}
I am barely a java novice, but this did get rid of this error for me. thank you.
yes,your complement is right :D
same problem on 0.67
This and all the "couldn't find DSO to load" bugs have been fixed in React Native 0.71.
The issue on previous versions was a "too aggressive" clean-up logic in the react.gradle
file. In 0.71 the clean-up logic has been rewritten to be more Android friendly and is now living inside the React Native Gradle Plugin.
I'm closing this, please update to 0.71 and open a new issue if the "couldn't find DSO to load" crash is still happening on 0.71+.
This and all the "couldn't find DSO to load" bugs have been fixed in React Native 0.71.
The issue on previous versions was a "too aggressive" clean-up logic in the
react.gradle
file. In 0.71 the clean-up logic has been rewritten to be more Android friendly and is now living inside the React Native Gradle Plugin.I'm closing this, please update to 0.71 and open a new issue if the "couldn't find DSO to load" crash is still happening on 0.71+.
@cortinico can you please share the procedure to follow for updating to 0.71 if we are using our own fork of react-native. The approach taken uptil 0.69 is no longer working and we are not getting our own artefact by changing path of react-native in package.json
Run ./gradlew clean then build again
Is there a solution for this besides upgrading React Native? Upgrading is generally a massive undertaking and not something that can be done on a whim, not to mention it will likely break dependencies... On RN 0.69.
Is there a solution for this besides upgrading React Native? Upgrading is generally a massive undertaking and not something that can be done on a whim, not to mention it will likely break dependencies... On RN 0.69.
Upgrade is pretty easy with https://react-native-community.github.io/upgrade-helper/
I do it often with no problem
Is there a solution for this besides upgrading React Native? Upgrading is generally a massive undertaking and not something that can be done on a whim, not to mention it will likely break dependencies... On RN 0.69.
Upgrade is pretty easy with https://react-native-community.github.io/upgrade-helper/
I do it often with no problem
Thank you, I'll give this a shot. In the meantime, disabling Hermes fixed the issue.