realm-java icon indicating copy to clipboard operation
realm-java copied to clipboard

Could not find 'librealm-jni.so'. Looked for: [arm64-v8a], but only found: []

Open KunNiu opened this issue 2 years ago • 6 comments

How frequently does the bug occur?

Sometimes

Description

I'm using version 10.11.1, and found the crash happened 5 times on a same device.

Fatal Exception: java.lang.RuntimeException: Unable to create application com.dw.android.mukbee.App: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librealm-jni.so'. Looked for: [arm64-v8a], but only found: [].
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6465)
       at android.app.ActivityThread.access$1300(ActivityThread.java:219)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7356)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librealm-jni.so'. Looked for: [arm64-v8a], but only found: [].
       at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java:173)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:180)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:57)
       at io.realm.internal.RealmCore.loadLibrary(RealmCore.java:60)
       at io.realm.Realm.initializeRealm(Realm.java:348)
       at io.realm.Realm.init(Realm.java:263)
       at com.dw.android.mukbee.App.initRealm(App.java:89)
       at com.dw.android.mukbee.App.onCreate(App.java:73)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
       at android.app.ActivityThread.access$1300(ActivityThread.java:219)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7356)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Device: Google Mainline Android 10

I also checked my apk file, and I can find the 'librealm-jni.so' file. 图片

Stacktrace & log output

See "Description" part.

Can you reproduce the bug?

No

Reproduction Steps

Only found crash logs on firebase Crashlytics.

Version

10.11.1

What Atlas App Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Android Android 10

Build environment

Android Studio version: Android Studio Electric Eel | 2022.1.1 Patch 2 Android Build Tools version: "29.0.3" Gradle version: "7.1.3"

KunNiu avatar May 14 '23 14:05 KunNiu

In my project we've been seeing this issue plenty of times, mainly for Android 6 and Android 8 - there were actually no occurrences for Android > 10. For what I know several other people have also noticed that as there are some reports on other sites. And I believe this ticket is a duplicate of https://github.com/realm/realm-java/issues/6812

rmaciejczyk avatar May 14 '23 14:05 rmaciejczyk

➤ clementetb commented:

Hi, thanks for reporting the issue. Are you publishing the app via app bundle or APK?

sync-by-unito[bot] avatar May 15 '23 09:05 sync-by-unito[bot]

I always use app bundle.

KunNiu avatar Jun 05 '23 01:06 KunNiu

Do you have any update on that? There is a growing number of such issues in my projects, mainly for Android < 8.x. And we also always use app bundles.

rmaciejczyk avatar Jun 19 '23 14:06 rmaciejczyk

same issue

java.lang.RuntimeException: Unable to create application com.myapp.MainApplication:  com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librealm-jni.so'. Looked for: [arm64-v8a, armeabi-v7a, armeabi], but only found: [].
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6998)
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2228)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:210)
                                                                                                    	at android.os.Looper.loop(Looper.java:299)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8136)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)
                                                                                                    Caused by: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librealm-jni.so'. Looked for: [arm64-v8a, armeabi-v7a, armeabi], but only found: [].
                                                                                                    	at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java:173)
                                                                                                    	at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:180)
                                                                                                    	at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
                                                                                                    	at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
                                                                                                    	at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:57)
                                                                                                    	at io.realm.internal.RealmCore.loadLibrary(RealmCore.java:60)
                                                                                                    	at io.realm.Realm.initializeRealm(Realm.java:318)
                                                                                                    	at io.realm.Realm.init(Realm.java:261)
                                                                                                    	at com.myapp.MainApplication.onCreate(MainApplication.java:97)
                                                                                                    	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1277)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6992)
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2228) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:210) 
                                                                                                    	at android.os.Looper.loop(Looper.java:299) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8136) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028) 

haozhutw avatar Jul 11 '23 02:07 haozhutw

Could you try doing this: https://github.com/realm/realm-java/issues/6812#issuecomment-1637585048

clementetb avatar Dec 04 '23 11:12 clementetb