facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.16k stars 24.21k forks source link

couldn't find DSO to load: libhermes.so caused by: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by #35374

Closed shreyakupadhyay closed 1 year ago

shreyakupadhyay commented 1 year ago

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:

  1. Tried downgrading to RN version 0.69.7 -> No success.
  2. https://github.com/facebook/react-native/issues/33177#issuecomment-1050686449 -> No success.
  3. 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
shreyakupadhyay commented 1 year ago

I believe, React Native is generating two files libhermes-executor-debug.so and libhermes-executor-release.so. However, the react native codebase and our code both reference these files as well as libhermes.so.

react-native/react.gradle at af6aafff90c4d40abfe160c4cfc8e1ae8fa0d956 · facebook/react-native (github.com) react-native/build.gradle at 394486eec584a37920dad447a6c1d0ae24d225fc · facebook/react-native (github.com)

d-mooers commented 1 year ago

Experiencing same issue as well

arkokoley commented 1 year ago

I have this issue as well. i was able to fix the couldn't find DSO to load: libhermes.so by copying libhermes-executor-debug.so to libhermes.so. Still running into couldn't find DSO to load: libjscexecutor.so.

daveosterjr commented 1 year ago

Same issue here too

2022-11-17 15:24:49.991 16426-16426/? E/SoLoader: couldn't find DSO to load: libjscexecutor.so

daveosterjr commented 1 year ago

Update: Works fine in debug builds

shreyakupadhyay commented 1 year ago

@daveosterjr, can you please mention what helped you? Or what can be a suitable fix that can be done at my end.

daveosterjr commented 1 year ago

@shreyakupadhyay I have yet to find a solution. Still getting this error only on release builds.

cortinico commented 1 year ago

Still getting this error only on release builds.

Could you try on a empty project on 0.70 and confirm if the issue is still happening?

DevAhamed commented 1 year ago

"__emutls_get_address" is a method from the libc++_shared.so and this is referenced by the libfolly_runtime.so. If you are shipping an older libc++_shared.so file, this can cause the above crash.

CHANDRAMOHANnegi commented 1 year ago

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:

dcosmin2003 commented 1 year ago

I'm facing the same issue and nothing changed in my code, only a restart of my laptop.

sniperosx commented 1 year ago

We had the same problem. Temporary workaround is to disable hermes in App build.gradle

project.ext.react = [
    enableHermes: false, <<<< Changed from true to false. App is bundling fine again
    ...
]
cortinico commented 1 year ago

couldn't find DSO to load: libhermes.so

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.

tominou commented 1 year ago

I still have a few identical crash reports of Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so on some production devices. It seems to affect only Android 8.1.0 ones (Nexus 5X) in my case.

Using RN0.71.1 and Hermes.

princefishthrower commented 1 year ago

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 enableHermes is set to false, this is still very much still an open issue. Will try upgrading to latest and report back.

SirFitz commented 1 year ago

Experiencing the same on Production on Devices running Android 11

RN: 0.71.1 Hermes

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.fleeksite.carshop/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 com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
       at com.fleeksite.carshop.MainApplication.onCreate(MainApplication.java:63)
       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)
TomWq commented 1 year ago

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.(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) 

jacklj commented 1 year ago

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

adelnobel commented 1 year ago

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

RichardLindhout commented 1 year ago

Seeing the same crash on OnePlus 8

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
RichardLindhout commented 1 year ago

We need to open another issue I think? I use expo prebuild

AliYar-Khan commented 1 year ago

couldn't find DSO to load: libhermes.so

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.

happening in 0.71.4 again

Iamjakerrrr commented 1 year ago

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.

codal-mpawar commented 1 year ago

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.

Works for me thanks. @Iamjakerrrr

1stmuse commented 1 year ago

@codal-mpawar how did you do it

aftab410005 commented 1 year ago

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.

Works for me thanks. @Iamjakerrrr

I am new to android, can you please tell me step wise, what I supposed to do. Thank in advance

aftab410005 commented 1 year ago

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.

Works for me thanks. @Iamjakerrrr

I am new to android, can you please tell me step wise, what I supposed to do. Thank in advance

Youssef-Durgham commented 1 year ago

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

if (enableHermes) {
    implementation("com.facebook.react:hermes-engine:+") {
      exclude group:'com.facebook.fbjni'
  }
} else {
    implementation jscFlavor
}
Youssef-Durgham commented 1 year ago

this above should fix your error without any problem.

aftab410005 commented 1 year ago

this above should fix your error without any problem.

Thank you for your prompt solution, but unfortunately I am still facing the same issue

