Cannot run app on Android at all - UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
See original GitHub issueDescription
When running on Android I get the following error: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
.
Here’s my Logcat output:
2020-08-10 16:03:30.031 27444-27444/com.mrousavy.springsale D/SoLoader: init exiting
2020-08-10 16:03:30.032 27444-27444/com.mrousavy.springsale D/SoLoader: About to load: libjscexecutor.so
2020-08-10 16:03:30.032 27444-27444/com.mrousavy.springsale D/SoLoader: libjscexecutor.so not found on /data/data/com.mrousavy.springsale/lib-main
2020-08-10 16:03:30.032 27444-27444/com.mrousavy.springsale D/SoLoader: libjscexecutor.so found on /data/app/com.mrousavy.springsale-CXI-2b725337Ev76dSm2lg==/lib/x86
2020-08-10 16:03:30.032 27444-27444/com.mrousavy.springsale D/SoLoader: Not resolving dependencies for libjscexecutor.so
2020-08-10 16:03:30.044 27444-27444/com.mrousavy.springsale W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at java.lang.Runtime.load0(Runtime.java:938)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at java.lang.System.load(System.java:1631)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.SoLoader$1.load(SoLoader.java:395)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:77)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:50)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:82)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:766)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:673)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:611)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:559)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:297)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:270)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:87)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)
2020-08-10 16:03:30.045 27444-27444/com.mrousavy.springsale W/System.err: at com.mrousavy.springsale.MainApplication.onCreate(MainApplication.java:48)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:219)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at android.os.Looper.loop(Looper.java:214)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2020-08-10 16:03:30.046 27444-27444/com.mrousavy.springsale E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found result: 0
2020-08-10 16:03:30.050 27444-27444/com.mrousavy.springsale D/SoLoader: init exiting
Some lines after that, the React Context fails to initialize (I’m guessing that’s related?):
2020-08-10 16:03:31.760 27444-27547/com.mrousavy.springsale E/ReactNativeJNI: logMarker CREATE_REACT_CONTEXT_END
2020-08-10 16:03:31.761 27444-27533/com.mrousavy.springsale E/unknown:ReactNative: ReactInstanceManager.createReactContext: mJSIModulePackage null
2020-08-10 16:03:31.762 27444-27533/com.mrousavy.springsale E/unknown:DisabledDevSupportManager: Caught exception
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:234)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:29)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:258)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1293)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1016)
at java.lang.Thread.run(Thread.java:919)
--------- beginning of crash
2020-08-10 16:03:31.762 27444-27533/com.mrousavy.springsale E/AndroidRuntime: FATAL EXCEPTION: create_react_context
Process: com.mrousavy.springsale, PID: 27444
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:234)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:29)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:258)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1293)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1016)
at java.lang.Thread.run(Thread.java:919)
React Native version:
info Fetching system and libraries information...
(node:2822) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
OS: macOS 10.15.6
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 588.49 MB / 32.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.5.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 25, 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.0, 30.0.0, 30.0.1
System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: 21.2.6472646
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_262 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Create Android Project
- Enable hermes
- Enable multidex
- Enable
enableSeparateBuildPerCPUArchitecture
- Enable
enableProguardInReleaseBuilds
Expected Results
App should be running.
Snack, code example, screenshot, or link to a repository:
How should I put an example here?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Getting library "libjsc.so" not found after upgrading React ...
After doing this, I get the error library "libjsc.so" not found when running react-native run-android . i get the same error when running...
Read more >error failed to launch emulator react native - You.com
React Native WebStorm Emulator cannot start - error Failed to launch emulator. ... I've then Googled dlopen failed: library "libjsc.so" not found and ......
Read more >A brand new website interface for an even better experience!
java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found [App Crashed]
Read more >Unable to configure zoom video sdk in react native project
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “__cxa_bad_typeid” referenced by “/data/app/~~ ...
Read more >Known issues with Android Studio and Android Gradle Plugin
Not all dynamic-feature library dependencies are lint checked. When running lint with checkDependencies = true from an app module, dynamic-feature library ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was experiencing an issue on Android and was seeing this error early in the
adb logcat
output and spent some time trying to figure out why it was occurring. After some time I determined that this error aboutlibjsc
is non-fatal and normal while using Hermes. In my case, Flipper was causing a fatal error that occurred later in theadb logcat
output. Figured I’d share here in case anybody else is seeing this.I have the same problem, I solved it, just try update okhttp version:
implementation("com.squareup.okhttp3:okhttp:4.9.1")