realm-core: Bad Realm file header (#3)
One of realm-java user gets crashes with below backtrace
Fatal Exception: io.realm.exceptions.RealmFileException: Unable to open a realm at path '/data/data/com.xxx.android/files/xxxxx.realm': Bad Realm file header (#3). in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 81
at io.realm.internal.SharedRealm.nativeGetSharedRealm(SharedRealm.java)
at io.realm.internal.SharedRealm.getInstance(SharedRealm.java:178)
at io.realm.internal.SharedRealm.getInstance(SharedRealm.java:155)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:124)
at io.realm.Realm.getInstance(Realm.java:228)
It happens to Android 6.0
,4.4.4
,5.0.2
.
It cannot be reproducible from user side right now.
around 0.05% users met this issue.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 47 (22 by maintainers)
That seems highly unlikely. But I suggest we log what in the header is considered wrong, and possibly the whole header so we can see if it’s been completely overwritten in some way. (Tracking here: https://github.com/realm/realm-core/issues/3075)
I have updated to 5.0.0 and the issue still exists. Is there a workaround?
@ironage No realm file is not encrypted.