Closed coolguy001tv closed 2 years ago
There has been another report of this happening: https://github.com/facebook/react-native/issues/32927
I've investigated locally and I can confirm that if you generate a fresh project like so npx react-native init rn67
and do an android release build, that will insta-crash with the error reported about libjscexecutor.so
.
We'll look closer into that.
The good news is that I've also noticed that by turning on Hermes the issue disappears (which is probably why we didn't catch it 😢) and the app builds successfully also in production mode:
So for now I recommend you turn on Hermes on Android to address this - bear in mind that Hermes is planned to become the  default engine for React Native.
cc @cortinico & @LZHD
cc @cortinico & @LZHD
Yup that's definitely a regression, and we probably want to call a point release for this hotfix (which is forthcoming).
U may see the conversation below this commit: if i comment the 3 lines, i find the android release won't crash, but as @cortinico said, libjscexecutor.so shouldn't be in release.
Thanks for the issue report @coolguy001tv. I was actually wrong as both libjsc
and libjscexecutor
are both needed for Debug and Release. We were under the wrong assumption that libjscexecutor
contained only debug symbols but that's not the case.
Sadly this slipped through the release testing process as we mostly focus our testing on Hermes rather than JSC.
Also as a workaround while we work on a point release, you can still use this in your app/build.gradle
to avoid the instacrash:
project.ext.react = [
enableHermes: false,
+ deleteDebugFilesForVariant: { false }
]
It works fine, thank you very much
Thanks for so quick replies.
Upgrading to 0.67.1 or add deleteDebugFilesForVariant: { false }
are both ok for me.
enableHermes: true
is also ok in a brand-new rn project. But i met some TypeError: undefined is not a function, js engine: hermes
problems in my old project. It shouldn't be discussed here so I'll look deeper. If it still bothers me, I should open another issue.
Im getting this error even when I enable hermes
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
Getting this error
So, I'm getting this error too. =/ I have created a fresh project with version 0.67.4, but when I run in release mode, the app crashes with this error:
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
Firebase Crashlytics just reported this error to me, this is happening in production, seems already 2 users experienced this:
Here's the stack trace
Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.myapp/lib-main flags = 1]
SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~mZYDiDBOpKEAJvJTZGzklw==/com.myapp-5zgc0VZZbzZ6MpBkomzrew==/lib/arm64 flags = 0]
SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
Native lib dir: /data/app/~~mZYDiDBOpKEAJvJTZGzklw==/com.myapp-5zgc0VZZbzZ6MpBkomzrew==/lib/arm64
result: 0
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:918)
at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:740)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:654)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:634)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:582)
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()
at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:352)
at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:319)
at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95)
at expo.modules.ReactNativeHostWrapper.createReactInstanceManager(ReactNativeHostWrapper.kt:33)
at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
at com.myapp.MainApplication.onCreate(MainApplication.java:63)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7507)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7446)
at android.app.ActivityThread.access$1400(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2148)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8512)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1139)
Device: Brand:samsung Model:Galaxy A21s Orientation: Portrait RAM free: 2.41 GB Disk free: 43 GB
Operating system Version:Android 11 Orientation: Portrait Rooted:No
Crash Date:29 Mar 2022, 22:13:08 App version:0.1.3 (18)
@nriccar I get it on react-native 0.69 with hermes activated on release build. Debug build works fine. This should be re-opened.
the issue has not been resolved yet, please reopen the ticket
So, I'm getting this error too. =/ I have created a fresh project with version 0.67.4, but when I run in release mode, the app crashes with this error:
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
Same for me, please reopen this issue
@nriccar I get it on react-native 0.69 with hermes activated on release build. Debug build works fine. This should be re-opened.
Hello, if you are experiencing this issue in react-native 0.69+ You can refer to this comment in another thread https://github.com/facebook/react-native/issues/25537#issuecomment-1182498993
Hope it helps!
Did you guy solve the issue on RN 0.68.2. I'm facing the same issue when trying to use Dexguard(with either Hermes enable or not). Even when the libjscexecutor.so is found but still causing the running time error.
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
Any helps please? Really appreciate that. Thanks
The issue still persists
Still getting the issue for 0.67.1, it happens only when I update my app with an in-app update, and after a successful update app crash with the below error, later if I open the app it's working fine
SoLoader: couldn't find DSO to load: libhermes-executor-debug.so
E/SoLoader: couldn't find DSO to load: libjscexecutor.so
Hermes is enabled
I think this should be re-opened
I am getting this issue on crashlytics on upgrading to 0.68.1, in desperate need of a solution.
E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found: needed by /data/app/~~MAQLtBH_YH1akJlLHwB6BA==/com.xx.xx.staging1-5oLdcBbfLWDCumShj7vLSw==/lib/arm64/libjscexecutor.so in namespace classloader-namespace result: 0
getting same error on develop mode with flavours enabled. herms enabled.
same issue +1
facing same issue, with react native version .66 and hermes enabled
Any updates here? Sad to see the state of production level react native
repository
Same here: libjscexecutor.so caused by: couldn't find DSO to load: libjsc.so
Okay ! Here is my fix for this I was facing this issue,
I managed to fix this "libjsc.so" not found
by installing the jsc-android package from npm. Here is the link.
This issue only comes when you have Hermes engine enabled.
Please NOTE
: Refer to the docs of this package for proper installation as per your react native version
clean gradle and re run the entire app this issue will be gone.
but for couldn't find DSO to load: libjscexecutor.so
still looking into it.
Seeing this issue right now with RN 0.68.2
Seeing this as well upgrading from 0.69.1
to 0.70.4
. Have had hermes enabled for quite a while already.
Any solution here?
I upgraded from 0.67.2 to 0.70.4.
same here. RN 0.70.4 with hermes. If I add the following to my android/build.gradle
configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:0.70.4"
force "com.facebook.react:hermes-engine:0.70.4"
}
}
the app doesn't crash, but the error is still there.
Solution that worked for me,
In app/build.gradle change
implementation "com.facebook.react:react-native:0.66.3"
to
implementation ("com.facebook.react:react-native") version {
strictly "0.66.3"
}
for those who're still struggling with this issue while Hermes is on, just refer to just refer to the following comment https://github.com/facebook/react-native/issues/33177#issuecomment-1066604107. You most likely have the custom variation that isn't picked up by hermes, so you have to provide proper settings for hermesFlagsForVariant
and deleteDebugFilesForVariant
This worked for me:
change implementation "com.facebook.react:react-native:0.70.4"
to implementation ("com.facebook.react:react-native:0.70.4") { force = true }
and also put force = true
to
implementation("com.facebook.react:hermes-engine:0.70.4") { // From node_modules
force = true
exclude group:'com.facebook.fbjni'
}
U may see the conversation below this commit: if i comment the 3 lines, i find the android release won't crash, but as @cortinico said, libjscexecutor.so shouldn't be in release.
Thanks for the issue report @coolguy001tv. I was actually wrong as both
libjsc
andlibjscexecutor
are both needed for Debug and Release. We were under the wrong assumption thatlibjscexecutor
contained only debug symbols but that's not the case.Sadly this slipped through the release testing process as we mostly focus our testing on Hermes rather than JSC.
Also as a workaround while we work on a point release, you can still use this in your
app/build.gradle
to avoid the instacrash:project.ext.react = [ enableHermes: false, + deleteDebugFilesForVariant: { false } ]
this finally worked for me :)
Description
In android release, it will crash. The android log shows that libjscexecutor.so is not found. the detailed log :
Version
0.67.0
Output of
npx react-native info
Steps to reproduce
just use the lastest rn version:
npx react-native init rn67 --version 0.67.0
then into the android directory, run:gradlew assembleRelease
then grab the app-release.apk and install it via adb. Then it crashed with the log above.I find this error still exist in 0.67.0RC version( tested in rc6, which will crash), but in 0.66.4, there is no crash.
Further deep in, I find it may be related to this: https://github.com/facebook/react-native/commit/6f126740fa560d7a831979b9f3747baacfb28dba
U may see the conversation below this commit: if i comment the 3 lines, i find the android release won't crash, but as @cortinico said, libjscexecutor.so shouldn't be in release.
So what's the best for me to do?
Snack, code example, screenshot, or link to a repository
No response