Changesets are used to make two Realms consistent, and they are an integral part of our sync mechanism. In theory, a bad changeset should never be generated. However, this can happen under rare circumstances.
If you ever see a bad changeset error, it is best to contact our support team. When contacting them, please provide the following:
- Version information for both your client SDK and Realm Object Server (if cloud, just provide your instance URL)
- Client logs -- these are the logs available from your mobile client, desktop client, etc where the bad changeset was produced
- Trace (or debug) logs from your instance of Realm Object Server and note the timestamp. If cloud, you can gather these from studio (or share your instance URL). If self-hosting, these should be output to your ROS working directory.
- [If self-hosting]: Collect the server Realm of the client which caused the bad changeset
- If possible: Collect the client Realm file which caused the bad changeset. This is possible if running from a simulator, a physical device which you have access to, or a desktop environment. Please contact us if clarification is needed.
- If possible: steps to reproduce the error and/or context around the occurrence
For example:
The client logs may look like:
31-05 19:17: error: [sync] ServerFile[/MyRealm/__partial/e61c1b6ac309c5f60872cb06853e2c5e/f4d55d0498105f3b446525c948636c20fc449e9b]: Failed to transform changeset received from client: Assertion failed: left().prior_size == right().prior_size 31-05 19:17: error: [sync] ServerFile[/MyRealm/__partial/e61c1b6ac309c5f60872cb06853e2c5e/f4d55d0498105f3b446525c948636c20fc449e9b]: Changeset: 3F 00 11 53 61 6C 65 73 4F 72 64 65 72 50 61 79 6D 65 6E 74 00 00 05 E6 A3 E4 D8 AD CA 86 B7 C8 00 AD B0 E7 F7 C2 A1 EA EA CE 01 debug: [sync] Sync Connection[67]: Session[2]: Protocol error: Bad changeset (UPLOAD) (error_code=212)
You'll want to gather the Realm in question which is:
/MyRealm/__partial/e61c1b6ac309c5f60872cb06853e2c5e/f4d55d0498105f3b446525c948636c20fc449e9b