You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use latest 0.78 jar library. I need encryption on my realm db, but i get error after app closed and released from memory.
java.lang.RuntimeException: Unspecified exception. Invalid database in io_realm_internal_SharedGroup.cpp line 101
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Unspecified exception. Invalid database in io_realm_internal_SharedGroup.cpp line 101
at io.realm.internal.SharedGroup.createNativeWithImplicitTransactions(Native Method)
at io.realm.internal.SharedGroup.(SharedGroup.java:55)
at io.realm.Realm.(Realm.java:159)
at io.realm.Realm.createAndValidate(Realm.java:441)
at io.realm.Realm.create(Realm.java:418)
at io.realm.Realm.getInstance(Realm.java:336)
The text was updated successfully, but these errors were encountered:
I use encryption. I use code below while get realm instance: byte[] key = new byte[64]; new SecureRandom().nextBytes(key); realm = Realm.getInstance(this, "name", key);
No, i don't delete realm file after calling getInstance(). This exception occurs exactly on getInstance() line.
I try to open non-default file but don't try non-default folder.
It looks like you're trying to access the Realm file with a different key every time since you don't provide a seed to SecureRandom. That will of course provoke the error you reported.
Thank you, it was my bad. But i do exactly what i saw in docs. Please update docs, because there still Using Encryption requires building Realm from source. and used 32 length byte array for key.
I use latest 0.78 jar library. I need encryption on my realm db, but i get error after app closed and released from memory.
java.lang.RuntimeException: Unspecified exception. Invalid database in io_realm_internal_SharedGroup.cpp line 101
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Unspecified exception. Invalid database in io_realm_internal_SharedGroup.cpp line 101
at io.realm.internal.SharedGroup.createNativeWithImplicitTransactions(Native Method)
at io.realm.internal.SharedGroup.(SharedGroup.java:55)
at io.realm.Realm.(Realm.java:159)
at io.realm.Realm.createAndValidate(Realm.java:441)
at io.realm.Realm.create(Realm.java:418)
at io.realm.Realm.getInstance(Realm.java:336)
The text was updated successfully, but these errors were encountered: