-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crashes with FORMAT_UPGRADE_REQUIRED while using Realm 7.0.0 #6889
Comments
How are you opening the Realm? |
DB configuration :
While navigating between the modules its crashing at |
Weird. The error message seems to indicate that you are opening an older already existing file. Is that the case? |
It's crashing while navigating from one module to another after some modifications. We have used Realm v6.1.0. This issue is observed when upgraded to v7.0.0 . |
The same scenario is working fine with Realm v6.1.0 |
Will there be any issue if we use following method in 7.0.0 val realm: Realm = Realm.getDefaultInstance() |
Hi.Any update on the above issue? We are facing the above crash with above error in multiple places . |
I have noticed this error too. We have only upgraded realm version and did not touch schema itself.
Other devices seemed to work fine, but this is quite critical. |
Exactly the same issue on our side, reproduced on my Pixel 3 on Android 9. |
@ganfra Can you share how to reproduce? If you want to keep it private you can email me at christian.melchior@mongodb.com |
If you are brave enough you can test it on our open-source project: https://github.com/vector-im/riotX-android |
So I created a test account where you will be able to reproduce the error: You should use the develop branch. So here is how to reproduce
Tell me if you need more information :) |
@cmelchior : any chance you could look at it? |
@ganfra Thank you for the project. I am able to reproduce the problem. We are looking into it. A few things ruled out:
|
Did you have any lead on what could be wrong? |
@cmelchior Would appreciate any update on this. Unfortunately, we too face this issue after upgrading from v6.1.0 to v7.0.0. It has resulted into hundreds of crashes reported in Firebase in barely few hours. |
@patelnishantk Unfortunately we still don't have a root cause for this. |
We are experiencing the same issue with a single client. |
@ganfra Be aware that already corrupted databases won't be restored (in my case). We had to create a special app to export critical data from our apps. Far from ideal and a bit humiliating. :( I would like to see the Realm team speaking more about it. @jedelbo Could you please refer to the PR? Was it in the core? |
Be aware that the file is not corrupted.We just fail to read the file correctly. The issue was fixed in realm/realm-core#3910. |
@jedelbo I did export 3 databases + encryption keys and I could not open any of them on Realm Studio. All of them where around 700mb for an unknown reason. That's why I suspect that the file was corrupt. |
Same issue of 700mb size, but I did manage to see this issue before releasing the app, so no problem for me... |
@ganfra so you see an unexpected increase in size? How big a difference is there compared to earlier? |
Generally the file is 150mb in this usecase. Multiple time after this crash it grows to 700mb as I said. |
@jedelbo Could you please confirm if the latest version is capable of opening these large databases and if it's able to reduce the file size? I saw that you recently did a change in the core but this version on this library is not out, is there any way to release this version anytime soon? |
The Java team is working out getting the release out later today. We are able to handle realms of any practical size. You can use CompactOnLaunch to reduce the size of a realm. However we are of course interested in keeping the size of the realm down, so we would be interested in investigating why you experience this growth in size. So would you be willing and able to share a 'before' and 'after' realm with us? You can share the files privately by mail (jorgen.edelbo@mongodb.com). |
I think @ganfra will be able to provide a database, I could not replicate the issue on my side and the data that I have cannot be shared. |
@jedelbo Any update? |
@cmelchior The version 7.0.2 didn't sort the issue. We are going to update it to version 7.0.5. The situation is bad. |
We will be making a 7.0.6 release in the next few hours that should have a fix for this. |
You should wait for v7.0.6. It should be just around the corner. |
Is there any kind of public pipeline we can monitor to get an idea of when things will release? |
You can watch releases on Bintray here: https://bintray.com/realm/maven/realm-android-library |
7.0.6 was just released which should fix this. Please reopen the issue if you still see it after upgrading. |
@cmelchior The version 7.0.6 is still not available, any timeframe or workaround for the moment? |
It should be available now. |
Ok so now I can't reproduce, looking good! Thanks for this long-awaited fix! |
@ganfra Hi, were you able to open that 700mb realm file too? |
Didn't try, but I got a SEGFAULT 11 and a corrupted file just after, so shout victory too quickly... |
@ganfra Very nice, imagine living in a world where the database of your application gets corrupted due to a bug. |
@ganfra Some users were able to restore the app. I got one case where the app wasn't able to load the database. |
@ppamorim thanks for letting me know, but I just keep getting native crashes on some other parts |
Hi Team, We are getting this crash in our production. Not able to reproduce though. Any solutions ? CRASH TYPE SUMMARY Note: We are using the 7.0.8 realm version Thanks |
@sampathkumar1988 Seems like you are opening a file produced by a newer version of realm with a rather old version. |
We have been using Realm from the past year, We recently upgraded the application from V6.1.0 to V7.0.0, post this upgrade we are witnessing the crash mentioned, we are using Kotlin for application development with Realm java and lastly, we have enabled DB encryption
Process: com.com.myapp.Application.qa, PID: 31558
java.lang.RuntimeException: Unable to create application com.myapp.Application: io.realm.exceptions.RealmFileException: Opening Realm files of format version 0 is not supported by this version of Realm (Database has an unsupported version and cannot be upgraded
Exception backtrace:
(/data/data/com.myapp.Application:/files/myapp.realm) in /Users/cm/Realm/realm-java-release/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 107 Kind: FORMAT_UPGRADE_REQUIRED.
at io.realm.internal.OsSharedRealm.nativeGetSharedRealm(Native Method)
at io.realm.internal.OsSharedRealm.(OsSharedRealm.java:175)
at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:251)
at io.realm.BaseRealm.(BaseRealm.java:137)
at io.realm.BaseRealm.(BaseRealm.java:104)
at io.realm.Realm.(Realm.java:163)
at io.realm.Realm.createInstance(Realm.java:499)
at io.realm.RealmCache.createInstance(RealmCache.java:507)
at io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:473)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:414)
at io.realm.Realm.getDefaultInstance(Realm.java:407)
The text was updated successfully, but these errors were encountered: