react-native
react-native copied to clipboard
SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: cannot locate symbol "__cxa_bad_typeid" referenced by "/data/app/~~-
SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: cannot locate symbol "__cxa_bad_typeid" referenced by "/data/app/~~-tssjuhBNHEMKV9KwrA5fg==/com.china.aaa--TCK2Gc61UUuMXfZU1QIsA==/lib/arm/libjsc.so"... result: 0 2021-02-19 09:46:55.114 7817-7817/com.china.aaa E/AndroidRuntime: FATAL EXCEPTION: main Process: com.china.aaa, PID: 7817 java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: cannot locate symbol "__cxa_bad_typeid" referenced by "/data/app/~~-tssjuhBNHEMKV9KwrA5fg==/com.china.aaa--TCK2Gc61UUuMXfZU1QIsA==/lib/arm/libjsc.so"... result: 0 at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:896) at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:725) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:649) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:629) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577) at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:297) at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:270) at com.jiehun.main.MyReactActivity.onCreate(MyReactActivity.java:40) at android.app.Activity.performCreate(Activity.java:8093) at android.app.Activity.performCreate(Activity.java:8067)
Can you please Run react-native info
in your terminal and copy the results here .
Can you provide your MyReactActivity.java
please or a minimal complete reproducible code sample .
at com.jiehun.main.MyReactActivity.onCreate(MyReactActivity.java:40)
Just set the enableHermes property to true I wonder what the reason is Here is my configuration
project.ext.react = [ enableHermes: true ] def enableHermes = project.ext.react.get("enableHermes", false); dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "com.alibaba:fastjson:1.1.72.android"
if (enableHermes) {
def hermesPath = "../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation "org.webkit:android-jsc:+"
}
}
+1
+1
So I was able to fix this by copying the build.gradle(s) from a fresh React Native project and then adding some of my dependancies back line by line. Not sure what was causing it, but doing that fixed it
Might be good to update the title of the issue and add "Hermes enabled: ....", because according to the config
enableHermes: true
And according to gradle config jsc shouldn;t be used at all, isn't it? So why app tries to use it?
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.
i noticed SOLoader was not finding Hermes even though i never explicitly set it in my build.gradle
enabling hermes explicitly fixed it.
https://stackoverflow.com/a/63155094/4985391 fixed it for me
https://stackoverflow.com/a/63155094/4985391 fixed it for me
I cant see the answer, can you re-up link?
https://stackoverflow.com/a/63155094/4985391 fixed it for me
I cant see the answer, can you re-up link?
https://stackoverflow.com/questions/56524006/e-soloader-couldnt-find-dso-to-load-libjscexecutor-so/63155094#63155094
https://stackoverflow.com/a/63155094/4985391 fixed it for me
I cant see the answer, can you re-up link?
https://stackoverflow.com/questions/56524006/e-soloader-couldnt-find-dso-to-load-libjscexecutor-so/63155094#63155094
@tungnc3142
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+.
Run ./gradlew clean then build again