Schema mismatch: Property '###' in class '###' is of type Link on one side and type ObjectId on the other

What does this mean? It happens after I export my app with realm-cli, and then - without making changes - pushing what’s exported to my repository for automatic deployment back to my realm app. It breaks my schema.

Hi Eric,

This usually means there is a mismatch of types for the property between your server side schema and your client side schema.

Has the type for this property changed in your client side?

Regards
Manny

1 Like

Hi there

Thanks for getting back to me. I’ll need to refresh myself with this particular issue as it is a week old now. Unfortunately I don’t have the time to reproduce this myself on demand because it really slows me down.

When next I have to perform this work flow again, I’ll post the results here,

For now, from what I recall, I can reproduce it like this:
Note: I start with a working sync configuration having no sync errors on server or client.

  1. Export app configuration directory via realm-cli
  2. Set up version control for the exported directory (which I have to do every time because I haven’t figured out this other realm-cli issue
  3. Force push the unmodified directory to my repo to trigger an automatic deployment (again, that’s with unmodified source files and directory organization - it’s literally EXACTLY what realm-cli exported for me)
  4. The next time I start the client, these errors appear.

The only solution I have found is to manually delete all schemas using the Atlas UI, and then deactivating Sync, and re-enabling in development mode, running the client, turning off development mode, re-entering my permission expressions and finally activating sync.

As you can imagine this is a huge amount of time to pay for wanting to do something as simple as edit one line of code in a realm function in my own development environment, for instance.

Hi there,

Any input or thoughts on the above? I’m still trying to find or make a solution for this issue.

Thanks!

I’d like to bump this issue if possible. We’ve been seeing this happen for us, but only for a specific class, other changes or collection updates seem to work ok.

I’m also having this issue. Is there a quick fix to this rather than deleting the schema?