react-native: [Android] Couldn't find DSO to load crash in release build and hermes is enabled

Description

Hermes is enabled with following packaging options in android.

packagingOptions { if (enableHermes) { // For Hermes, delete all the libjsc* files exclude "/libjsc*.so" if (taskName.contains(“Release”)) { // Reduce size by deleting the debugger/inspector exclude '/libhermes-inspector.so’ exclude ‘/libhermes-executor-debug.so’ } else { // Release libs take precedence and must be removed // to allow debugging exclude '/libhermes-executor-release.so’ } } else { // For JSC, delete all the libhermes* files exclude “**/libhermes*.so” } }

Getting this crash on release build.

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-executor-release.so caused by: couldn't find DSO to load: libreactnativejni.so caused by: ELF file truncated result: 0 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:25)
   at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
   at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066)
   at java.lang.Thread.run(Thread.java:923)

Version

0.66.0

Output of npx react-native info

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libhermes-executor-release.so caused by: couldn’t find DSO to load: libreactnativejni.so caused by: ELF file truncated result: 0 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:25) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066) at java.lang.Thread.run(Thread.java:923)

Steps to reproduce

N/A

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

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 59 (7 by maintainers)

Most upvoted comments

https://github.com/facebook/react-native/issues/25537#issuecomment-1182498993

Hello, for people who just migrated to RN 0.69.+ and are facing this issue too on Android, you should update android/app/build.gradle with the following code as Hermes now comes bundled with React Native accordingly to the official documentation :

