Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle sync error: "Bad changeset received: Assertion failed: left().link_target_table_ndx == right().link_target_table_ndx"

I got this error on the object server console on login and can't sync anymore. The same user account was working before.

2016-12-13T13:20:52.858Z - error: sync-server: Connection[6]: Session[1]: Bad changeset received: Assertion failed: left().link_target_table_ndx == right().link_target_table_ndx (message_type='upload')

2016-12-13T13:20:52.858Z - info: sync-server: Connection[6]: Session[1]: Session terminated (session_ident=1).

2016-12-13T13:20:52.858Z - info: sync-server: Connection[6]: Sending: ERROR(error_code=212, message_size=22, try_again=0, session_ident=1)

2016-12-13T13:20:52.859Z - info: sync-server: Connection[6]: Connection closed by client: End of input

What does it mean? How do I fix it?

Edit: I tried incrementing the schema version, then I got:

IMPORTANT: if you see this error, please send this log to [email protected].

2016-12-13 14:37:07.407848 proj[34851:10576594] Sync: Opening Realm file: /var/mobile/Containers/Data/Application/65681835-AE09-4E4C-830A-BA7A8ADF0D69/Documents/realm-object-server/b77ccd68258d68251aafb1bac5d8d653/realm%3A%2F%2F192.168.0.12%3A9080%2F%7E%2Fz

2016-12-13 14:37:07.408088 proj[34851:10576378] /Users/x/y/z/Pods/Realm/Realm/RLMClassInfo.mm:97: [realm-core-2.2.0] Assertion failed: rlmSchema.objectSchema.count == schema.size()

(sent it to [email protected])

like image 692
User Avatar asked Oct 17 '22 20:10

User


1 Answers

It means that you have two schemas where one field is nullable and another is not (Error could be better, granted). This is a common error for Swift/Java models, because Java is nullable by default, while Swift strings are not.

like image 172
Christian Melchior Avatar answered Nov 01 '22 12:11

Christian Melchior