realm-java: io.realm.exceptions.RealmError: Unrecoverable error. open() failed: No such file or directory in io_realm_internal_SharedGroup.cpp line 188
Hi,
I keep getting the above error in my app(crashes) when I logout and re-login.
Using the realm config
realmConfiguration = new RealmConfiguration.Builder(this) .name("hombotdata.realm") .deleteRealmIfMigrationNeeded() .schemaVersion(1) .build(); Realm.setDefaultConfiguration(realmConfiguration);
On logout, I close out all open instances of realm and delete the realm database using
Realm.deleteRealm(realmConfiguration);
Even though the app crashes, when I reopen it, it’s succesfully logged in(Session data is stored and the app is able to resume the session). How do I fix it?
StackTrace: io.realm.exceptions.RealmError: Unrecoverable error. open() failed: No such file or directory in io_realm_internal_SharedGroup.cpp line 188 at io.realm.internal.SharedGroup.nativeCommitAndContinueAsRead(Native Method) at io.realm.internal.SharedGroup.commitAndContinueAsRead(SharedGroup.java:99) at io.realm.internal.ImplicitTransaction.commitAndContinueAsRead(ImplicitTransaction.java:60) at io.realm.internal.SharedGroupManager.commitAndContinueAsRead(SharedGroupManager.java:116) at io.realm.BaseRealm.commitTransaction(BaseRealm.java:292) at io.realm.Realm.commitTransaction(Realm.java:108) at com.vikilabs.hombot_android.home.HomeModel$3.onResponse(HomeModel.java:141) at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:65) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:155) at android.app.ActivityThread.main(ActivityThread.java:5721) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 39 (22 by maintainers)
Hi guys, Today I’m still facing this is issue, can anyone help to have a look? `FATAL EXCEPTION: main
My code:
The log points that crash occur when I call `realm.commitTransaction();