How do I handle Realm Object Server dying after accidentally performing a migration on iOS (Bad changeset error)?
When you perform a schema change, this results in an operation that is appended to the operation log maintained by a Realm. This first occurs on the client copy of a synchronized Realm and is then synced to Realm Object Server. If the operation is a destructive change, the server should simply reject the operation and return an error. The result is that the server's operation log is not affected but the client is now in a state where it can't continue to sync with the server. In this situation, the solution is to reset the client, which is easiest in development by deleting and reinstalling the app.
Your situation, however, sounds like a different problem. The fact that the server is unresponsive implies something else went wrong. You could try removing and reinstalling the server since this does not delete the data or configuration.
can't open Realm using mongodb sync
As a complete guess, your config string is not correct
var configuration = user.configuration(partitionValue: "user=\(user.id)")
As that the partition value resolves to
partitionValue: user=Optional("5f1b586f757611faec257d88")
Try this
guard let user = your_app.currentUser() else {
print("no user")
return
}
guard let userId = user.id else {
print("no user")
return
}
var configuration = user.configuration(partitionValue: "user=\(userId)")
More to the point though, the partition value you're attempting to use is this string
user=5f1b586f757611faec257d88
and I think what you really want is use the user id
5f1b586f757611faec257d88
That's where I would start. If you're trying to leverage Realm rules, then something like _partitionKey: "team_id=1234"
would work but that goes beyond the scope of the original question (and adds another layer of complexity - get it working first, then explore the rules).
Realm sync not working after reconnecting to the internet
The issue was only in 4.3.0 build and now it fixed in 4.3.2
thank you
Related Topics
Find Number of Spaces in a String in Swift
iOS Add Button to Widget Extension
Data Repeat in UItableview When Scrolling
Receipt Validation in iOS Returns Incorrect Info During Sandbox Testing
Auto Layout How to Hide 1 View in a View with 3 Equal Width Views
Is There an iOS API for Accessing Call Logs
How to Check a App Was Installed or Updated
Uicollectionview Inside Tableviewcell Not Called
Conforming to UItableviewdelegate and UItableviewdatasource in Swift
iOS Lazy Var Uibarbuttonitem Target Issue
Xcode Debug View Hierarchy: Unable to Capture View Hierarchy
iOS - Combine/Concatenate Multiple Audio Files
Using Delegates to Transfer Data from One Tableview to Another
Uidocumentinteractioncontroller Does Not Open Other App in iOS 11
Change Cell Height by The Content of The Textview Inside The Cell
Uiviewrepresentable Automatic Size - Passing UIkit UIview Size to Swiftui