dependencies {
    // ...

    if (enableHermes) {
+       implementation("com.facebook.react:hermes-engine:+") {
+           exclude group:'com.facebook.fbjni'
+       }
-       def hermesPath = "../../node_modules/hermes-engine/android/";
-       debugImplementation files(hermesPath + "hermes-debug.aar")
-       releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

This resolved the issue for me, hope it can help a few of you.

Best regards.

This worked for me

Closing as there was no reproducer provided and we can’t really look into this issue, without a proper reproducer.

Hi @cortinico, I’m not sure how closing this issue helps the project. I’m sure a lot of M1 Mac users would be experiencing this issue, maybe or not related to not having Rosetta present. But I have not been successful with a release apk for Android, most likely because I don’t need Rosetta. The same source code builds a successfully running release apk when built from an Intel Mac. I’ve applied a lot of suggestions that are out there. None of them has worked. How do I help you in reproducing this issue?

@cortinico

This is also happening in my Android environment. I’m working on bumping from 0.63.2 to 0.67.1, and the application in the release build crashes immediately before the splash screen.

Multiple logs of couldn't find DSO to load can be seen in the adb log output. An excerpt is below.

Logs 02-22 18:00:04.412 9890 9890 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so 02-22 21:42:28.406 3548 3548 E SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found result: 0 02-22 21:48:22.995 4603 4603 E SoLoader: couldn't find DSO to load: libjscexecutor.so 02-22 21:48:23.033 4603 4603 E SoLoader: couldn't find DSO to load: libhermes-inspector.so caused by: dlopen failed: cannot locate symbol "_ZTIN8facebook6hermes8debugger13EventObserverE" referenced by "/data/data/jp.exampleapp.canary/lib-main/libhermes-inspector.so"... result: 0 02-22 21:48:23.034 4603 4603 W System.err: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-inspector.so caused by: dlopen failed: cannot locate symbol "_ZTIN8facebook6hermes8debugger13EventObserverE" referenced by "/data/data/jp.exampleapp.canary/lib-main/libhermes-inspector.so"... result: 0 02-22 21:48:23.034 4603 4603 E SoLoader: couldn't find DSO to load: libhermes-executor-common-debug.so caused by: couldn't find DSO to load: libhermes-inspector.so caused by: dlopen failed: cannot locate symbol "_ZTIN8facebook6hermes8debugger13EventObserverE" referenced by "/data/data/jp.exampleapp.canary/lib-main/libhermes-inspector.so"... result: 0 result: 0 02-22 21:48:23.034 4603 4603 W System.err: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-executor-common-debug.so caused by: couldn't find DSO to load: libhermes-inspector.so caused by: dlopen failed: cannot locate symbol "_ZTIN8facebook6hermes8debugger13EventObserverE" referenced by "/data/data/jp.exampleapp.canary/lib-main/libhermes-inspector.so"... result: 0 result: 0 02-22 21:48:23.034 4603 4603 W System.err: Caused by: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-inspector.so caused by: dlopen failed: cannot locate symbol "_ZTIN8facebook6hermes8debugger13EventObserverE" referenced by "/data/data/jp.exampleapp.canary/lib-main/libhermes-inspector.so"... result: 0 02-22 21:48:23.035 4603 4603 E SoLoader: couldn't find DSO to load: libhermes-executor-debug.so caused by: couldn't find DSO to load: libhermes-executor-common-debug.so caused by: couldn't find DSO to load: libhermes-inspector.so caused by: dlopen failed: cannot locate symbol "_ZTIN8facebook6hermes8debugger13EventObserverE" referenced by "/data/data/jp.exampleapp.canary/lib-main/libhermes-inspector.so"... result: 0 result: 0 result: 0 02-22 21:48:23.035 4603 4603 E SoLoader: couldn't find DSO to load: libhermes-executor-release.so 02-22 21:48:23.036 4603 4603 W System.err: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes-executor-release.so 02-22 21:48:23.036 4603 4603 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so
npx react-native info

System: OS: macOS 12.2.1 CPU: (8) arm64 Apple M1 Pro Memory: 99.73 MB / 16.00 GB Shell: 3.3.1 - /opt/homebrew/bin/fish Binaries: Node: 14.18.2 - ~/.asdf/installs/nodejs/14.18.2/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 6.14.15 - ~/.asdf/plugins/nodejs/shims/npm Watchman: 2022.01.24.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.2 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 29, 30, 32 Build Tools: 28.0.3, 29.0.2, 30.0.2, 32.0.0 System Images: android-31 | Google APIs ARM 64 v8a, android-32 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 1.8.0_312 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.1 => 0.67.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found


#33065, #33079 also looks like a very similar Issue. However, each seems to have a different version of RN. Is there a widespread impact on the release build?

※This problem did not occur in the debug build

#25537 (comment)

Hello, for people who just migrated to RN 0.69.+ and are facing this issue too on Android, you should update android/app/build.gradle with the following code as Hermes now comes bundled with React Native accordingly to the official documentation :

dependencies {
    // ...

    if (enableHermes) {
+       implementation("com.facebook.react:hermes-engine:+") {
+           exclude group:'com.facebook.fbjni'
+       }
-       def hermesPath = "../../node_modules/hermes-engine/android/";
-       debugImplementation files(hermesPath + "hermes-debug.aar")
-       releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

This resolved the issue for me, hope it can help a few of you. Best regards.

This worked for me

Thanks! For me, in addition to that, I had to bump react-native-reanimated to 2.10.0.

I already had this, but it still not working.

Hello, On an M1 Mac, Monterey, the issue persists and prevents release apk from running successfully. This happens whether enableHermes is true or false. or whether deleteDebugFilesForVariant: { false } is included in the proper place. Happens on react-native 0.67 till 0.68.2

Here too. Very same errors for OnePlus8Pro. "react-native": "0.71.8" on release build variant.

This bug still happens in some devices:

  • OnePlus8Pro (Android 11)
  • Honor TFY-AN00 (Android 12)
  • Vivo S15e (Android 11)

Version: “expo”: “~48.0.11”, “install-expo-modules”: “^0.5.1”, “react-native”: “0.71.6”,

Crash 1:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: couldn't find DSO to load: libjsi.so caused by: couldn't find DSO to load: libfolly_runtime.so caused by: couldn't find DSO to load: libglog.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/com.example.app/lib-3/libc++_shared.so" is for EM_AARCH64 (183) instead of EM_X86_64 (62) result: 0 result: 0 result: 0 result: 0 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1127)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
       at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:26)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
       at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:24)
       at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:369)
       at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:316)
       at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94)
       at expo.modules.ReactNativeHostWrapperBase.createReactInstanceManager(ReactNativeHostWrapperBase.kt:32)
       at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
       at com.example.app.MainApplication.onCreate(MainApplication.java:66)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1194)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6735)
       at android.app.ActivityThread.access$1300(ActivityThread.java:239)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1915)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7680)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Crash 2:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so caused by: couldn't find DSO to load: libreact_render_runtimescheduler.so caused by: couldn't find DSO to load: libreact_render_core.so caused by: couldn't find DSO to load: libjsi.so caused by: couldn't find DSO to load: libfolly_runtime.so caused by: couldn't find DSO to load: libglog.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/com.example.app/lib-3/libc++_shared.so" is for EM_AARCH64 (183) instead of EM_X86_64 (62) result: 0 result: 0 result: 0 result: 0 result: 0 result: 0 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1127)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
       at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:34)
       at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:17)
       at com.facebook.react.bridge.Arguments.createMap(Arguments.java:159)
       at expo.modules.updates.UpdatesController$start$1.onBackgroundUpdateFinished(UpdatesController.kt:303)
       at expo.modules.updates.loader.LoaderTask$launchRemoteUpdateInBackground$1$1.onFailure(LoaderTask.kt:301)
       at expo.modules.updates.loader.Loader.finishWithError(Loader.kt:150)
       at expo.modules.updates.loader.Loader.access$finishWithError(Loader.kt:25)
       at expo.modules.updates.loader.Loader$start$1.onFailure(Loader.kt:102)
       at expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:310)
       at expo.modules.updates.loader.FileDownloader$downloadData$1.onResponse(FileDownloader.kt:393)
       at com.google.firebase.perf.network.InstrumentOkHttpEnqueueCallback.onResponse(InstrumentOkHttpEnqueueCallback.java:71)
       at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

