facebook / SoLoader

Native code loader for Android
Apache License 2.0
1.34k stars 176 forks source link

SoLoader 0.8.0 couldn't find DSO to load - issue on .apk build #55

Open xserxses opened 4 years ago

xserxses commented 4 years ago

MyApp is crashing while performing tests on Firebase Test lab emulators (x86). Downgrading to 0.6.1 is fixing the problem.

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libyoga.so caused by: APK was built for a different platform
    at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789)
    at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)
    at com.facebook.yoga.YogaNative.<clinit>(YogaNative.java:15)
    at com.facebook.yoga.YogaConfig.<init>(YogaConfig.java:20)
    at com.facebook.yoga.YogaConfigFactory.create(YogaConfigFactory.java:5)
    at com.facebook.litho.yoga.LithoYogaFactory.createYogaConfig(LithoYogaFactory.java:26)
    at com.facebook.litho.NodeConfig.<clinit>(NodeConfig.java:45)
agrass commented 3 years ago

Thanks @RodolfoGS! you already tried that?? That error with libhermes.so it suppose be solved same way the libv8executor.so? because that fix it seems to apply only for libhermes.

RodolfoGS commented 3 years ago

@agrass I'm not sure if fix libv8executor.so too ¯\_(ツ)_/¯

He1nr1chK commented 3 years ago

I had the issue on RN version 64.2 and what solved it for me was upgrading my hermes-engine version to 0.7.0. Apparently there is strict version compatibility. Hope this saves someone the 4 hours I just wasted.

simpleton commented 2 years ago

Version 0.10.3 has been released which includes several fixes.

thanakij commented 2 years ago

We have upgraded soloader to 0.10.3 but somehow Crashlytics is still reporting this issue...

Fatal Exception: java.lang.UnsatisfiedLinkError
couldn't find DSO to load: libhermes.so SoSource 0: c.g.b1.d[root = /data/app/com.xxx-vcqrW3oazAf0i2rlQsiIbA==/lib/x86 flags = 0] SoSource 1: c.g.b1.c[root = null] SoSource 2: c.g.b1.d[root = /vendor/lib flags = 2] SoSource 3: c.g.b1.d[root = /system/lib flags = 2] Native lib dir: /data/app/com.xxx-vcqrW3oazAf0i2rlQsiIbA==/lib/x86 result: 0

This time the report says the device is running Android 8.1.0 (Nexus 5X) at SoLoader.java line 1098.

prox2 commented 2 years ago

We have upgraded soloader to 0.10.3 but somehow Crashlytics is still reporting this issue...

Fatal Exception: java.lang.UnsatisfiedLinkError
couldn't find DSO to load: libhermes.so SoSource 0: c.g.b1.d[root = /data/app/com.xxx-vcqrW3oazAf0i2rlQsiIbA==/lib/x86 flags = 0] SoSource 1: c.g.b1.c[root = null] SoSource 2: c.g.b1.d[root = /vendor/lib flags = 2] SoSource 3: c.g.b1.d[root = /system/lib flags = 2] Native lib dir: /data/app/com.xxx-vcqrW3oazAf0i2rlQsiIbA==/lib/x86 result: 0

This time the report says the device is running Android 8.1.0 (Nexus 5X) at SoLoader.java line 1098.

me too having same issue with version 0.10.3 and Android 11

simpleton commented 2 years ago

Can you share the crash backtrace or log?

On Tue, Dec 7, 2021 at 12:26 PM Mubarak @.***> wrote:

We have upgraded soloader to 0.10.3 but somehow Crashlytics is still reporting this issue...

Fatal Exception: java.lang.UnsatisfiedLinkError couldn't find DSO to load: libhermes.so SoSource 0: c.g.b1.d[root = /data/app/com.xxx-vcqrW3oazAf0i2rlQsiIbA==/lib/x86 flags = 0] SoSource 1: c.g.b1.c[root = null] SoSource 2: c.g.b1.d[root = /vendor/lib flags = 2] SoSource 3: c.g.b1.d[root = /system/lib flags = 2] Native lib dir: /data/app/com.xxx-vcqrW3oazAf0i2rlQsiIbA==/lib/x86 result: 0

