Incompatible histories. Expected a Realm with no or in-realm history, but found history type 3
Can anyone explain what this error means and why it is not possible to open the realm file ?
This is a realm file created using Realm.writeCopy() and then opened as a local realm file.
Any workaround for this ?
Thanks
1 Like
BTW we are using realm-cocoa 10.17.0 and the file opens just fine using Realm Studio 11.1.0
Also encountered this. There’s still very little information about this issue out there. I can’t seem to find any official documentation about what a “history” of a realm file is exactly. I contacted Mongo support about this and they referred me to this conversation: Error when opening Realm backup file: "Incompatible histories. Expected a Realm with no or in-realm history, but found history type 3" · Issue #7513 · realm/realm-swift · GitHub. In there it’s implied that one reason this happens is if you try to open a sync realm in a non-sync-read/write mode. In my case, I tried to open a sync realm file as a Dynamic Realm.
And FYI: In the Java SDK for Android (Realm 10.11.0), there’s a function SyncConfiguration.forRecovery(…) which can give you a realm config with which you can open sync realm files as dynamic realms.