You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing an issue when using Realm with flexible sync and disconnected sync configurations. I initialize the flexibleSync on the main thread and disconnectedSync on a background thread (using the workmanager package), and I encounter the following error:
RealmException: Realm at path '/path/to/default.realm' already opened with different sync configurations. Error code: 2013
On WorkManager Callback Function (Disconnected Sync Initialization):
final config = Configuration.disconnectedSync(
[
Model.schema,
],
path: Configuration.defaultRealmPath,
syncErrorHandler: (SyncError error) {
debugPrint("Error message: ${error.message}");
},
);
Realm realm = Realm(config);
Problem
The workmanager callback is called whenever I submit my form, and I get the error mentioned above: RealmException: Realm at path '/path/to/default.realm' already opened with different sync configurations. Error code: 2013.
Version
3.4.1
What Atlas Services are you using?
Both Atlas Device Sync and Atlas App Services
What type of application is this?
Flutter Application
Client OS and version
Android v21
Code snippets
No response
Stacktrace of the exception/crash you're getting
RealmException: Realm at path '/path/to/default.realm' already opened with different sync configurations. Error code: 2013
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
What happened?
I'm facing an issue when using Realm with flexible sync and disconnected sync configurations. I initialize the flexibleSync on the main thread and disconnectedSync on a background thread (using the workmanager package), and I encounter the following error:
RealmException: Realm at path '/path/to/default.realm' already opened with different sync configurations. Error code: 2013
Repro steps
Main Thread (Flexible Sync Initialization):
final config = Configuration.flexibleSync(
loggedInUser,
[
Model.schema,
],
path: Configuration.defaultRealmPath,
syncErrorHandler: (SyncError error) {
debugPrint("Error message: ${error.message}");
},
);
Realm realm = Realm(config);
On WorkManager Callback Function (Disconnected Sync Initialization):
final config = Configuration.disconnectedSync(
[
Model.schema,
],
path: Configuration.defaultRealmPath,
syncErrorHandler: (SyncError error) {
debugPrint("Error message: ${error.message}");
},
);
Realm realm = Realm(config);
Problem
The workmanager callback is called whenever I submit my form, and I get the error mentioned above: RealmException: Realm at path '/path/to/default.realm' already opened with different sync configurations. Error code: 2013.
Version
3.4.1
What Atlas Services are you using?
Both Atlas Device Sync and Atlas App Services
What type of application is this?
Flutter Application
Client OS and version
Android v21
Code snippets
No response
Stacktrace of the exception/crash you're getting
RealmException: Realm at path '/path/to/default.realm' already opened with different sync configurations. Error code: 2013
Relevant log output
No response
The text was updated successfully, but these errors were encountered: