react-native: couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by
New Version
0.70.6
Old Version
0.64.3
Build Target(s)
android Pixel 6 API 33
Output of react-native info
System: OS: macOS 12.5 CPU: (8) arm64 Apple M1 Pro Memory: 91.14 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9014738 Xcode: 14.1/14B47b - /usr/bin/xcodebuild Languages: Java: 17.0.5 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.5 => 0.70.5 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Issue and Reproduction Steps
When I am trying to launch the app on android it crashed on the splash screen and Logcat reports the below error.
couldn't find DSO to load: libjscexecutor.so
SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/<app-name>/lib-main flags = 1]
SoSource 1: com.facebook.soloader.DirectorySoSource[root=/data/app/~~AGozzVGVTA5Gh9p_gDZUZQ==/<app-name>--iZgSxziAEd9bD7-7vT15w==/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/~~AGozzVGVTA5Gh9p_gDZUZQ==/<app-name>--iZgSxziAEd9bD7-7vT15w==/lib/arm64 result: 0
couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~AGozzVGVTA5Gh9p_gDZUZQ==/<app-name>--iZgSxziAEd9bD7-7vT15w==/lib/arm64/libfolly_runtime.so"... result: 0
2022-11-16 21:57:22.186 16654-16654 AndroidRuntime com.node.wallet D Shutting down VM
2022-11-16 21:57:22.187 16654-16654 AndroidRuntime com.node.wallet E FATAL EXCEPTION: main Process: <app-name>, PID: 16654
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~AGozzVGVTA5Gh9p_gDZUZQ==/<app-name>--iZgSxziAEd9bD7-7vT15w==/lib/arm64/libfolly_runtime.so"... 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: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:393)
at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:343)
at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:96)
at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
at com.node.wallet.MainApplication.onCreate(MainApplication.java:45)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1266)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6785)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2134)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~AGozzVGVTA5Gh9p_gDZUZQ==/com.node.wallet--iZgSxziAEd9bD7-7vT15w==/lib/arm64/libfolly_runtime.so"...
at java.lang.Runtime.load0(Runtime.java:929)
at java.lang.System.load(System.java:1625)
at com.facebook.soloader.SoLoader$1.load(SoLoader.java:558)
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:1067)
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: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:393)
at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:343)
at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:96)
at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
at com.node.wallet.MainApplication.onCreate(MainApplication.java:45)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1266)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6785)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2134)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
/android/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlinVersion = "1.5.30"
kotlin_version = "1.5.30"
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:7.2.1")
classpath('com.google.gms:google-services:4.3.14') // <-- Firebase
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:5.0.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
// RAMP SDK Start ----
maven { url 'https://www.jitpack.io' }
maven { url 'https://button.passbase.com/__android' }
// RAMP SDk End -------
maven { url "$rootDir/../node_modules/react-native/android" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url(new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../android"))
}
maven {
// Android JSC is installed from npm
url(new File(["node", "--print", "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), "../dist"))
}
google()
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
jcenter()
}
}
/android/app/build.gradle
apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services' // <- Firebase
import org.apache.tools.ant.taskdefs.condition.Os
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation. If none specified and
* // "index.android.js" exists, it will be used. Otherwise "index.js" is
* // default. Can be overridden with ENTRY_FILE environment variable.
* entryFile: "index.android.js",
*
* // https://reactnative.dev/docs/performance#enable-the-ram-format
* bundleCommand: "ram-bundle",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
project.ext.react = [
enableHermes: true,
]
apply from: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../react.gradle")
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = true
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = true
/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and that value will be read here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);
/**
* Architectures to build native code for.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId 'com.node.wallet'
minSdkVersion 21 // rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 3
versionName "1.0.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {
// We configure the CMake build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
cmake {
arguments "-DPROJECT_BUILD_DIR=$buildDir",
"-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
"-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
"-DNODE_MODULES_DIR=$rootDir/../node_modules",
"-DANDROID_STL=c++_shared"
}
}
if (!enableSeparateBuildPerCPUArchitecture) {
ndk {
abiFilters (*reactNativeArchitectures())
}
}
}
}
if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
cmake {
path "$projectDir/src/main/jni/CMakeLists.txt"
}
}
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
afterEvaluate {
// If you wish to add a custom TurboModule or component locally,
// you should uncomment this line.
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
// Due to a bug inside AGP, we have to explicitly set a dependency
// between configureCMakeDebug* tasks and the preBuild tasks.
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
configureCMakeDebug.dependsOn(preDebugBuild)
reactNativeArchitectures().each { architecture ->
tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
dependsOn("preDebugBuild")
}
tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
dependsOn("preReleaseBuild")
}
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
// implementation 'com.github.RampNetwork:ramp-sdk-android:1.+'
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation platform('com.google.firebase:firebase-bom:29.1.0') // Firebase BOM
implementation 'com.google.firebase:firebase-analytics' // Firebase google analytics
implementation project(':react-native-vector-icons')
// implementation 'com.github.RampNetwork:ramp-sdk-android:1.+' // ramp!
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
// If your app supports Android versions before Ice Cream Sandwich (API level 14)
// All fresco packages should use the same version
if (isGifEnabled || isWebpEnabled) {
implementation 'com.facebook.fresco:fresco:2.6.0' {
exclude group: 'com.facebook.soloader', module: 'soloader'
}
}
if (isGifEnabled) {
// For animated gif support
implementation 'com.facebook.fresco:animated-gif:2.6.0'
}
if (isWebpEnabled) {
// For webp support
implementation 'com.facebook.fresco:webpsupport:2.6.0'
if (isWebpAnimatedEnabled) {
// Animated webp support
implementation 'com.facebook.fresco:animated-webp:2.6.0'
}
}
implementation'com.facebook.soloader:soloader:0.10.1'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
if (enableHermes) {
//noinspection GradleDynamicVersion
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
exclude group:'com.facebook.fbjni'
}
} else {
implementation jscFlavor
}
}
if (isNewArchitectureEnabled()) {
// If new architecture is enabled, we let you build RN from source
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
// This will be applied to all the imported transtitive dependency.
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.facebook.react:react-native"))
.using(project(":ReactAndroid"))
.because("On New Architecture we're building React Native from source")
substitute(module("com.facebook.react:hermes-engine"))
.using(project(":ReactAndroid:hermes-engine"))
.because("On New Architecture we're building Hermes from source")
}
}
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.implementation
into 'libs'
}
project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'Entypo.ttf', 'FontAwesome.ttf', 'AntDesign.ttf' ] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesAppBuildGradle(project)
def isNewArchitectureEnabled() {
// To opt-in for the New Architecture, you can either:
// - Set `newArchEnabled` to true inside the `gradle.properties` file
// - Invoke gradle with `-newArchEnabled=true`
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}
Solutions that I have tried:
- Tried downgrading to RN version 0.69.7 -> No success.
- https://github.com/facebook/react-native/issues/33177#issuecomment-1050686449 -> No success.
- https://github.com/facebook/hermes/issues/76 -> No success.
Also, I have tried all the solutions mentioned in Github issues in the context of libhermes.so crash or libjscexecutor.so.
Command used to run on android:
npx react-native run-android
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 65 (3 by maintainers)
This and all the other “couldn’t find DSO to load” have been fixed in React Native 0.71 Please upgrade to that version and open specific bugs if the issue persist in your setup.
I still have a few identical crash reports of
Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.soon some production devices. It seems to affect only Android 8.1.0 ones (Nexus 5X) in my case.Using RN0.71.1 and Hermes.
Experiencing the same on Production on Devices running Android 11
RN: 0.71.1 Hermes
We’re seeing this crash in production on RN 0.71.3, on lots of different devices (Google, Motorola, OnePlus, and Android 8, 9, 11). Please could you reopen the issue? Thanks
I still have this problem with version 0.71.3. When will it be completely solved? It’s too troublesome Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “__emutls_get_address” referenced by “/data/app/~~vbWfXad6lGcgenld5jE95g==/com.jmzhac-RhzywSs5bUi1FvCi03MNcw==/lib/arm64/libfolly_runtime.so”… at java.lang.Runtime.load0(Runtime.java:929) at java.lang.System.load(System.java:1621) at com.facebook.soloader.SoLoader$1.load(SoLoader.java:558) 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:1067) 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.jmzhac.MainApplication.onCreate(MainApplication.java:63) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1224) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8244) at android.app.ActivityThread.access$2700(ActivityThread.java:299) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2739) at android.os.Handler.dispatchMessage(Handler.java:117) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:293) at android.app.ActivityThread.main(ActivityThread.java:9596) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1204)
Seeing the same crash on OnePlus 8
We had the opposite experience - some users were getting that error “couldn’t find DSO to load: libhermes.so” even though
enableHermeswas set to false. So we set it totrueand error went away.I solve the problem in this way its 99% guaranteed
1. enable Hermes by update that lines in the ./android inside the build.gradle
`project.ext.react = [ enableHermes: true, // its false by default make it true ]
def enableHermes = project.ext.react.get(“enableHermes”, true); //its false by default make it true `
2. do this in ./android/app directory in build.gradle
its like that
if (enableHermes) { def hermesPath = “…/…/node_modules/hermes-engine/android/”; debugImplementation files(hermesPath + “hermes-debug.aar”) releaseImplementation files(hermesPath + “hermes-release.aar”) } else { implementation jscFlavor }
replace with this part
Same here still seeing this on Android 8 and 11 for one plus and nexus 5 with
Fatal Exception: java.lang.UnsatisfiedLinkError couldn’t find DSO to load: libhermes.so SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/com.realegp.usdegp-cNrCZiQ4uaI2vDLPOth0XQ==/lib/x86 flags = 0] SoSource 1: com.facebook.soloader.DirectApkSoSource[root = ()] SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2] SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
react-native-cli: 2.0.1 react-native: 0.71.4
@shreyakupadhyay I have yet to find a solution. Still getting this error only on release builds.
This issue and similar “coundn’t find DSO to load” issues got fixed in 0.71+ If you’re still having the same issue on 0.72+, please open a new issue and provide a reproducer. We’re not watching closed issues so it’s not helpful to keep on commenting here.
Running 0.71.4. Only thing thing that helped was to set hermesEnabled=false in gradle.properties
happening in 0.71.4 again
I fixed it. Check your project’s native module that uses libc++_shared.so and update the ndkVersion to 23.1.7779620(or higher?). I update it from 20.0.5594570 to 23.1.7779620.
February 2023 on React Native 0.70.6 and I’m also seeing these crashes on launch on a oneplus android device. So it would seem that unless
enableHermesis set tofalse, this is still very much still an open issue. Will try upgrading to latest and report back.try downgrading the react-native-reanimated to 2.1.0 in package.json then run npm install and then try running the app.
I am facing this issue on below my app.
hermes is enabled
Firebase crash reporting logs
Happening for v0.71.6 on release builds
We need to open another issue I think? I use expo prebuild
Same error “react”: “18.2.0”, “react-native”: “0.69.7”,
com.facebook.react.common.JavascriptException: Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libhermes-executor-debug.so" not found: needed by /data/app/~~I2LsT5hS3k3L-_kxSOy6ag==/com.myapp-pgL8fWT6C6epdRQMtAn7OA==/lib/arm64/libreanimated.so in namespace classloader-namespace, js engine: hermes, stack:@1stmuse
android/build.gradle paste
android/app/build.gradle paste
I have this issue as well. i was able to fix the
couldn't find DSO to load: libhermes.soby copying libhermes-executor-debug.so to libhermes.so. Still running intocouldn't find DSO to load: libjscexecutor.so.I thought I left a comment about the cause of this issue but apparently I haven’t so, here’s my observation about what’s causing this issue:
https://github.com/android/ndk/issues/1639
In NDK v23b, they made a change where the function
__emutls_get_addresshas been moved intolibc++_shared.so, which causes some older packaged binaries failing to find the said function.We’ve fixed this by configuring some packages to build from source, and making sure all binaries in the app to have same NDK version (you can check this via this tool). I hope you find this comment helpful 😉
still issue persist even if 0.71+

Hi @rakeshkumar-23, just curious, after you update the value jscFlavor from :
to
does the problem from firebase not appear again ?
@ankurjd Did you find any solution?
I have enabled the Hermes in two locations:
In build.gradle that is inside the app folder and added below code. if (enableHermes) { implementation(“com.facebook.react:hermes-android”) } else { implementation ‘org.webkit:android-jsc-intl:+’ }
In gradle.properties, hermesEnabled=true
Note: react-native version 0.71.6
Also happening here - https://github.com/laurent22/joplin/issues/8144#issuecomment-1538691127. Is there any way to get it working? Clearly upgrading to 0.71 doesn’t seem to help.
this above should fix your error without any problem.
We had the same problem. Temporary workaround is to disable hermes in App
build.gradle