I’ve been using Realm Sync with my React Native app for some time and it worked great. Recently I’ve tried to clone the Realm app associated with my react Native app to connect to a database on a new cluster. I’ve not changed my client code, appart from changing the Realm app ID to sync to.
Two of my 3 partitions are syncing fine on this new setup, but one partition is not syncing (read or write). The writes are not synced to Atlas and the reads show an empty array. In my client code, the realm is opened without issues but
siteRealm.objects("context") returns an empty array.
Judging by this screenshot of the initial sync write when first enabled, the documents should be syncable:
Here is an example of a ‘context’ object in the site partition that is not syncing:
I don’t think the issue is a schema or permission issue because there is no message in the logs about that. When I write a new document in the client app, it just stays locally but does not sync to Atlas, and there are no messages in the logs appart from:
I’m not sure if that log message is useful to find out what is going on?
What could be the reasons for a partition not syncing, without any error message in logs? How can I find out what is going on?
- Partition sync with dev mode enabled
- Permissions enabled for read and write
- Client app is on iOS simulator (not tried on android)
- The new cluster is in Australia and my client app is in the UK (not sure if the lag could be an issue?)
- Open Realm Behaviour Config: ‘openImmediately’
Things I’ve tried:
- Checked the partitionValue value in client app is correct (partitionValue:
- Restarting sync
- Reinstalling the client app on simulator
Many thanks in advance for your help!