This time the report says the device is running Android 8.1.0 (Nexus 5X) at SoLoader.java line 1098.

me too having same issue with version 0.10.3 and Android 11

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/facebook/SoLoader/issues/55#issuecomment-988240877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADO6YVDAFPRD66VVFCELCDUPZUYBANCNFSM4J2NKS4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

thanakij commented 2 years ago

Hi @simpleton, please see the log below:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
    SoSource 0: c.g.b1.d[root = /data/app/com.xxx-QOZMQQzcNNsbGdCAr64Kcw==/lib/arm64 flags = 0]
    SoSource 1: c.g.b1.c[root = null]
    SoSource 2: c.g.b1.d[root = /system/lib64 flags = 2]
    SoSource 3: c.g.b1.d[root = /vendor/lib64 flags = 2]
    Native lib dir: /data/app/com.xxx-QOZMQQzcNNsbGdCAr64Kcw==/lib/arm64
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:997)
       at java.lang.Thread.run(Thread.java:764)

simpleton commented 2 years ago

do you have a reproduction of this crash? if you had, can you check whether the libhermes in the /data/app/com.xxx-QOZMQQzcNNsbGdCAr64Kcw==/lib/arm64?

you're using v0.10.3, right?

thanakij commented 2 years ago

(1) I cannot reproduce this myself.

(2) Because Crashlytics is saying the crash is for line 1098, this should just help confirm that I am using the latest v0.10.3.

I have pinned the version of SoLoader to be 0.10.3 in my android/app/build.xml:

implementation "com.facebook.soloader:soloader:0.10.3+"

(3) Anyway, my estimate is that around 0.08% of my Android users have experienced this crash.

From the pattern in my Crashlytics, trying to make sense out of it, it is likely that only some certain devices are affected.

It means that if this issue affects a user, she will just have a consistent early crash every time when she tries to open the app. But for most users, they wouldn't run into this same issue.

prox2 commented 2 years ago

@simpleton as @thanakij I am having this issue only on android 11 I was facing the issue yesterday and Crashlytics was reporting this crash with the following logs:

 Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
    SoSource 0: com.facebook.soloader.a[root = /data/data/com.xxx/lib-main flags = 1]
    SoSource 1: com.facebook.soloader.c[root = /data/app/~~4hdNB904_wPx4ByZ7-TUcQ==/com.xxx-yEWAHbjKZX3Pd5CctUWLDg==/lib/arm64 flags = 0]
    SoSource 2: com.facebook.soloader.c[root = /vendor/lib64 flags = 2]
    SoSource 3: com.facebook.soloader.c[root = /system/lib64 flags = 2]
    Native lib dir: /data/app/~~4hdNB904_wPx4ByZ7-TUcQ==/com.xxx-yEWAHbjKZX3Pd5CctUWLDg==/lib/arm64
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:262)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:99)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:2)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:100)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:1)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:2)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java)
       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:58)
       at java.lang.Thread.run(Thread.java:923)

I am using implementation "com.facebook.soloader:soloader:0.10.3+"

However when i opened the run logs in android studio i saw the following error after the app crashes

Caused by java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
       at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:90)
       at com.facebook.react.ReactInstanceManager.<init>(ReactInstanceManager.java:237)
       at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:280)
       at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:87)
       at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)
       at com.xxx.MainApplication.onCreate(MainApplication.java:51)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7573)
       at android.app.ActivityThread.access$1500(ActivityThread.java:301)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2169)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8633)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

this error is actually caused by implementation 'com.squareup.okhttp3:okhttp:4.9.2' so what i added i have added

 implementation 'com.squareup.okhttp3:okhttp:4.9.2'
 implementation 'com.squareup.okhttp3:logging-interceptor:4.4.1'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.4.1'

in android/app/build.gradle

then i cleaned the build folder and reinstall the app again and it is working without any crash even no more reported crashes in firebase Crashlytics

Honestly I have no idea how the Crashlytics is reporting fatal error related to soloader while the issue was caused by okhttp

raldred commented 2 years ago

We're seeing crashes for customers using Nexus 5X. RN: 0.64.2 SoLoader: 0.10.1 enableHermes: false jscFlavor: 'org.webkit:android-jsc:+'

do we need to pin soloader to 0.10.3?

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
    SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.residently.app/lib-main flags = 1]
    SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/com.residently.app-wGEqSbt7uvrlwjEyhnlnQQ==/lib/x86 flags = 0]
    SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
    SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
    Native lib dir: /data/app/com.residently.app-wGEqSbt7uvrlwjEyhnlnQQ==/lib/x86
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:896)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:725)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:649)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:629)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
       at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
       at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1024)
       at java.lang.Thread.run(Thread.java:764)
msgharpu commented 2 years ago

We are also seeing similar crashes in Android 10 and 11 devices with RN version = 0.64 and Soloader = 0.8.2.

Is there any update on this bug? or anyone knows of a workaround?

simpleton commented 2 years ago

0.10.3 should fix this issue

On Tue, Jan 11, 2022 at 9:34 PM Mayuresh Gharpure @.***> wrote:

We are also seeing similar crashes in Android 10 and 11 devices with RN version = 0.64 and Soloader = 0.8.2.

Is there any update on this bug? or anyone knows of a workaround?

— Reply to this email directly, view it on GitHub https://github.com/facebook/SoLoader/issues/55#issuecomment-1010653718, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADO6YQQENUZAPEEYVS3IITUVUHFFANCNFSM4J2NKS4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

msgharpu commented 2 years ago

0.10.3 should fix this issue On Tue, Jan 11, 2022 at 9:34 PM Mayuresh Gharpure @.> wrote: We are also seeing similar crashes in Android 10 and 11 devices with RN version = 0.64 and Soloader = 0.8.2. Is there any update on this bug? or anyone knows of a workaround? — Reply to this email directly, view it on GitHub <#55 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADO6YQQENUZAPEEYVS3IITUVUHFFANCNFSM4J2NKS4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>

Thanks @simpleton. Will try this. Could you please point to the PR or commit which fixes this? We don't have a way to repro this bug, hence wanted to look at the change to understand the fix a little more

sn123 commented 2 years ago

This is giving me sleepless nights now - I have an app which keeps getting rejected in review since it crashes on reviewers phone. The phones in question are:

  1. Samsung Galaxy A52, Pixel 4xl - unfortunately, I don't have access to any of these phones and it works on the phones that we do have.

Have pinned soloader to .10.3 implementation 'com.facebook.soloader:soloader:0.10.3+' and also added this in ndk filter as per another bug workaround: ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' Still no dice. Using RN "react-native": "^0.63.4"

Below is the error log in crashlytics:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so
    SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~1r_ebB2J2znWSeO1aO24nw==/com.omozing_developers.omozing_updated-858k-71AkAC-TA0IVHCXyA==/lib/arm64 flags = 0]
    SoSource 1: com.facebook.soloader.DirectApkSoSource[root = null]
    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/~~1r_ebB2J2znWSeO1aO24nw==/com.omozing_developers.omozing_updated-858k-71AkAC-TA0IVHCXyA==/lib/arm64
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
       at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:34)
       at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:17)
       at com.facebook.react.bridge.Arguments.createMap(Arguments.java:155)
       at expo.modules.updates.UpdatesController$1.onBackgroundUpdateFinished(UpdatesController.java:266)
       at expo.modules.updates.loader.LoaderTask$3.onFailure(LoaderTask.java:263)
       at expo.modules.updates.loader.RemoteLoader.finishWithError(RemoteLoader.java:123)
       at expo.modules.updates.loader.RemoteLoader.access$000(RemoteLoader.java:22)
       at expo.modules.updates.loader.RemoteLoader$1.onFailure(RemoteLoader.java:78)
       at expo.modules.updates.loader.FileDownloader$2.onResponse(FileDownloader.java:109)
       at expo.modules.updates.loader.FileDownloader$4.onResponse(FileDownloader.java:243)
       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

