realm / realm-core

Core database component for the Realm Mobile Database SDKs
https://realm.io
Apache License 2.0
1.01k stars 152 forks source link

Asymmetric Sync fails to upload objects to newly created app #7278

Open cmelchior opened 6 months ago

cmelchior commented 6 months ago

This is being reproduced by an asymmetric sync insert test in the Kotlin repo using a fresh app.

The server reports these errors:

BadServerVersionError:
ending session with error: upload contained changeset with server version 2 greater than the message's progressServerVersion 0 (ProtocolErrorCode=209)
Error
error handling "bind" message: error getting sync status from metadata store: error getting initial sync status: mongo: no documents in result
OtherClientError Error
error getting sync status from metadata store: error getting initial sync status: mongo: no documents in result (ProtocolErrorCode=101)

Client log up to the point where it just hangs until the test times out (after 1 minute) has been attached.

client-logs.txt

danieltabacaru commented 6 months ago

I don't know if it's expected, but there is a client reset involved due to:

2024-Jan-23 09:35:13,043 INFO: [REALM] [Core] Connection[1]: Session[1]: Received: ERROR "Synchronization no longer possible for client-side file: breaking schema change applied" (error_code=217, is_fatal=true, error_action=ClientReset)
danieltabacaru commented 6 months ago

I think I know what's going on (and why the first error is received by the client). It looks like a bug being introduced in Core 12.24.1.

cmelchior commented 6 months ago

Thanks, that would also explain why we suddenly started to see this after bumping the Core version 👍

sync-by-unito[bot] commented 3 weeks ago

➤ danieltabacaru commented:

[~clemente.tort@mongodb.com] Are the asymmetric tests still disabled? (or have they been fixed too when not using dev mode anymore for setting the schemas)