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.

Application crashes when starting with new architecture in 0.68.1 - ANDROID

See original GitHub issue

Description

With hermes disabled

After starting the app with the new architecture enabled, the app closes on startup. Hermes is not enabled

Log error

2022-04-13 14:34:48.630 2298-2298/com.appteste E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.appteste, PID: 2298
    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libfbjni.so" not found: needed by /data/app/~~7jTqgGf31MS_4N9yyiM9Ng==/com.appteste-TIteXYoNPOLCAsyczuwihA==/lib/arm64/libjscexecutor.so in namespace classloader-namespace result: 0
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
        at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
        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(JSCExecutor.java:24)
        at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:351)
        at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:318)
        at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95)
        at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
        at com.appteste.MainApplication.onCreate(MainApplication.java:58)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7482)
        at android.app.ActivityThread.access$1700(ActivityThread.java:310)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2283)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8641)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
     Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libfbjni.so" not found: needed by /data/app/~~7jTqgGf31MS_4N9yyiM9Ng==/com.appteste-TIteXYoNPOLCAsyczuwihA==/lib/arm64/libjscexecutor.so in namespace classloader-namespace
        at java.lang.Runtime.load0(Runtime.java:929)
        at java.lang.System.load(System.java:1620)
        at com.facebook.soloader.SoLoader$1.load(SoLoader.java:529)
        at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:110)
        at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:63)
        at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:91)
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1038)
        at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914) 
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826) 
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773) 
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743) 
        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(JSCExecutor.java:24) 
        at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:351) 
        at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:318) 
        at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95) 
        at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42) 
        at com.appteste.MainApplication.onCreate(MainApplication.java:58) 
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7482) 
        at android.app.ActivityThread.access$1700(ActivityThread.java:310) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2283) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loopOnce(Looper.java:226) 
        at android.os.Looper.loop(Looper.java:313) 
        at android.app.ActivityThread.main(ActivityThread.java:8641) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133) 

With hermes enabled

After enabling hermes the error changes

2022-04-13 15:00:55.165 11220-11220/com.appteste E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.appteste, PID: 11220
    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
    	SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.appteste/lib-main flags = 1]
    	SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~nyN-3HePMkh5EvQIdQmLAA==/com.appteste-NPeR-DwOp9T3JWyhWSnzvA==/lib/arm64 flags = 0]
    	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
    	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
    	Native lib dir: /data/app/~~nyN-3HePMkh5EvQIdQmLAA==/com.appteste-NPeR-DwOp9T3JWyhWSnzvA==/lib/arm64
     result: 0
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
        at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
        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(JSCExecutor.java:24)
        at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:351)
        at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:318)
        at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95)
        at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
        at com.appteste.MainApplication.onCreate(MainApplication.java:58)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7482)
        at android.app.ActivityThread.access$1700(ActivityThread.java:310)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2283)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8641)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
2022-04-13 15:00:55.184 11220-11220/com.appteste I/Process: Sending signal. PID: 11220 SIG: 9

Version

0.68.1

Output of npx react-native info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 2.97 GB / 15.73 GB
  Binaries:
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.18 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK:
      API Levels: 30, 31, 32
      Build Tools: 30.0.2, 31.0.0, 32.0.0, 32.1.0
      System Images: android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: Version     2021.1.0.0 AI-211.7628.21.2111.8309675      
    Visual Studio: Not Found
  Languages:
    Java: 11.0.14.1 - /c/Program Files/OpenJDK/openjdk-11.0.14.1_1/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.68.1 => 0.68.1
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. run react-native init projectName
  2. enabled new architeture in gradle.properties
  3. run react-native run-android

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kelsetcommented, May 10, 2022

hey folks, two things - I’m going to close this as duplicate of https://github.com/facebook/react-native/issues/33742, let’s try to avoid too many issues reporting the same thing. Second, it should now be properly addressed in 0.68.2 - do let us know (in the other issue) if the problem is now fixed for you!

0reactions
cortinicocommented, May 4, 2022

For me a workaround was upgrading flipper from version 0.54.0 to 0.143.0 (at android/gradle.properties):

As a rule of thumb, please make sure you’re aligning the versions used with the one from the default template. You’ll end up pulling in wrong versions of dependencies that will conflict otherwise.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Hermes - React Native
Hermes is an open-source JavaScript engine optimized for React Native. For many apps, using Hermes will result in improved start-up time, ...
Read more >
React Native 0.69.5 White Screen Crash - Stack Overflow
2 project for update I created new react project then installed expo bareworkflow add all packages 1 by 1 after adding babel and...
Read more >
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
Expo SDK 45. Today we're announcing the release of…
Bumped Android compileSdkVersion to 31 and Java 11. React Native 0.68. This React Native release is the first with support for the New...
Read more >
React Native App - Automatic Setup - Flipper
Android - start the Flipper Desktop application and start your project using yarn android . Your application will appear in Flipper. · iOS...
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