aabs are being generated using appcenter to clearing gradle build cache isn't required. Any pointers on what could be done?

simpleton commented 2 years ago

@sn123 do you mind the share the apk that rejected in reviews?

sn123 commented 2 years ago

It’s an aab and not the apk. I don't think sharing it would be an issue - let me know if aab is fine. I did unzip aab and had these folders inside lib: x86, x86_64, arm64-v8a and armeabi-v7a. If you look at crash log, soloader seems to be looking under lib/arm folder which doesn’t exist. In case it matters, Crash log is from crashlytics.


From: Sim Sun @.> Sent: Friday, January 28, 2022 9:25:47 PM To: facebook/SoLoader @.> Cc: Sachin Nigam @.>; Mention @.> Subject: Re: [facebook/SoLoader] SoLoader 0.8.0 couldn't find DSO to load - issue on .apk build (#55)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@sn123https://github.com/sn123 do you mind the share the apk that rejected in reviews?

— Reply to this email directly, view it on GitHubhttps://github.com/facebook/SoLoader/issues/55#issuecomment-1024352813, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADE6NHMQH6BGEOWGPGVHRK3UYK4AHANCNFSM4J2NKS4A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

sn123 commented 2 years ago

@simpleton - here's the link for aab. https://goavega-my.sharepoint.com/:u:/p/snigam/EZjlcSYiklxBooSHmBr7YWcBbBzUuOTEaoCEOiXoSqucHw?e=aAaprM Let me know if you specifically need apk.

sn123 commented 2 years ago

@simpleton - here's the link for aab. https://goavega-my.sharepoint.com/:u:/p/snigam/EZjlcSYiklxBooSHmBr7YWcBbBzUuOTEaoCEOiXoSqucHw?e=aAaprM Let me know if you specifically need apk.

For whatever it's worth - I upgraded react native to 0.67 and was able to get through the review process. I did make quite a few sweeping changes as well so not sure if the issue was just with React Native versions or somewhere else, for e.g. I removed all expo packages and replaced them with regular react native packages. Anyway, hopefully I can sleep peacefully now. I'll leave the aab file out there for anyone who wants to debug it.

abhilakshyadobhal commented 2 years ago

https://github.com/facebook/SoLoader/issues/55#issuecomment-653890808

As mentioned I tried to do this it worked but if in my app's code I'm keeping the condition for checking whether my device is rooted or not it is detecting the device as rooted device.

What fixed it for us what upgrading the SOLoader.

In android/app/build.gradle:

dependencies {
   implementation 'com.facebook.soloader:soloader:0.9.0+'
sarmad6146324 commented 2 years ago

App woking fine in debug but while build release it crashes immediately

react-native-cli: 2.0.1 react-native: 0.67.4

Error E/HwDetectorWithState: a: 3 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.rnespclient, PID: 21704 java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libjscexecutor.so SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.rnespclient/lib-main flags = 1] SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~w2nIgrLTQGqeN-xT7qolwQ==/com.rnespclient-txIJ5efndrtcV97wOdorlA==/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/~~w2nIgrLTQGqeN-xT7qolwQ==/com.rnespclient-txIJ5efndrtcV97wOdorlA==/lib/arm64 result: 0 at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098) at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743) at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24) at com.facebook.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:20) at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(Unknown Source:0) at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:352) at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:319) at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:95) at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42) at com.rnespclient.MainApplication.onCreate(MainApplication.java:55) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1242) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7220) at android.app.ActivityThread.access$1600(ActivityThread.java:265) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2169) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:257) at android.app.ActivityThread.main(ActivityThread.java:8220) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:626) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1015)

jadonhansen commented 2 years ago

