Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Fails to Open in Espresso, "java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so" #808

Open
sean7512 opened this issue Aug 18, 2022 · 1 comment

Comments

@sean7512
Copy link

When using Espresso, the tests fail with " Request failed with status 500 due to session not created: A new session could not be created. Details: Espresso server process has been unexpectedly terminated". The ADB stack trace shows the app fails to launch because of "java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so" Below is my configuration...

capabilities: [{
        platformName: 'Android',
        platformVersion: '11',
        deviceName: 'Pixel_3a_API_30',
        appPackage: 'com.awesomeproject',
        appActivity: 'com.awesomeproject.MainActivity',
        app: './../android/app/build/outputs/apk/debug/app-debug.apk',
        automationName: 'Espresso',
        showGradleLog: true,
        espressoBuildConfig: "{ \"gradle\": \"7.1.1\", \"toolsVersions\": { \"kotlin\": \"1.6.10\", \"buildTools\": \"31.0.0\", \"compileSdk\": \"31\", \"minSdk\": \"26\", \"targetSdk\": \"31\" }, \"additionalAppDependencies\": [ \"androidx.lifecycle:lifecycle-runtime-ktx:2.5.1\", \"androidx.lifecycle:lifecycle-livedata-ktx:2.5.1\" ] }",
        forceEspressoRebuild: true
    }]

This is literally a stock React Native app just initialized with the CLI with no other modifications. It is frustrating that setting this up in such a clean state is so difficult. The same tests run 100% fine using UIAutomator2. I assume I am doing something super silly and wrong, but I haven't been able to figure it out yet.

Any help would be much appreciated.

@KazuCocoa
Copy link
Member

Espresso and UIA2 have different architectures at Android OS level. Espresso generally depends on the app under test,
https://developer.android.com/training/testing/espresso , so as you already use espressoBuildConfig, probably something react native specific dependencies are needed to the espresso server.

I haven't heavily used RN, but the error message looks like something RN specific one...? https://stackoverflow.com/questions/57036317/react-native-java-lang-unsatisfiedlinkerror-couldnt-find-dso-to-load-libherm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants