I'm trying to insert records into realm objects. The records am getting from the backend and am storing it in locally. Insertion is working perfectly, but when i try to read from realm am getting
"Opening Realm files of format version 0 is not supported by this version of Realm"
Am trying to store multiple records from backend to the app,. When i remove few API requests, everything is working fine. but for some response, am getting the above error, . The fact is that, writing is working perfectly but not reading. Once i get above error in read method, then everytime am getting same error in all scenarios
It should not crash
App is crashing when try to open Realm in for select.
Regards
Anson
@ansontp22 Did you upgrade from a previous version of Realm JS? If yes, which version?
@kneth Yes, I've upgraded to latest, Current version is 6.0.2. Am facing this issue when I try to insert multiple records.
Scenario : I'm calling a server api to fetch the data and insert in locally. Api's are same but with multiple get requests. And the response structure also same.
ex;
API 1: http://localhost:8081/api/data?id=1
API 2: http://localhost:8081/api/data?id=2
API 3: http://localhost:8081/api/data?id=3
API 4: http://localhost:8081/api/data?id=4
If i call 4 api's and inserting into local , am getting success, but when i read, it will throw above error. If i call single api and do the same, i won't get any error.
@kneth I downgraded the version to 5.0.5 and it seems working. I am not able to see this error anymore. Hope it will work fine. I think this is the problem with latest version.
@ansontp22 Thanks for the update, and helping us by picking to which version it is.
@kneth No problem. So is this an issue with latest version? If yes, when can expect the fix
@ansontp22 This sounds similar to https://github.com/realm/realm-java/issues/6889. Are you using an encrypted Realm?
@cmelchior Yes, am using encryption.
Thank you. It in that case it is most likely the same. We are still investigating, but have not found the root cause yet.
@cmelchior Thanks. As of now I've downgraded the version and it is working,.
We had this happen on one device today. We are using RealmSwift via pod. I tried specifying the version on our pod file, but nothing works. Not even '5.3.1' which says it's the most recent. How can we down grade?
Also, in this case, the default.realm db went from 537 KB on July 13th, to 74.6 MB today (when we hit the crash).
We are encrypted and I can open the db from the 13th, but I get this error in Realm Studio on todays file.
How do I downgrade my version of RealmSwift?
We have encountered the same thing with RealmSwift migrating from 3.21to 5.0.1
We're using Realm as a Swift Package, and are using encryption.
@cmelchior what version would be recommended to be considered stable with this issue?
@cmelchior @petehoch after encountering the issue on RealmSwift, this might be an issue with migrating to 5.0.0 and bumping Realm.ConfigurationSchemaVersion at the same time.
I've provided more information in the related realm-cocoa issue: https://github.com/realm/realm-cocoa/issues/6638
@cmelchior Please fix this our users are unable to use our critical matter application due this bug.
Root cause of this issue has now been found.
Duplicate of https://github.com/realm/realm-java/issues/6889
Most helpful comment
@cmelchior Please fix this our users are unable to use our critical matter application due this bug.