I have tested on multiple versions and the issue only starts occuring at android 8.1 and below. How has this issue been open for so long?

Screenshot 2022-04-26 at 20 01 14

I have tried multiple variations of: dependencies { implementation 'com.facebook.soloader:soloader:0.9.0+' and configurations.all { resolutionStrategy { force "com.facebook.soloader:soloader:0.9.0" } with different soloader versions and in the different build.gradle files with no luck.

Very frustrating that we can't support lower end users.

simpleton commented 2 years ago

Are you using Hermes in your app? Does it happen all the time?

On Tue, Apr 26, 2022 at 1:34 PM Jadon Hansen @.***> wrote:

I have tested on multiple versions and the issue only starts occuring at android 8.1 and below. How has this issue been open for so long?

[image: Screenshot 2022-04-26 at 20 01 14] https://user-images.githubusercontent.com/35688233/165387113-e332ab86-a726-42aa-97ea-d468fbc26852.png

I have tried multiple variations of: dependencies { implementation 'com.facebook.soloader:soloader:0.9.0+' and configurations.all { resolutionStrategy { force "com.facebook.soloader:soloader:0.9.0" } with different soloader versions and in the different build.gradle files with no luck.

Very frustrating that we can't support lower end users.

— Reply to this email directly, view it on GitHub https://github.com/facebook/SoLoader/issues/55#issuecomment-1110223971, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADO6YRUANFM7DOOY57CSDTVHBHOLANCNFSM4J2NKS4A . You are receiving this because you were mentioned.Message ID: @.***>

simpleton commented 2 years ago

@jadonhansen it's better to use the latest version.

arjun1194 commented 2 years ago

i am still facing the same problem, issue is not resolved. i am using soloader:0.10.3

tusharsarkar commented 2 years ago

Changed the version to 0.10.1 solve the issue at my end. implementation 'com.facebook.soloader:soloader:0.10.1+'

nagasai65 commented 2 years ago

Changed the version to 0.10.1 solve the issue at my end. implementation 'com.facebook.soloader:soloader:0.10.1+'

It works for me, Thank you @tusharsarkar

nasir-azeemi commented 2 years ago

@tusharsarkar @nagasai65 what RN version are you guys on? facing same issue, soloader is 0.10.3+, and RN is 0.66.0

nagasai65 commented 2 years ago

@tusharsarkar @nagasai65 what RN version are you guys on? facing same issue, soloader is 0.10.3+, and RN is 0.66.0

Same 0.66, make sure remove the plus on suffix implementation 'com.facebook.soloader:soloader:0.10.1+' -> implementation 'com.facebook.soloader:soloader:0.10.1'

This works for me

kirannk-1306 commented 1 year ago

This is giving me sleepless nights now - I have an app which keeps getting rejected in review since it crashes on reviewers phone. The phones in question are:

  1. Samsung Galaxy A52, Pixel 4xl - unfortunately, I don't have access to any of these phones and it works on the phones that we do have.

Have pinned soloader to .10.3 implementation 'com.facebook.soloader:soloader:0.10.3+' and also added this in ndk filter as per another bug workaround: ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' Still no dice. Using RN "react-native": "^0.63.4"

Below is the error log in crashlytics:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so
  SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~1r_ebB2J2znWSeO1aO24nw==/com.omozing_developers.omozing_updated-858k-71AkAC-TA0IVHCXyA==/lib/arm64 flags = 0]
  SoSource 1: com.facebook.soloader.DirectApkSoSource[root = null]
  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/~~1r_ebB2J2znWSeO1aO24nw==/com.omozing_developers.omozing_updated-858k-71AkAC-TA0IVHCXyA==/lib/arm64
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
       at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:34)
       at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:17)
       at com.facebook.react.bridge.Arguments.createMap(Arguments.java:155)
       at expo.modules.updates.UpdatesController$1.onBackgroundUpdateFinished(UpdatesController.java:266)
       at expo.modules.updates.loader.LoaderTask$3.onFailure(LoaderTask.java:263)
       at expo.modules.updates.loader.RemoteLoader.finishWithError(RemoteLoader.java:123)
       at expo.modules.updates.loader.RemoteLoader.access$000(RemoteLoader.java:22)
       at expo.modules.updates.loader.RemoteLoader$1.onFailure(RemoteLoader.java:78)
       at expo.modules.updates.loader.FileDownloader$2.onResponse(FileDownloader.java:109)
       at expo.modules.updates.loader.FileDownloader$4.onResponse(FileDownloader.java:243)
       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

aabs are being generated using appcenter to clearing gradle build cache isn't required. Any pointers on what could be done?

This is giving me sleepless nights now - I have an app which keeps getting rejected in review since it crashes on reviewers phone. The phones in question are:

  1. Samsung Galaxy A52, Pixel 4xl - unfortunately, I don't have access to any of these phones and it works on the phones that we do have.

Have pinned soloader to .10.3 implementation 'com.facebook.soloader:soloader:0.10.3+' and also added this in ndk filter as per another bug workaround: ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' Still no dice. Using RN "react-native": "^0.63.4"

Below is the error log in crashlytics:

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so
  SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~1r_ebB2J2znWSeO1aO24nw==/com.omozing_developers.omozing_updated-858k-71AkAC-TA0IVHCXyA==/lib/arm64 flags = 0]
  SoSource 1: com.facebook.soloader.DirectApkSoSource[root = null]
  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/~~1r_ebB2J2znWSeO1aO24nw==/com.omozing_developers.omozing_updated-858k-71AkAC-TA0IVHCXyA==/lib/arm64
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1098)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:914)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:826)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:773)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:743)
       at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:34)
       at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:17)
       at com.facebook.react.bridge.Arguments.createMap(Arguments.java:155)
       at expo.modules.updates.UpdatesController$1.onBackgroundUpdateFinished(UpdatesController.java:266)
       at expo.modules.updates.loader.LoaderTask$3.onFailure(LoaderTask.java:263)
       at expo.modules.updates.loader.RemoteLoader.finishWithError(RemoteLoader.java:123)
       at expo.modules.updates.loader.RemoteLoader.access$000(RemoteLoader.java:22)
       at expo.modules.updates.loader.RemoteLoader$1.onFailure(RemoteLoader.java:78)
       at expo.modules.updates.loader.FileDownloader$2.onResponse(FileDownloader.java:109)
       at expo.modules.updates.loader.FileDownloader$4.onResponse(FileDownloader.java:243)
       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