aftab410005 commented 1 year ago
Screenshot 2023-04-05 at 12 33 26 PM
codal-mpawar commented 1 year ago

@1stmuse

android/build.gradle paste

buildscript {
    ext {
    minSdkVersion = 21
        compileSdkVersion = 33
        targetSdkVersion = 31
        ndkVersion = "24.0.8215888"
        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"
        }

android/app/build.gradle paste

android {
    packagingOptions {
        pickFirst "**/libc++_shared.so"
        resources.excludes.add("META-INF/*")
    }
    ndkVersion rootProject.ext.ndkVersion
mariamaneva commented 1 year ago

Running 0.71.4. Only thing thing that helped was to set hermesEnabled=false in gradle.properties

badams77-cpu commented 1 year ago

Had this problem also, with RN@0.71.6, Tried codel-mpawar's build.gradle change, and also IamJakerrr's NDK update (to ndk-23c), but the app is still crashing with the missing libhermes.so problem.

mohitarora777 commented 1 year ago

Happening for v0.71.6 on release builds

Screenshot 2023-04-18 at 7 45 46 PM
 java.lang.UnsatisfiedLinkError: dlopen failed: library "libreactnativejni.so" not found: needed by /data/app/~~vDsoGgMrtaiVY9GXzhCt4w==/in.mohalla.video-VN3lKSCOu8tXrfbTPMtRQQ==/lib/arm64/libjscexecutor.so in namespace classloader-namespace
2023-04-18 19:40:32.275  8184-8184  System.err              pid-8184                             W  java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsi.so" not found: needed by /data/app/~~vDsoGgMrtaiVY9GXzhCt4w==/in.mohalla.video-VN3lKSCOu8tXrfbTPMtRQQ==/lib/arm64/libhermes.so in namespace classloader-namespace
2023-04-18 19:40:35.131  8184-8184  AndroidRuntime          pid-8184                             E  FATAL EXCEPTION: main
                                                                                                    Process: in.mohalla.video, PID: 8184
                                                                                                    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: library "libjsi.so" not found: needed by /data/app/~~vDsoGgMrtaiVY9GXzhCt4w==/in.mohalla.video-VN3lKSCOu8tXrfbTPMtRQQ==/lib/arm64/libhermes.so in namespace classloader-namespace result: 0
                                                                                                        at com.facebook.soloader.SoLoader.f(SourceFile:347)
                                                                                                        at com.facebook.soloader.SoLoader.l(SourceFile:81)
                                                                                                        at com.facebook.soloader.SoLoader.k(SourceFile:102)
                                                                                                        at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(SourceFile:8)
                                                                                                        at com.facebook.react.x.d(SourceFile:290)
                                                                                                        at wp1.n.a(SourceFile:77)
                                                                                                        at wp1.n$a.invokeSuspend(Unknown Source:11)
                                                                                                        at bv0.a.resumeWith(SourceFile:9)
                                                                                                        at fy0.y.E0(Unknown Source:6)
                                                                                                        at ay0.a.resumeWith(SourceFile:23)
                                                                                                        at bv0.a.resumeWith(SourceFile:37)
                                                                                                        at ay0.r0.run(SourceFile:111)
                                                                                                        at android.os.Handler.handleCallback(Handler.java:942)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                        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)
                                                                                                        Suppressed: ay0.p0: [i2{Cancelling}@a5db181, Dispatchers.Main]
                                                                                                    Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsi.so" not found: needed by /data/app/~~vDsoGgMrtaiVY9GXzhCt4w==/in.mohalla.video-VN3lKSCOu8tXrfbTPMtRQQ==/lib/arm64/libhermes.so in namespace classloader-namespace
                                                                                                        at java.lang.Runtime.load0(Runtime.java:929)
                                                                                                        at java.lang.System.load(System.java:1625)
                                                                                                        at com.facebook.soloader.p.b(SourceFile:111)
                                                                                                        at com.facebook.soloader.d.e(SourceFile:97)
                                                                                                        at com.facebook.soloader.d.a(Unknown Source:2)
                                                                                                        at com.facebook.soloader.b.a(Unknown Source:2)
                                                                                                        at com.facebook.soloader.SoLoader.f(SourceFile:60)
                                                                                                        ... 19 more
laurent22 commented 1 year ago

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.

05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime: FATAL EXCEPTION: main
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime: Process: net.cozic.joplin, PID: 26027
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/net.cozic.joplin/lib-main flags = 1]
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/net.cozic.joplin-8J5WOvzx3FbHERZb7-uziw==/lib/arm64 flags = 0]
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  Native lib dir: /data/app/net.cozic.joplin-8J5WOvzx3FbHERZb7-uziw==/lib/arm64
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  result: 0
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1127)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:25)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:19)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.hermes.reactexecutor.HermesExecutor.loadLibrary(HermesExecutor.java:23)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:393)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:343)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:96)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at net.cozic.joplin.MainApplication.onCreate(MainApplication.java:92)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1202)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7601)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at android.app.ActivityThread.access$2600(ActivityThread.java:259)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2440)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at android.os.Handler.dispatchMessage(Handler.java:110)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at android.os.Looper.loop(Looper.java:219)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at android.app.ActivityThread.main(ActivityThread.java:8673)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at java.lang.reflect.Method.invoke(Native Method)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
05-08 20:21:23.734 10352 26027 26027 E AndroidRuntime:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
anhtuank7c commented 1 year ago

