Realm-js: java.lang.UnsatisfiedLinkError: couldn't find DSO to load

Created on 30 Aug 2019  路  17Comments  路  Source: realm/realm-js

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",

O-Community T-Help

Most helpful comment

this link resolve the issue.

All 17 comments

@kishansbs Can you try two things:

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

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

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

@kneth any solution?

@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.

Realm does not yet support Hermes: https://github.com/realm/realm-js/issues/2455

Hermes is already disable.

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

is library need to be link?

@kishansbs Did you run react-native link realm?

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

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.

Can it be that you are hit by #2640?

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

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

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

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

this link resolve the issue.

@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 馃嵒

Was this page helpful?
0 / 5 - 0 ratings