-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server changeset causes "Invalid data type" on Client #4873
Comments
@cmelchior the client reset default has changed from "Recover" to "DiscardLocal" (because the broken recover option has been removed). Can you be explicit about setting the mode to manual and see if that fixes it? |
We default to MANUAL mode, but I tried to set it explicitly and it still crashes. |
Thanks for checking, glad that was not the issue actually. |
Unfortunately the terminate message does not print the actual column type. Could you provide that information either by providing the entire sync changeset, or maybe building a custom version of core which changes this to something like:
|
So it turns out it wasn't the Client Reset, but the integration of a server changeset:
Not exactly sure what is going on though 🤔 |
Looks like it's coming from here:
I guess the question is why
@cmelchior if you feel like it, you can try to apply that change locally and see if that fixes the issue. |
@ironage it seems like everywhere The only place which doesn't special case Mixed is when we're processing realm-core/src/realm/sync/instruction_applier.cpp Lines 130 to 133 in fc25035
However, there we're first verifying that the key type is valid, which is peculiar in its own right, because it claims that realm-core/src/realm/sync/instructions.hpp Lines 828 to 843 in fc25035
|
I tried to modify Core locally according to #4873 (comment) . That fixes the crash in the unit test. Not sure why we are suddenly seeing this though, I didn't see anything that stood out in the changelog 🤔 |
@cmelchior thanks for the changeset. I think this could be because EmbeddedSimpleChild does not have any pk defined. Are you able to verify that by adding one to see if it works? If that is the case, then it is actually a null type and not a mixed. |
It is an embedded object so it isn't allowed to have primary keys. |
Ah yes, you're right, sorry for the red herring. |
@cmelchior out of curiosity, did your baas version change when the tests started to produce this failure? It might be that recent server changes have modified the sync timings so that changesets are more likely to be resolved client side instead of server side. (just trying to understand why this is uncovered all of a sudden when it has been lurking hidden since v11). |
With latest Core 11.3.0, Java is running into a native crash in one of our tests for Client Reset: https://github.com/realm/realm-java/blob/master/realm/realm-library/src/syncIntegrationTest/kotlin/io/realm/SyncSessionTests.kt#L577
(It says 11.2.0 because I'm using the commit just before the official 11.3.0 release)
The full log is here:
There is only one class in the schema:
The text was updated successfully, but these errors were encountered: