After upgrading Realm from 10.28.1 to 10.33.0, my app crashes whenever func configuration<T: BSON>(partitionValue: T) is called.
The error message only says, “RealmSwift/Sync.swift:314: Fatal error: what’s best in this case?”.
What is “this case”??? Does anybody know what is happening?
The strange thing is that it works fine on a simulator. It only crashes on a device.
According to the Atlas log, Authentication → login is OK. But it crashes when I try to get a config for the user.
let configuration = user.configuration(partitionValue: Constants.REALM_PARTITION)
I know that the default clientResetMode is switched from .manual to .recoverUnsyncedChanges in 10.32.0.
I tried to specify manual. But it didn’t help. I get the same fatal error.
let configuration = user.configuration(partitionValue: Constants.REALM_PARTITION, clientResetMode: ClientResetMode.manual())
I rebuilt the app with 10.28.1. And I now get the same fatal error on a device. (It works on a simulator.) So, I guess it has nothing to do with ClientResetMode.
If I reinstall the already published app (that uses 10.28.1), it works perfectly fine on the device.
While upgrading to 10.33.0, I had to change some build settings for the latest XCode. Maybe that messed something up. But in any case, RealmSwift/Sync.swift:314: Fatal error: what's best in this case? is not a very helpful message. It appears that line 314 of Sync.swift is a comment. How can I troubleshoot from here?
Everything works now. It wasn’t the code or realm binary.
I was using Carthage as a dependency manager. During the upgrade process, I did a framework migration. It turned out that the migration was incomplete. The project settings had a link to old frameworks.