Realm.asyncOpen doesn't call the callback

I had to terminate sync and re-enable it. During the login procedure I use asyncOpen for both a public and private realm to fully sync with the server before letting the user in the app.

Now Realm.asyncOpen on the private realm doesn’t execute its callback at all. I’m expecting it to execute the callback with an error so that I can handle it in the app.

MongoDB Realm log shows:


client file not found. The server has forgotten about the client-side file presented by the client. This is likely due to using a synchronized realm after terminating and re-enabling sync. Please wipe the file on the client to resume synchronization. { sessionIdent: 2, clientFileIdent: 29 } (ProtocolErrorCode=208)

How would I know to delete the file if the API doesn’t actually tell me to do so?
Also, the realm file is actually found on the device. FIleManager.default.fileExists(at: path) reports true

I don’t understand if this error can happen in production and how to mitigate it. How can you deal with schema migrations if you don’t have a migration block? you can’t just wipe user’s data because you added a field in an object can you?
Why can’t realm sync have a migration block in the first place?