@tk3cforever I experienced the same and need to disable hermes to able to make it work :|

laurent22 commented 1 year ago

We had the opposite experience - some users were getting that error "couldn't find DSO to load: libhermes.so" even though enableHermes was set to false. So we set it to true and error went away.

badams77-cpu commented 1 year ago

Actually, for me, it turned out I had misspelled enableHermes in the app/build.gradle, which when corrected fixed this missing library, but then i got lib/arm64/lib{appname}_appmodules.so not found, (the packager only makes a lib/arm64-v8a and arm7 ones, which I spent many hours on. I tried some build.gradle changes to copy the libmodules.so to the correct location, but so far the android gradle plugin won't accept any new files or filecollections to the PackageApplication.;jniLibs collection (in the aferEvalute part of build.gradle) which is the list of DSO libraries that are copied to dev apk.

umerkhalil02 commented 1 year ago

try downgrading the react-native-reanimated to 2.1.0 in package.json then run npm install and then try running the app.

rakeshkumar-23 commented 1 year ago

I have enabled the Hermes in two locations:

  1. 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:+' }

    1. In gradle.properties, hermesEnabled=true

    Note: react-native version 0.71.6

ankurjd commented 1 year ago

I am facing this issue on below my app.

    "react": "17.0.2",
    "react-native": "0.66.4",

hermes is enabled

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]
    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

Firebase crash reporting logs

Screenshot 2023-06-20 at 1 52 48 PM

keilaiendraicak commented 1 year ago

@ankurjd Did you find any solution?

rakeshkumar-23 commented 1 year ago

I am facing this issue on below my app.

    "react": "17.0.2",
    "react-native": "0.66.4",

hermes is enabled

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]
def jscFlavor = 'org.webkit:android-jsc-intl:+'
    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

Firebase crash reporting logs

Screenshot 2023-06-20 at 1 52 48 PM

Result: Working fine at my end now.

zidun commented 1 year ago

I am facing this issue on below my app.

    "react": "17.0.2",
    "react-native": "0.66.4",

hermes is enabled

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]
def jscFlavor = 'org.webkit:android-jsc-intl:+'
    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

Firebase crash reporting logs Screenshot 2023-06-20 at 1 52 48 PM

Result: Working fine at my end now.

Hi @rakeshkumar-23, just curious, after you update the value jscFlavor from :

def jscFlavor = 'org.webkit:android-jsc:+'

to

def jscFlavor = 'org.webkit:android-jsc-intl:+'

does the problem from firebase not appear again ?

ucheNkadiCode commented 1 year ago

@cortinico is there a specific version of React Native that has addressed this issue? I don't think it was ready to be closed. I am still getting this unsatisfied link error for Many of my devices. I'm running React Native 71.8 and I don't believe the solutions above have worked.

I've added some quick SoLoader tweaks coming from the same StackOver flow issue -> Comment 1 and Comment 2. However, I'm deploying my production app and praying it actually works.

cortinico commented 1 year ago

@cortinico is there a specific version of React Native that has addressed this issue? I don't think it was ready to be closed. I am still getting this unsatisfied link error for Many of my devices. I'm running React Native 71.8 and I don't believe the solutions above have worked.

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.

hmdrx commented 1 year ago

still issue persist even if 0.71+

Screenshot_20230810_082219 Screenshot_20230810_082259
ucheNkadiCode commented 1 year ago

still issue persist even if 0.71+

Screenshot_20230810_082219 Screenshot_20230810_082259

The guidance is to update to RN 72, that has actually fixed my current issues. I’m no longer seeing these crashes

vladimir-vasilev commented 1 year ago

"react": "18.2.0", "react-i18next": "12.2.0",

hermesEnabled=false

the issue still persist