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

java.lang.UnsatisfiedLinkError: couldn't find DSO to load #2502

Closed
kishansbs opened this issue Aug 30, 2019 · 18 comments
Closed

java.lang.UnsatisfiedLinkError: couldn't find DSO to load #2502

kishansbs opened this issue Aug 30, 2019 · 18 comments

Comments

@kishansbs
Copy link

kishansbs commented Aug 30, 2019

getting this issue after build successfully, and run apk in real device.

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: librealmreact.so caused by: Didn't find class "io.realm.react.util.SSLHelper" on path: DexPathList[[zip file "/data/app/Package name-_6WtNMftSBIYmN0hqHsLvw==/base.apk"],nativeLibraryDirectories=[/data/app/com.adavers.mauritiusexplored-_6WtNMftSBIYmN0hqHsLvw==/lib/arm, /data/app/com.adavers.mauritiusexplored-_6WtNMftSBIYmN0hqHsLvw==/base.apk!/lib/armeabi-v7a, /system/lib]]
at com.facebook.soloader.SoLoader.b(Unknown Source:383)
at com.facebook.soloader.SoLoader.a(Unknown Source:106)
at com.facebook.soloader.SoLoader.a(Unknown Source:96)
at com.facebook.soloader.SoLoader.a(Unknown Source:1)
at io.realm.react.RealmReactModule.(Unknown Source:2)
at io.realm.react.b.b(Unknown Source:0)
at d.b.n.P.a(Unknown Source:41)
at d.b.n.l.a(Unknown Source:30)
at d.b.n.I.a(Unknown Source:34)
at d.b.n.I.a(Unknown Source:54)
at d.b.n.I.a(Unknown Source:36)
at d.b.n.I.a(Unknown Source:0)
at d.b.n.D.run(Unknown Source:68)
at java.lang.Thread.run(Thread.java:764)

"react": "16.8.6",
"react-native": "0.60.4",
"realm": "^2.29.2",

@realm-probot realm-probot bot added the O-User label Aug 30, 2019
@kneth
Copy link
Contributor

kneth commented Aug 30, 2019

@kishansbs Can you try two things:

Moreover, do you by any chance mix 32 bit and 64 bit libraries?

@kishansbs
Copy link
Author

here is the code ---

android/app/build.gradle-

def enableProguardInReleaseBuilds = true

abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"//, "arm64-v8a", "x86_64"
}

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
}

    }
}

packagingOptions {
pickFirst '/armeabi-v7a/libc++_shared.so'
pickFirst '
/x86/libc++_shared.so'
//pickFirst '/arm64-v8a/libc++_shared.so'
// pickFirst '
/x86_64/libc++_shared.so'
pickFirst '/x86/libjsc.so'
pickFirst '
/armeabi-v7a/libjsc.so'
}

"realm": "^2.29.1",
"react": "16.8.6",
"react-native": "0.60.4",

getting same issues -- not time of debug, after generating apk.

Screenshot_2019-08-30-16-00-31-075_com miui bugreport

@kishansbs
Copy link
Author

running this apk --- app-armeabi-v7a-release.apk

@kishansbs
Copy link
Author

@kneth any solution?

@paschaldev
Copy link

@kishansbs You have to disable hermes for it to work, I have experienced this issue before. Once you disable hermes, it would work fine. We are all waiting for hermes support.

@thekevinbrown
Copy link

Realm does not yet support Hermes: #2455

@kishansbs
Copy link
Author

Hermes is already disable.

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

@kishansbs
Copy link
Author

is library need to be link?

@kneth
Copy link
Contributor

kneth commented Sep 3, 2019

@kishansbs Did you run react-native link realm?

Moreover, can you inspect the .apk file to see if you have any Realm related .so?

@kishansbs
Copy link
Author

kishansbs commented Sep 3, 2019

yes, I tried.
when i run react native link realm, it not added in MainApplication.java file.

if i add manually like this---

@OverRide
protected List getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new RealmReactPackage());
return packages;
}

its giving an error ---

Native module RealmReactModule tried to override RealmReactModule.

so i removed it.

@kneth
Copy link
Contributor

kneth commented Sep 9, 2019

Can it be that you are hit by #2640?

@prashantsingh0205
Copy link

@kishansbs You closed the issue. Can you please share how you resolved it. Facing same issue.

@kneth
Copy link
Contributor

kneth commented Nov 14, 2019

@prashantsingh0205 Did you by any change enable Hermes? We have seen an error similar to this when Hermes is enabled (and we do not yet support Hermes).

@ShridharCodewave
Copy link

Hello, I am using react native 0.59.9 and realm 2.29.1 and facing the same issue any solution for this?

@kneth
Copy link
Contributor

kneth commented Dec 18, 2019

@ShridharCodewave Please create a new issue where you fill out the issue template so we can see what can be the issue.

@shrivastavaanurag
Copy link

shrivastavaanurag commented Jan 6, 2020

this link resolve the issue.

@gboyegadada
Copy link

@kishansbs You have to disable hermes for it to work, I have experienced this issue before. Once you disable hermes, it would work fine. We are all waiting for hermes support.

This worked for me after 2 days of debugging ! Thanks 🍻

@faisolp
Copy link

faisolp commented Sep 6, 2022

Hermes is already disable.

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

I tried .,that ok

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests