question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tests fail with error "java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so"

See original GitHub issue

What happened?

After upgrading react-native to version 0.68.2 from 0.63.4, the tests fail. The built application works. The error that is thrown by the tests is:

DetoxRuntimeError: Failed to run application on the device

    HINT: Most likely, your tests have timed out and called detox.cleanup() while it was waiting for "ready" message (over WebSocket) from the instrumentation process.

      3 | describe('Example', () => {
      4 |   beforeAll(async () => {
    > 5 |     await device.launchApp()
        |                  ^
      6 |   })
      7 |

      at onboarding.e2e.ts:5:18
      at onboarding.e2e.ts:8:71
      at Object.<anonymous>.__awaiter (onboarding.e2e.ts:4:12)
      at Object.<anonymous> (onboarding.e2e.ts:4:24)

By reading the more detailed logs, we find that the following command causes an error:

13:13:09.324 detox[105379] DEBUG: [SPAWN_CMD, #27, cpid=105524] /home/user/Library/Android/sdk/platform-tools/adb -s emulator-14004 shell am instrument -w -r -e detoxServer ws://localhost:39081 -e detoxSessionId d6ae8bef-12df-0b4e-4336-c96d21b681d9 -e debug false com.revelator.originalworks.test/androidx.test.runner.AndroidJUnitRunner
13:13:10.443 detox[105379] DEBUG: [SPAWN_END, #27, cpid=105524] /home/user/Library/Android/sdk/platform-tools/adb -s emulator-14004 shell am instrument -w -r -e detoxServer ws://localhost:39081 -e detoxSessionId d6ae8bef-12df-0b4e-4336-c96d21b681d9 -e debug false com.revelator.originalworks.test/androidx.test.runner.AndroidJUnitRunner exited with code #0

adb shell output:

 detoxSessionId d6ae8bef-12df-0b4e-4336-c96d21b681d9 -e debug false com.revelator.originalworks.test/androidx.test.runner.AndroidJUnitRunner                                                                     <
INSTRUMENTATION_RESULT: shortMsg=Process crashed.
INSTRUMENTATION_CODE: 0

These are logs from adb logcat. This is the error part.

logs:
07-14 15:31:24.634 19982 19982 E SoLoader: couldn't find DSO to load: libhermes.so
07-14 15:31:24.634 19982 19982 E SoLoader: 	SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~uSoN9VPkk1WOrWDuOLHKBA==/com.revelator.originalworks-JByrEhVwC7zOOGW0bGmoXg==/lib/x86_64 flags = 0]
07-14 15:31:24.634 19982 19982 E SoLoader: 	SoSource 1: com.facebook.soloader.DirectApkSoSource[root = /data/app/~~_40r519kmaU-M2cpDflLfQ==/com.revelator.originalworks.test-iZJ33nB4_UiufyC2njdQTg==/base.apk!/lib/x86_64]
07-14 15:31:24.634 19982 19982 E SoLoader: 	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
07-14 15:31:24.634 19982 19982 E SoLoader: 	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
07-14 15:31:24.634 19982 19982 E SoLoader: 	Native lib dir: /data/app/~~uSoN9VPkk1WOrWDuOLHKBA==/com.revelator.originalworks-JByrEhVwC7zOOGW0bGmoXg==/lib/x86_64
07-14 15:31:24.634 19982 19982 E SoLoader:  result: 0
07-14 15:31:24.635 19982 19982 W System.err: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
07-14 15:31:24.635 19982 19982 W System.err: 	SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~uSoN9VPkk1WOrWDuOLHKBA==/com.revelator.originalworks-JByrEhVwC7zOOGW0bGmoXg==/lib/x86_64 flags = 0]
07-14 15:31:24.635 19982 19982 W System.err: 	SoSource 1: com.facebook.soloader.DirectApkSoSource[root = /data/app/~~_40r519kmaU-M2cpDflLfQ==/com.revelator.originalworks.test-iZJ33nB4_UiufyC2njdQTg==/base.apk!/lib/x86_64]
07-14 15:31:24.635 19982 19982 W System.err: 	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
07-14 15:31:24.635 19982 19982 W System.err: 	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
07-14 15:31:24.635 19982 19982 W System.err: 	Native lib dir: /data/app/~~uSoN9VPkk1WOrWDuOLHKBA==/com.revelator.originalworks-JByrEhVwC7zOOGW0bGmoXg==/lib/x86_64
07-14 15:31:24.635 19982 19982 W System.err:  result: 0
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:25)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:19)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:23)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:369)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:318)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.revelator.originalworks.MainApplication.onCreate(MainApplication.java:55)
07-14 15:31:24.635 19982 19982 W System.err: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
07-14 15:31:24.635 19982 19982 W System.err: 	at androidx.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:442)
07-14 15:31:24.635 19982 19982 W System.err: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
07-14 15:31:24.635 19982 19982 W System.err: 	at android.app.ActivityThread.access$1300(ActivityThread.java:237)
07-14 15:31:24.635 19982 19982 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
07-14 15:31:24.635 19982 19982 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
07-14 15:31:24.635 19982 19982 W System.err: 	at android.os.Looper.loop(Looper.java:223)
07-14 15:31:24.635 19982 19982 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7656)
07-14 15:31:24.635 19982 19982 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-14 15:31:24.635 19982 19982 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-14 15:31:24.635 19982 19982 D AndroidRuntime: Shutting down VM
07-14 15:31:24.636 19982 19982 E AndroidRuntime: FATAL EXCEPTION: main
07-14 15:31:24.636 19982 19982 E AndroidRuntime: Process: com.revelator.originalworks, PID: 19982
07-14 15:31:24.636 19982 19982 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~uSoN9VPkk1WOrWDuOLHKBA==/com.revelator.originalworks-JByrEhVwC7zOOGW0bGmoXg==/lib/x86_64 flags = 0]
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	SoSource 1: com.facebook.soloader.DirectApkSoSource[root = /data/app/~~_40r519kmaU-M2cpDflLfQ==/com.revelator.originalworks.test-iZJ33nB4_UiufyC2njdQTg==/base.apk!/lib/x86_64]
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	Native lib dir: /data/app/~~uSoN9VPkk1WOrWDuOLHKBA==/com.revelator.originalworks-JByrEhVwC7zOOGW0bGmoXg==/lib/x86_64
07-14 15:31:24.636 19982 19982 E AndroidRuntime:  result: 0
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:20)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(Unknown Source:0)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:351)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:318)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.revelator.originalworks.MainApplication.onCreate(MainApplication.java:55)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at androidx.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:442)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at android.app.ActivityThread.access$1300(ActivityThread.java:237)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7656)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-14 15:31:24.636 19982 19982 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-14 15:31:24.636 19982 19982 E AndroidJUnitRunner: An unhandled exception was thrown by the app.
07-14 15:31:24.638 19982 19982 E InstrumentationResultPrinter: Failed to mark test No Tests as finished after process crash
07-14 15:31:24.638 19982 19982 I AndroidJUnitRunner: Bringing down the entire Instrumentation process.

