-
Notifications
You must be signed in to change notification settings - Fork 62
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
UnsatisfiedLinkError: couldn't find "librealmc.so" #1202
Comments
Hi @KennethRichards Since this only happens on some devices it could be that the so-file for some reason is stripped by Google play when installing the app. Do you have more insight in:
|
Hi @rorbech |
Hi @KennethRichards. Thanks for the feedback. Are you by any chance distributing other native libraries than ours in your app? We have seen that if some other library is not available for the exact architecture then it can end up only looking for 32-bit libraries on a 64-bit device, and that library could have been stripped as part of the repackaging in playstore. |
Hi @rorbech, I checked the Github repos from the other dependencies in our app but did not find any indication of native libraries. To be honest I'm not quite sure how else to check/verify this. When inspecting the APK though, I can see that |
We have seen a similar problem with Realm Java, and the root cause is still unclear. It is pretty rare, but our best guess is that either APK's are being side-loaded in the wrong way or the Play Store doesn't send down the correct files. Currently, in Realm Kotlin, we are just loading the native lib in a naive way, which should work, but has a few known edge cases, #1215 will introduce a slightly better way, but it isn't a 100% guarantee it will fix this issue. |
Hi all, we got a few reports of this issue. Here is some data if it helps.
|
Hi all, got a new stack trace related to the above.
|
Hi all, we also had the same issue,
Exception
|
This error happens every time an APK is extracted from the app installed from PlayStore. Realm 1.9.1, Android 13.
|
We have around 350 crashes with the same exception, starting with the realm-kotlin integration. The device range and system are mixed. Not only rooted devices.
|
The problem with this error is that we think this is related to the Playstore distribution and App Bundles and sometimes the app store sends the wrong thing to devices. Unfortunately, this is basically impossible to test and we have never been able to reproduce it. At the same time, we have seen people manually distributing the wrong app bundles to devices, but this normally happens with custom app distribution frameworks or rooted devices where you try to sideload an APK. That said, we just pushed a change that is available in So just to be 100% sure this library is not involved in these bugs, it has now been disabled. Apart from that, the solution we have seen working is to disable App Bundles, unfortunately, the tradeoff there is an increase in APK size. |
Are there any updates on this issue or the proposed fix of disabling app bundles? We are also experience this error in one of our production apps. Devices are for example OnePlus 9 5G with Android 14; Realm Kotlin version currently 1.12.0. Maybe there are fixes in an already released version? The issue is still set to be open therefore I assume it's not fixed yet? |
We are also facing this issue. So far we've seen crashes on Galaxy A14 5G Android 13 and Nexus 5x Android 8. |
Same problem on OnePlus 9 Android14, on an Kotlin Multiplatform project.
Inside my APK
|
New devices with this error Fatal Exception: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dlopen failed: library "librealmc.so" not found and Google, Pixel 6 Pro, Android 12 Fatal Exception: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dlopen failed: library "librealmc.so" not found |
I created an Google Issue See loginCompleted. |
Same problem on OnePlus 6 Android11, Transsion Note 12 Android13, and Oppo Realme Narzo 30 Android12 on an Android project. Crash occured for 32 times.
|
Same here on Nexus 5X (Android 8.1.0) and Pixel 6 Pro (Android 12):
|
Based on this reply, if it's really because of the Play Store Distribution: Maybe the cause is based on users downloading the app's from third party stores and not from the official Play Store and therefore this file is missing on their installations? Has anyone subscribed to this topic been able to reproduce this issue? I assume that everyone here is just posting the stacktraces from the crash monitoring of their choice |
I've not been able to reproduce it personally but would like to suggest we rule out the third party stores theory: I get the crashes reported within hours of posting a new release, which I only publish to the Play Store. Unless some third party store picks it up immediately, these are Play Store installations. Also, the ratio of these crashes for me is about 0.1% of my active users. That's not too bad, but it's still frustrating. I also noticed that Google closed the ticket that was mentioned earlier. |
I have precisely the same crash, and also Nexus 5X Android 8.1.0. Also cannot re-produce on emulator. |
SDK:
realm-kotlin
Version:
'io.realm.kotlin:library-sync:1.5.0', 'io.realm.kotlin:gradle-plugin:1.5.0'
Observations
How frequent do the crash occur?
Subset of users
Does it happen in production or during dev/test?
Production
Can the crash be reproduced by you?
No. I was unable to reproduce in the Android Emulator on Nexus 7 - Android 8.1
Can you provide instructions for how we can reproduce it?
Seems to be occuring on app launch when calling
App.create()
From Firebase Crashlytics:
Nexus 5X - Android 8.1.0
Galaxy Tab A - Android 7.1.2
In the APK, librealmc.so exists in
/lib/x86_64
/lib/x86
/lib/arm64-v8a
/lib/armeabi-v7a
The text was updated successfully, but these errors were encountered: