BadChangeset Error after migrating from legacy Realm Sync

After migrating legacy Realm Sync data to Atlas, I keep running into this error in my MongoDB Realm logs:

BadChangeset Error: failed to validate upload changesets: failed to validate Set instruction: cannot have index (0) greater than or equal to prior-size (0) (ProtocolErrorCode=212)

I get this error after doing the following:

  1. Migrate data to MongoDB Realm using the steps in this guide:

  2. Login user and read data from MongoDB Realm.

  3. Perform updates on the data that was migrated over.

I’ve searched around, but haven’t seen any discussion around this particular error message. I’m not sure if it has to do with a schema mismatch between the legacy JSON I inserted into Atlas and my client-side Realm Objects or if it’s something else.

Additive and destructive changes don’t seem to be an issue, but updates throw this error.

I’m using RealmSwift 10.4.0 and RealmJS 6.1.4 to migrate over legacy data.

Any help is greatly appreciated!

After updating to RealmSwift 10.5.0, I don’t seem to run into this issue anymore

Yes RealmSwift 10.4+ has a fix for that error


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.