Setup ./android/build.gradle: https://pastebin.com/raw/kFP9SvkV ./android/app/build.gradle: https://pastebin.com/raw/AdYvm1tC DetoxTest.java: https://pastebin.com/raw/V8vZMt6E

What was the expected behaviour?

No response

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 19.6.9 React Native version: 0.68.2 Node version: 12.21 Device model: Nexus_5X_API_R Android version: 11 Test-runner (select one): jest+jasmine

Detox logs

https://pastebin.com/raw/2Z6s7bYj

Device logs

https://pastebin.com/raw/PHwrUEMY

More data, please!

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
kowalskicommented, Jul 15, 2022

oh, I’m so glad we’re not the only ones!

4reactions
Gerlisoncommented, Jul 21, 2022

Tried the soloader 0.10.4, and that changed the logcat a little. Now I can see a new error: image

But I honestly don’t know if this error is relevant or just a consequence of changing the soloader version.

Firstly i tried just to use specific version of soloader (0.10.4+) image , and that alone didn’t work for detox test build, because it was causing another error. Which, later, I solved by doing the following guide: https://wix.github.io/Detox/docs/introduction/android/#setting-detox-up-as-a-compiling-dependency

Thank you all

Read more comments on GitHub >

github_iconTop Results From Across the Web

SoLoader: couldn't find DSO to load: libjscexecutor.so
So kindly helps me to fix this issue. I have given the stack trace and error below. E/SoLoader: couldn't find DSO to load:...
Read more >
Fixing React-Native android release build - wesionaryTEAM
1. couldn't find DSO to load: libjsexecutor.so. java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjsexecutor.so. I solved libjsexecutor.so error ...
Read more >
error failed to launch emulator react native - You.com
Kotlin could not find the required JDK tools in the Java installation. ... couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed:...
Read more >
React-Native :java.lang.UnsatisfiedLinkError: couldn't find ...
Android : React-Native : java. lang. UnsatisfiedLinkError : couldn't find DSO to load : libhermes. so [ Beautify Your Computer ...
Read more >
Unable to configure zoom video sdk in react native project
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: cannot locate symbol ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found