react-native icon indicating copy to clipboard operation
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/~~-

Open KwunYamShan opened this issue 3 years ago • 12 comments

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)

KwunYamShan avatar Feb 21 '21 11:02 KwunYamShan

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)

hamdikahloun avatar Feb 21 '21 12:02 hamdikahloun

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:+"
}

}

KwunYamShan avatar Feb 23 '21 03:02 KwunYamShan

+1

lukebrandonfarrell avatar Apr 02 '21 15:04 lukebrandonfarrell

+1

yangga avatar Apr 06 '21 00:04 yangga

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

lukebrandonfarrell avatar Apr 06 '21 09:04 lukebrandonfarrell

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?

rumax avatar Sep 13 '21 14:09 rumax

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.

stale[bot] avatar Jan 09 '22 11:01 stale[bot]

i noticed SOLoader was not finding Hermes even though i never explicitly set it in my build.gradle

enabling hermes explicitly fixed it.

krisbaum74 avatar Jan 19 '22 20:01 krisbaum74

https://stackoverflow.com/a/63155094/4985391 fixed it for me

akinlekan28 avatar Mar 29 '22 16:03 akinlekan28

https://stackoverflow.com/a/63155094/4985391 fixed it for me

I cant see the answer, can you re-up link?

tungnc3142 avatar Jun 13 '22 03:06 tungnc3142

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

jliukai avatar Nov 07 '22 22:11 jliukai

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

akinlekan28 avatar Nov 07 '22 22:11 akinlekan28