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

When I upgraded the realm version from 5.12.10 to 6.1.0, some mobile phones crashed:Realm file decryption failed Path: But other realm databases using the same key can be used normally #7678

Closed gaoxibing closed 1 year ago

gaoxibing commented 2 years ago

How frequently does the bug occur?

Sometimes

Description

io.realm.exceptions.RealmFileException: Unable to open a realm at path '/data/data/com.test.softda/files/realm/encrypt_testsearch.realm': Realm file decryption failed Path:Exception backtrace:

. (Realm file decryption failed Path: /data/data/com.test.softda/files/realm/encrypt_testsearch.realm Exception backtrace: ) (/data/data/com.test.softda/files/realm/encrypt_testsearch.realm) in /Users/cm/Realm/realm-java-release/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 101 Kind: ACCESS_ERROR. at io.realm.internal.OsSharedRealm.nativeGetSharedRealm(OsSharedRealm.java:-2) at io.realm.internal.OsSharedRealm.(OsSharedRealm.java:171) at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:241) at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:231) at io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:337) at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:290) at io.realm.Realm.getInstance(Realm.java:428) ### Stacktrace & log output _No response_ ### Can you reproduce the bug? Not yet ### Reproduction Steps _No response_ ### Version 6.1.0 ### What SDK flavour are you using? Local Database only ### Are you using encryption? Yes, using encryption ### Platform OS and version(s) MI8,NOH-AN00 ### Build environment Android Studio version: ... Android Build Tools version: ... Gradle version: ...
bmunkholm commented 2 years ago

Hi @gaoxibing. Thanks for reporting! Have you gotten any further with reproducing this? Unfortunately there isn't a lot of info to get to a point of troubleshooting this at the moment.

edualonso commented 1 year ago

Closed due to inactivity. Please reopen if the problem still persists.

joaodevsantos commented 11 months ago

I'm facing the same issue by now, I've moved from version 7.0.6 to version 10.15.0 and I think that caused the same issues. It's weird because it's only occurring in a small number of users and randomly it seems like.