Client provided invalid schema version

Hello,
I have an electron app working with the node-js SDK, with sync enabled.
Every time I made a schema change so far, I incremented the schemaVersion in realm config passed to Realm.open(config)
Until now I only made non-breaking changes, incremented the schema every time and things went smoothly. I did 34 schema changes so far.
Now I’m on development, working for a few weeks on a big new feature and I needed to make breaking changes. I incremented my schema, terminated sync and re-enabled it, but I’m getting a weird error, my app still works, but I’m afraid to deploy to production.
The error is “Client provided invalid schema version: client presented non-zero schema version in BIND 34 while schema verisoning is not enabled. set the schema version to 0 to continue syncing”.

I’ve changed my schemaVersion to 0 and I no longer have the error.
But does that mean that after a client Reset we have to reset the schemaVersion to 0 ?
I’m confused with the “while schema verisoning is not enabled”, can that be enabled or disabled somewhere ?
Thanks for any help.

1 Like

Hi, this was an intentional change made in the most recent version of realm-core. Please see here: Release Realm Core v13.26.0 · realm/realm-core · GitHub

This field actually had no use in a synced realm. We are planning on releasing a feature soon that will introduce the concept of schema versions for synced realms and we will begin using that to correlate the schemaVersion in the realm with the schemaVersion in the cloud.

Best,
Tyler

1 Like

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