I have the same issue on react 70.6 with enableHermes: false

@AstrOOnauta that is not right, I had this error on an Android 11. See picture.

Captura de pantalla 2022-12-05 a les 8 48 42

#25537 (comment)

Hello, for people who just migrated to RN 0.69.+ and are facing this issue too on Android, you should update android/app/build.gradle with the following code as Hermes now comes bundled with React Native accordingly to the official documentation :

dependencies {
    // ...

    if (enableHermes) {
+       implementation("com.facebook.react:hermes-engine:+") {
+           exclude group:'com.facebook.fbjni'
+       }
-       def hermesPath = "../../node_modules/hermes-engine/android/";
-       debugImplementation files(hermesPath + "hermes-debug.aar")
-       releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

This resolved the issue for me, hope it can help a few of you. Best regards.

This worked for me

How do I do that in an Expo app

@cortinico could we consider reopening this? This crash has led to plenty of uninstalls for my app. It’s clear that this is affecting users still to this day

This issue is a duplicate of #37336 and #37404 and others. I’m happy to reopen as soon as we get a reproducer that we can investigate on. Sadly just stacktraces are not enough at this stage.

having the same issue, RN 0.71.0 using Hermes and ProGuard ( with -keep class com.facebook.jni.** { *; }) reproduced on OnePlus8Pro, Xiaomi Mi 9X, LG Nexus 5X

@TVGSoft did you ever find a way to fix those crashes on OnePlus8 and those other devices? I also am still seeing some of my users get Crashes due to this error.

I am NOT using the Hermes engine and I am NOT using Expo either. but I am using RN 71.6. Any help would be appreciated.

If you’re using ProGuard so you need to add the following rule to android/app/proguard-rules.pro:

-keep class com.facebook.jni.** { *; }

This is mentioned in Breaking change of v0.62.0 changelog. https://github.com/react-native-community/releases/blob/master/CHANGELOG.md#breaking (https://stackoverflow.com/questions/60927048/react-native-app-release-build-crashes-on-start-works-fine-in-debug-why)

From here: expo/expo#17450

I was using expo… This worked for me:

android{
   ...
   packagingOptions {
      jniLibs.useLegacyPackaging = true
   }
   ...
  }

If it didn’t work, check the link… There are other workarounds as well.

Was upgrading from and older version of react native + expo modules to latest 0.70.5…this fixed the issue for me…thanks man

What is the solution?

#25537 (comment)

Hello, for people who just migrated to RN 0.69.+ and are facing this issue too on Android, you should update android/app/build.gradle with the following code as Hermes now comes bundled with React Native accordingly to the official documentation :

dependencies {
    // ...

    if (enableHermes) {
+       implementation("com.facebook.react:hermes-engine:+") {
+           exclude group:'com.facebook.fbjni'
+       }
-       def hermesPath = "../../node_modules/hermes-engine/android/";
-       debugImplementation files(hermesPath + "hermes-debug.aar")
-       releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

This resolved the issue for me, hope it can help a few of you. Best regards.

This worked for me

This worked for me as well, thanks!

I have the same crash on the following devices:

  • Nexus 5X/5
  • One Plus 8 Pro
  • Samsung Galaxy A3
  • Huawei P40 Lite JNY-LX1

It started showing up after the react-native update to 0.70.8 and expo 47.0.0 with hermes enabled

Firebase crash report

Error:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
	SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-main flags = 1]
	SoSource 1: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-0 flags = 1]
	SoSource 2: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-1 flags = 1]
	SoSource 3: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-2 flags = 1]
	SoSource 4: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-3 flags = 1]
	SoSource 5: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-4 flags = 1]
	SoSource 6: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-5 flags = 1]
	SoSource 7: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-6 flags = 1]
	SoSource 8: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-7 flags = 1]
	SoSource 9: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-8 flags = 1]
	SoSource 10: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-9 flags = 1]
	SoSource 11: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-10 flags = 1]
	SoSource 12: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-11 flags = 1]
	SoSource 13: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-12 flags = 1]
	SoSource 14: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-13 flags = 1]
	SoSource 15: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-14 flags = 1]
	SoSource 16: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-15 flags = 1]
	SoSource 17: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-16 flags = 1]
	SoSource 18: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-17 flags = 1]
	SoSource 19: com.facebook.soloader.ApkSoSource[root = /data/data/com.worktually/lib-18 flags = 1]
	SoSource 20: com.facebook.soloader.ApkSoSourc<truncated: 7430 chars>
       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.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:25)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:19)
       at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:23)
       at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:394)
       at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:344)
       at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95)
       at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
       at com.worktually.MainApplication.onCreate(MainApplication.java:56)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1194)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6735)
       at android.app.ActivityThread.access$1300(ActivityThread.java:239)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1915)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7680)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:423)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

