question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

couldn't find DSO to load: libhermes.so (hermes disabled)

See original GitHub issue

Description

I’m getting error reports for couldn’t find DSO to load: libhermes.so

I have hermes disabled but still seems to be tripping up my build.

com.facebook.soloader.SoLoader.doLoadLibraryBySoName (SoLoader.java:738) com.facebook.soloader.SoLoader.loadLibraryBySoName (SoLoader.java:591) com.facebook.soloader.SoLoader.loadLibrary (SoLoader.java:529) com.facebook.soloader.SoLoader.loadLibrary (SoLoader.java:484) com.facebook.hermes.reactexecutor.HermesExecutor.<clinit> (HermesExecutor.java:20) com.facebook.hermes.reactexecutor.HermesExecutorFactory.create (HermesExecutorFactory.java:27) com.facebook.react.ReactInstanceManager$5.run (ReactInstanceManager.java:952) java.lang.Thread.run (Thread.java:818)

React Native version:

System: OS: macOS 10.15.6 CPU: (6) x64 Intel® Core™ i5-8500B CPU @ 3.00GHz Memory: 207.63 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 13.6.0 - /usr/local/bin/node npm: 6.13.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 28, 29 Build Tools: 28.0.3, 29.0.2 System Images: android-18 | Google APIs Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-21 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom IDEs: Android Studio: 3.6 AI-192.7142.36.36.6392135 Xcode: 11.6/11E708 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

Steps To Reproduce

Been unable to reproduce but have the error on a range of device and android os versions from 6 to 10.

Expected Results

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

Seen other report this issue when are trying to use Hermes and tried to make their fixes but was not resolved it for when i am not using hermes

android/app/build.gradle

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

def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);

dependencies {
    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }

android/build.gradle

allprojects {
    repositories {
        google()
        jcenter()
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        maven { url 'https://jitpack.io' }
    }
}

Any help on this would be greatly appreciated.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:23

github_iconTop GitHub Comments

38reactions
Michaelvonscommented, Dec 3, 2020

This is because SOLoader is absent.

Ensure

implementation'com.facebook.soloader:soloader:0.9.0+'

is added under dependencies in android/app/build.gradlle

clean your build cd android ./gradlew clean

Try bundling ./gradlew bundleRelease

Exit android folder cd ../

Try running npx react-native run-android --variant=release

19reactions
troZeecommented, Jun 27, 2021

In my case I needed to add hermes path for each android build type

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
        qaImplementation files(hermesPath + "hermes-release.aar")
        stageImplementation files(hermesPath + "hermes-release.aar")
        prodImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native :java.lang.UnsatisfiedLinkError: couldn't find ...
They cannot be used side-by-side in one app, so all of the app code and dependency code needs to be using one or...
Read more >
App fixes flagged on Firebase Crashylitics - Mon 4th Jan, 2020
UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so ... For now, I have disabled Hermes until I can update React Native versions, ...
Read more >
Getting “java.lang.UnsatisfiedLinkError: couldn't find DSO to ...
Android – Getting “java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so” error ... I let Hermes disabled in my app build.gradle file:
Read more >
Using Hermes - React Native
You can still disable Hermes using the command described in this page. ... Where to find JS engine status in AwesomeProject.
Read more >
React Native error with couldn't find DSO to load: libhermes.so
UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789) at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found