How to fix "missing required field" in unsynced_documents collection? (And the field is not missing in any documents in our actual collection?)

On our Device Sync page for our App Service, we suddenly have the message “Application has a large number of unsyncable documents”. When we look at our unsynced_documents table, all the unsynced ones have the message “document is missing required field(s): [isRework]”

However, when I cross-reference those same documents in our actual collection (called “entries”, those “missing” values are there. So why are we getting this message? What could be causing that (mistaken?) discrepancy between unsynced_documents and the actual collection? And how can we fix it?

On a side note, when I look at the state_entries collection in the realm_sync database (which I assume corresponds to the entries collection in our actual database), the ‘isRework’ field is missing for those documents that also have an entry in the unsynced_documents table

If we add the ‘isRework’ field to those documents that are missing it in the state_entries collection, will that resolve our problem? Or will that adversely affect our App Service and actual database? Are there dangers in doing that?

Thanks, anyone, who can help!

Hi David,

I would advise against changing anything in the state_entries collection. This is an internal collection, and modifying it could have adverse effects on your app.

The simplest solution to get your documents syncing again is to terminate and re-enable Sync. This will perform the initial sync again. Since these documents are now compatible with Sync, they should be considered “syncable.”

If terminating and re-enabling Sync is not viable, you could attempt to perform an unrelated update to the documents in question. This might help flush the document out of the unsyncable documents collection.

Please let me know if either of these options help!

Another user ran into a similar issue and posted about their solution here, might be helpful Fix unsyncable document