I am using cli:

"react": "18.0.0",
"react-native": "0.69.12",

Same issue with react native 0.71.6

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: couldn't find DSO to load: libjsi.so caused by: couldn't find DSO to load: libfolly_runtime.so caused by: couldn't find DSO to load: libglog.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/.../lib-3/libc++_shared.so" is for EM_AARCH64 (183) instead of EM_X86_64 (62) result: 0 result: 0 result: 0 result: 0 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:343)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:126)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:2)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:31)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:1)
       at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:6)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java)
       at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java)
       at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:36)
       at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:90)
       at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:148)
       at expo.modules.ReactNativeHostWrapperBase.createReactInstanceManager(ReactNativeHostWrapperBase.java:53)
       at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:9)
       at com.photoenhancer.MainApplication.onCreate(MainApplication.java:22)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1194)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6735)
       at android.app.ActivityThread.access$1300(ActivityThread.java:239)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1915)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7680)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Just for reference, a similar issue was fixed on my M1 mac using Android emulator by just rebooting the mac. Last reboot was a month ago.

Found a fix for the issue with hermes:

Change:

implementation("com.facebook.react:hermes-engine:+") { // From node_modules
    exclude group:'com.facebook.fbjni'
}

to:

implementation("com.facebook.react:hermes-engine:" + <YOUR_REACT_NATIVE_VERSION>) { // From node_modules
    exclude group:'com.facebook.fbjni'
}

for example, for mine I used:

implementation("com.facebook.react:hermes-engine:0.69.5") { // From node_modules
    exclude group:'com.facebook.fbjni'
}

From here: https://github.com/expo/expo/issues/17450

I was using expo… This worked for me:

android{
   ...
   packagingOptions {
      jniLibs.useLegacyPackaging = true
   }
   ...
  }

If it didn’t work, check the link… There are other workarounds as well.

Hermes is enabled with following packaging options in android.