aabs are being generated using appcenter to clearing gradle build cache isn't required. Any pointers on what could be done?

Hi @sn123, Please let me know if you found any solution to fix this app crash issue.

DevVibhor commented 1 year ago

Facing the same issue in RN 0.63.2 I have tried with all different versions of soloader mentioned above but still no luck. In my case, it is crashing for Android 10 devices in debug and release mode. This issue first came to me right after switching to Mac M1 from Intel Mac.

swaroopaillinda commented 1 year ago

Hi facing same issue did anyone find solution for this

DevVibhor commented 1 year ago

I've solved this issue by doing this, https://stackoverflow.com/a/74486848/20503822

98rahul commented 1 year ago

couldn't find DSO to load: libhermes.so caused by: dlopen failed: library "libjsi.so" not found: not solved by changing the above different soloader version mention . Have anyone able to resolve this error.

unicornRainbows commented 1 year ago

I also have the same issue..

98rahul commented 1 year ago

I also have the same issue..

better to move with latest version RN-0.71.1 and chill 🎉🎉

unicornRainbows commented 1 year ago

I also have the same issue..

better to move with latest version RN-0.71.1 and chill 🎉🎉

I wish I could, but react-native-vision-camera doesn't support it yet..

miteshdb commented 1 year ago

Having same problem. React Native : 0.64.4 implementation 'com.facebook.soloader:soloader:0.9.0+'

malikzype commented 1 year ago

Facing the same issue... none of the solutions worked.

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so SoSource 0: com.facebook.soloader.a[root = /data/data/...../lib-main flags = 1] SoSource 1: com.facebook.soloader.d[root = /data/app/~~MPKzZHrXvYC8_UVhanEkkg==/......-3O2d9zcsgjcplUI6W_P4_A==/lib/arm64 flags = 0] SoSource 2: com.facebook.soloader.d[root = /system/lib64 flags = 2] SoSource 3: com.facebook.soloader.d[root = /vendor/lib64 flags = 2] Native lib dir: /data/app/~~MPKzZHrXvYC8_UVhanEkkg==/....-3O2d9zcsgjcplUI6W_P4_A==/lib/arm64

RubenPM-dev commented 1 year ago

better to move with latest version RN-0.71.1 and chill 🎉🎉

I'm having the same issue on 71.7 on Android 9 to 12

shailesh-galgal commented 1 year ago

Anyone’s got any solution?

RodolfoGS commented 1 year ago

Issue continues with the latest soloader version (com.facebook.soloader:soloader: 0.10.5) Devices impacted are 100% Google Nexus 5X And all devices dispatch 2 crashes, one with libhermes.so and the other one with libreactnativejni.so

react-native: 0.72.4

I uncompressed the APK and both files exists in lib/x86/:

couldn't find DSO to load: libhermes.so

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
  SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/__hidden__/lib-main flags = 1]
  SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/__hidden__-Puw4sCzSdJ_xR3BEfMgpxA==/lib/x86 flags = 0]
  SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
  SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
  Native lib dir: /data/app/__hidden__-Puw4sCzSdJ_xR3BEfMgpxA==/lib/x86
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1228)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:1044)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:956)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:903)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
       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:379)
       at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:325)
       at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:96)
       at expo.modules.ReactNativeHostWrapperBase.createReactInstanceManager(ReactNativeHostWrapperBase.kt:32)
       at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:42)
       at host.exp.exponent.MainApplication.onCreate(MainApplication.java:113)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
       at android.app.ActivityThread.-wrap1()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6494)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

couldn't find DSO to load: libreactnativejni.so

Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so
  SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/__hidden__/lib-main flags = 1]
  SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/__hidden__-Puw4sCzSdJ_xR3BEfMgpxA==/lib/x86 flags = 0]
  SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
  SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
  Native lib dir: /data/app/__hidden__-Puw4sCzSdJ_xR3BEfMgpxA==/lib/x86
 result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1228)
       at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:1044)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:956)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:903)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
       at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:34)
       at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:17)
       at com.facebook.react.bridge.Arguments.createMap(Arguments.java:159)
       at expo.modules.updates.statemachine.UpdatesStateContext.getWritableMap(UpdatesStateContext.kt:53)
       at expo.modules.updates.UpdatesController.sendUpdateStateChangeEventToBridge(UpdatesController.kt:561)
       at expo.modules.updates.statemachine.UpdatesStateMachine.sendChangeEventToJS(UpdatesStateMachine.kt:65)
       at expo.modules.updates.statemachine.UpdatesStateMachine.processEvent(UpdatesStateMachine.kt:47)
       at expo.modules.updates.UpdatesController$start$1.onRemoteCheckForUpdateStarted(UpdatesController.kt:285)
       at expo.modules.updates.loader.LoaderTask.launchRemoteUpdateInBackground$lambda$1(LoaderTask.kt:338)
       at expo.modules.updates.loader.LoaderTask.$r8$lambda$jwzCL9xjo0jbCNnExNO-hPCX6iI()
       at expo.modules.updates.loader.LoaderTask$$ExternalSyntheticLambda1.run(:6)
       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)
rathorevaibhav commented 5 months ago

hi. Is there any update on a possible solution for this? I'm building an app and seeing the same issue for Android 10 users.

  1. react-native: 0.70.6 (can't upgrade immediately due to a lot of dependent packages)
  2. enableHermes is set to false (setting it to true is crashing video-calling feature through Jitsi)

Screenshot from Crashlytics

image