Navigation

Sync Errors

While you develop applications using Realm Sync, you may run into errors. This section details some common errors.

When the server encounters an error that appears to be caused by the connected client, it will send an error message to that client. The error message will have a code number and description. To see the full list of sync errors, see the error code list on the Realm Core github repository..

When actively troubleshooting an issue, set the logging level to debug or trace to diagnose errors while developing your application. When running in a production environment, you will want to decrease the logging level for improved performance.

Note

MongoDB Realm creates sync logs whenever a user interacts with Realm Sync. To learn more, read the documentation on application logs.

Learn how to set the log level with the iOS SDK.

To learn how to detect and respond to any failed sync-related API calls with the iOS SDK, see the Handle Sync Errors documentation.

When using Realm Sync, a client reset is a serious error recovery task that your client app must perform in the following situation:

  • The given synced realm on the server was restored from a backup. For example, due to a Realm server crash.
  • The client app made changes to that realm since the backup was made, but did not sync those changes back to the server before the server was restored.

In other words, the client app must carry out a client reset on a given synced realm if the server is restored to a version older than the version on the client.

A client reset erases all local data and downloads a new copy of the data stored in MongoDB Atlas. Performing a client reset loses all local changes made since the client last successfully synced.

To learn how to perform a client reset with the iOS SDK, see the iOS Client Reset documentation.

Give Feedback