You can’t use if (taskName.contains("Release")) condition inside the packagingOption. The react.gradle script is already taking care of this for you. You don’t need this extra handling.

Same here, happening with Nexus 5 on Android 8.1

react-native 0.72.6

One question though: what if we have an issue that’s only reproducible on certain devices, like facebook/SoLoader#59?

That makes things harder as we’ll have to find that specific device to potentially fix the issue.

I am facing this issue in release build and below is the detail of the device: One Plus 8 Pro device

and logs. Fatal Exception: java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libhermes.so caused by: couldn’t find DSO to load: libjsi.so caused by: couldn’t find DSO to load: libfolly_json.so caused by: couldn’t find DSO to load: libglog.so caused by: couldn’t find DSO to load: libc++_shared.so caused by: dlopen failed: “/data/data/com.northwest.alaskacommercial/lib-3/libc++_shared.so” is for EM_AARCH64 (183) instead of EM_X86_64 (62) result: 0 result: 0 result: 0 result: 0 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066) at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libjsi.so caused by: couldn’t find DSO to load: libfolly_json.so caused by: couldn’t find DSO to load: libglog.so caused by: couldn’t find DSO to load: libc++_shared.so caused by: dlopen failed: “/data/data/com.northwest.alaskacommercial/lib-3/libc++_shared.so” is for EM_AARCH64 (183) instead of EM_X86_64 (62) result: 0 result: 0 result: 0 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066) at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libfolly_json.so caused by: couldn’t find DSO to load: libglog.so caused by: couldn’t find DSO to load: libc++_shared.so caused by: dlopen failed: “/data/data/com.northwest.alaskacommercial/lib-3/libc++_shared.so” is for EM_AARCH64 (183) instead of EM_X86_64 (62) result: 0 result: 0 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066) at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libglog.so caused by: couldn’t find DSO to load: libc++_shared.so caused by: dlopen failed: “/data/data/com.northwest.alaskacommercial/lib-3/libc++_shared.so” is for EM_AARCH64 (183) instead of EM_X86_64 (62) result: 0 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066) at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libc++_shared.so caused by: dlopen failed: “/data/data/com.northwest.alaskacommercial/lib-3/libc++_shared.so” is for EM_AARCH64 (183) instead of EM_X86_64 (62) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066) at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.UnsatisfiedLinkError: dlopen failed: “/data/data/com.northwest.alaskacommercial/lib-3/libc++_shared.so” is for EM_AARCH64 (183) instead of EM_X86_64 (62) at java.lang.Runtime.load0(Runtime.java:942) at java.lang.System.load(System.java:1628) at com.facebook.soloader.SoLoader$1.load(SoLoader.java:529) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:110) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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:812) at com.facebook.soloader.DirectorySoSource.loadDependencies(DirectorySoSource.java:177) at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:103) at com.facebook.soloader.UnpackingSoSource.loadLibrary(UnpackingSoSource.java:570) 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.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20) at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066) at java.lang.Thread.run(Thread.java:923)

Firebase-Messaging-Init: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.1.0:2) at java.lang.Thread.run(Thread.java:923)

pool-2-thread-1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

GmsDynamite: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at java.lang.Object.wait(Object.java:568) at com.google.android.gms.dynamite.zza.run(com.google.android.gms:play-services-basement@@18.1.0:2)

Firebase-Messaging-Topics-Io: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.1.0:2) at java.lang.Thread.run(Thread.java:923)

com.google.firebase.crashlytics.startup1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:64) at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27) at java.lang.Thread.run(Thread.java:923)

FinalizerDaemon: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:190) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:211) at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:273) at java.lang.Daemons$Daemon.run(Daemons.java:139) at java.lang.Thread.run(Thread.java:923)

OkHttp ConnectionPool: at java.lang.Object.wait(Object.java) at com.android.okhttp.ConnectionPool$1.run(ConnectionPool.java:106) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

main: at android.graphics.HardwareRenderer.nSetStopped(HardwareRenderer.java) at android.graphics.HardwareRenderer.setStopped(HardwareRenderer.java:474) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3868) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3104) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1948) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8177) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972) at android.view.Choreographer.doCallbacks(Choreographer.java:796) at android.view.Choreographer.doFrame(Choreographer.java:731) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7680) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:423) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Okio Watchdog: at java.lang.Object.wait(Object.java) at com.android.okhttp.okio.AsyncTimeout.awaitTimeout(AsyncTimeout.java:325) at com.android.okhttp.okio.AsyncTimeout.access$000(AsyncTimeout.java:42) at com.android.okhttp.okio.AsyncTimeout$Watchdog.run(AsyncTimeout.java:288)

ReferenceQueueDaemon: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at java.lang.Object.wait(Object.java:568) at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:217) at java.lang.Daemons$Daemon.run(Daemons.java:139) at java.lang.Thread.run(Thread.java:923)

Crashlytics Exception Handler1: at dalvik.system.VMStack.getThreadStackTrace(VMStack.java) at java.lang.Thread.getStackTrace(Thread.java:1736) at java.lang.Thread.getAllStackTraces(Thread.java:1812) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateThreadsList(CrashlyticsReportDataCapture.java:295) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateExecutionData(CrashlyticsReportDataCapture.java:266) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.populateEventApplicationData(CrashlyticsReportDataCapture.java:216) at com.google.firebase.crashlytics.internal.common.CrashlyticsReportDataCapture.captureEventData(CrashlyticsReportDataCapture.java:102) at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistEvent(SessionReportingCoordinator.java:274) at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistFatalEvent(SessionReportingCoordinator.java:127) at com.google.firebase.crashlytics.internal.common.CrashlyticsController$2.call(CrashlyticsController.java:203) at com.google.firebase.crashlytics.internal.common.CrashlyticsController$2.call(CrashlyticsController.java:188) at com.google.firebase.crashlytics.internal.common.CrashlyticsBackgroundWorker$3.then(CrashlyticsBackgroundWorker.java:105) at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@18.0.1:1) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:64) at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27) at java.lang.Thread.run(Thread.java:923)

awaitEvenIfOnMainThread task continuation executor1: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:64) at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27) at java.lang.Thread.run(Thread.java:923)

queued-work-looper: at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loop(Looper.java:183) at android.os.HandlerThread.run(HandlerThread.java:67)

ScionFrontendApi: at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109) at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1091) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

FinalizerWatchdogDaemon: at java.lang.Thread.sleep(Thread.java) at java.lang.Thread.sleep_aroundBody0(Thread.java:442) at java.lang.Thread.sleep_aroundBody1$advice(Thread.java:56) at java.lang.Thread.sleep(Thread.java:1) at java.lang.Thread.sleep(Thread.java:358) at java.lang.Daemons$FinalizerWatchdogDaemon.sleepForNanos(Daemons.java:390) at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:419) at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:325) at java.lang.Daemons$Daemon.run(Daemons.java:139) at java.lang.Thread.run(Thread.java:923)

Measurement Worker: at java.lang.Object.wait(Object.java) at java.lang.Object.wait(Object.java:442) at com.google.android.gms.measurement.internal.zzfu.run(com.google.android.gms:play-services-measurement-impl@@21.1.1:10)

What data they should collect then? Please elaborate.

@sergey-hippo I would need a project created from this template: https://github.com/react-native-community/reproducer-react-native

That I can build locally, and where the app crashes consistently with the error message you’re reprorting about.

Edit: Sorry for the repost, I did not see the comment above! For anyone using expo…

try to add this to app/build.gradle

android{
...
packagingOptions {
     jniLibs.useLegacyPackaging = true
}
...
}

Taken from: https://github.com/expo/expo/issues/17450

@Nesh108 Thanks! that’s helpful. Looks like the issue was resolved in the patch via react-native 0.69.7.

I tried out that version and it works, however I use Expo so the pinned version is 0.69.6 so I could not simply use that version. I had to make a custom expo config plugin and instead made the change in project build gradle:

allprojects {

    afterEvaluate {
        configurations.all {
            resolutionStrategy {
                force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
                force "com.facebook.react:hermes-engine:" + REACT_NATIVE_VERSION
            }
        }
    }

The only thing that worked for me was disabling Hermes in app/build.gradle

project.ext.react = [
    enableHermes: false,  // clean and rebuild if changing
]