Closed Pingou closed 3 weeks ago
➤ PM Bot commented:
Jira ticket: RJS-2906
I am also facing this issue on iOS only. I had upgraded sdk from 12.6.2 to 12.13.1, then downgraded from 12.13.1 to 12.11.1 but I still see this issue. I use realm just for local operations. What is the recommended upgrade path and fix here?
@kraenhansen is there anyway to catch this error and do something with the database? The error comes from the C code right?
This version of the database file format (9) is 4 years old (from Realm Core v5).
Beginning with RealmCore v14.0.0, you can only upgrade from version 10 and upwards. This means you'd have to pick a version of Realm JS using a Realm Core version lower than v14 to first upgrade the client and then upgrade Realm JS to a recent version in their app.
Sorry for the inconvenience this may cause, but it's an important goal of ours to keep the binary size of Realm Core low and removing migration logic to upgrade database files from ancient file format versions is one way to keep the size of the library low.
@kraenhansen Thank you for the reply. I think you should have a very big warning on the github page, because it means that many users will lose all their data as there is no way to ensure that they will regularly update the app (unless you want to bypass Apple and Google and do some autoupdate thing, and even then it wouldn't work all the time). I appreciate all the work you've done but since I started using realm 7 years ago I wasted weeks on various issues (and I don't even need the complicated features), which is why I stay away from realm for all my new projects. Sorry to be negative for something provided for free, I really appreciate but I am very frustrated.
many users will lose all their data as there is no way to ensure that they will regularly update
There is no requirement to regularly update. Although admittedly hard to pull off, you'd need to ensure the app gets upgraded in steps that are able to upgrade the file format along the way. You would need a way to control that very old versions upgrade to some "intermediate" version of your app first, before it takes the latest version. Some tools can achieve this through release channels, having a "legacy" and a latest channel, where you cannot upgrade from legacy to latest until you're on the latest version of "legacy". That being said, this is understandably frustrating to have to deal with as a developer - I agree this could have been better designed on our part.
I appreciate all the work you've done
Thanks 🙂 It's been a blast.
which is why I stay away from realm for all my new projects.
Since the project will EOL and not longer receive active maintenance, in less than a year from now, that's probably a wise choice 👍
Sorry to be negative for something provided for free, I really appreciate but I am very frustrated.
No worries: You're entirely entitled to your opinion and thanks for calling this out. We need feedback to improve (both positive and negative).
@kraenhansen As far as I know there is no way to choose which binary to serve your users when they upgrade, it's all controlled by Apple and Google (I am talking about apps releasing on the app stores). They will always be served the last compatible versions (as in, compatible with their Android version). I do not use the sync or Atlas feature, it's unclear if I'm impacted by their deprecation.
How frequently does the bug occur?
Sometimes
Description
Some users are crashing with the Error: Database has an unsupported version (9) and cannot be upgraded, js engine: hermes message. Does that mean that if a user has an old version of my app because they disabled automatic updates, then they are s.o.l?
Stacktrace & log output
Can you reproduce the bug?
No
Reproduction Steps
No response
Version
12.13.1
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android, rn 74.5
Build environment
Which debugger for React Native: ..
Cocoapods version
No response