realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

App crashing #7724

Closed arifur-nureca closed 1 year ago

arifur-nureca commented 1 year ago

How frequently does the bug occur?

Seen sometimes

Description

App is getting crash frequently for some of the users. This issues started cropping up when android build tools and realm versions were updated.

Sync Configuration:

SyncConfiguration.Builder(mongoDbApp!!.currentUser(), appGroupId) .clientResetHandler(crHandler) .schemaVersion(Constants.REALM_SCHEMA_VERSION) .allowQueriesOnUiThread(true) .allowWritesOnUiThread(true) .errorHandler { session, error -> Log.d("RealmErrorMain",error.toString()) } .build()

Stacktrace & log output

Fatal Exception: java.lang.RuntimeException: Unable to create application <package_name>: 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:6107)
       at android.app.ActivityThread.-wrap1()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1814)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:200)
       at android.app.ActivityThread.main(ActivityThread.java:6971)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Can you reproduce the bug?

Not yet

Reproduction Steps

No response

Version

10.11.1

What SDK flavour are you using?

MongoDB Realm (i.e. Sync, auth, functions)

Are you using encryption?

No, not using encryption

Platform OS and version(s)

Android ( 8.1.0, 11, 12)

Build environment

Android Studio version: Android Studio Chipmunk | 2021.2.1 Patch 2 Build #AI-212.5712.43.2112.8815526, built on July 10, 2022 Android Build Tools version: 7.2.2 Realm Version: 10.11.1

edualonso commented 1 year ago

Hi @arifur-nureca. This seems to be a clone of https://github.com/realm/realm-java/issues/6727.

The arm library is included in the AAR file - see https://search.maven.org/artifact/io.realm/realm-android-library/10.11.1/aar. Based on the messages written in the other issue the problem might be related to how your app is built, perhaps you also changed something in that regard together with the library updates?

I will close this ticket. Please refer to the other one unless you can provide us with a way to reproduce your problem, in which case feel free to reopen it with a detailed description on how to reproduce the error.