Let’s set the scene:
We start with collections where the partition key was not in every collection. This was fine for 2 years or so. A few weeks ago, we paused sync, and couldn’t get it to start again, with an error that indicated that sync couldn’t start because not all the collections had the partition key. (I can’t find the details, we only have logs for the past 10 days unfortunately)
We eventually got sync to start again, in developer mode. In the App Services UI, Device Sync is listed as “Enabled” with timestamps from today:
Latest Sync Event 07/12/2022 17:40:44
Last Cluster Event Processed 07/12/2022 17:40:43
Lag 1 sec
I can login to my app, probably because Realm authentication services are still working, but I don’t get any of my app’s data. Realm studio shows the schemas I expect, but there is no data in them.
I’m getting this error message in Xcode when the sync is supposed to happen:
**Logged in**
**2022-07-12 13:55:29.722236-0400 O-FISH[2691:68876] Sync: Connection[5]: Session[5]: client_reset_config = false, Realm exists = true, client reset = false**
**2022-07-12 13:55:29.770228-0400 O-FISH[2691:68876] Sync: Connection[5]: Connected to endpoint '34.227.4.145:443' (from '192.168.4.45:52739')**
**2022-07-12 13:55:30.211263-0400 O-FISH[2691:68876] Sync: Connection[5]: Session[5]: Failed to transform received changeset: Schema mismatch: Link property 'user' in class 'DutyChange' points to class 'User' on one side and to 'DutyChange_user' on the other.**
**2022-07-12 13:55:30.211458-0400 O-FISH[2691:68876] Sync: Connection[5]: Connection closed due to error**
This is open source code - the models can be seen at:
and
https://github.com/WildAid/o-fish-ios/blame/main/o-fish-ios/Model/User/DutyChange.swift
In App Services UI, under the “Schema” tab, we had this:
We tried deleting the DutyChange schema, and had the same issues with the app.
Then we tried clicking the “Use Schema Dev Mode” on the Schema page for DutyChange, which sent us to the device sync page - which is already enabled, and in dev mode.
Then we tried regenerating the DutyChange schema using the UI’s “Generate Schema” button, and had the same issues with the app.
Any tips to get sync working again? Local objects are being made, and our logs show no errors - the relevant Sync->Other logs show things like:
“Client bootstrap completed in 16.903915ms. Received 1 download(s) containing 2 changeset(s) (14.3 kB total).”
The data does not get fully sync’d to the Atlas collections, though. And information that is supposed to sync to the device, based on the partition key, does not show up - we have some menus that are populated with data from Atlas, and those menus are empty.
Any ideas?