Realm.getInstanceAsync callbacks does not get called, when new user created on realm-server
See original GitHub issueGoal
create new synced user on realm-server and receive callback
Expected Results
Either of onSuccess() or onError() methods must be called after first sync.
Actual Results
Neither of onSuccess() or onError() methods does not get called after first sync. Overrided onSuccess() does get called only after same actions, but with synced user present on realm-server (on second app launch).
Steps & Code to Reproduce
- Remove synced user from realm-server (if has one);
 
- Trying to sync same user again from device with Realm.getInstanceAsync(syncConfiguration, new Realm.Callback() {});
 
Code Sample
> final SyncConfiguration syncConfiguration = new SyncConfiguration.Builder(user, DBHelper.getServerURL()).disableSSLVerification().waitForInitialRemoteData().build();
        Realm.getInstanceAsync(syncConfiguration, new Realm.Callback() {
            @Override
            public void onError(@NonNull Throwable exception) {
                super.onError(exception);
                onFinished(exception.getMessage());
            }
            @Override
            public void onSuccess(@NonNull Realm realm) {
                Realm localRealm = Realm.getDefaultInstance();
                realm.beginTransaction();
                realm.copyToRealmOrUpdate(localRealm.where(ModelFolder.class).findAll());
                realm.copyToRealmOrUpdate(localRealm.where(ModelTrack.class).findAll());
                realm.copyToRealmOrUpdate(localRealm.where(ModelBookmark.class).findAll());
                realm.commitTransaction();
                realm.close();
                localRealm.close();
                AppSettings.setSyncMode(syncMode);
                DBHelper.updateDefaultConfiguration(syncConfiguration);
                onFinished(null);
            }
        });
Version of Realm and tooling
Realm version(s): io.realm:realm-gradle-plugin:4.0.0-RC1 realm-server:2.0.0-RC2
Realm sync feature enabled: yes
Android Studio version: 2.3.3
Which Android version and device: Api 15+
Issue Analytics
- State:
 - Created 6 years ago
 - Comments:10 (6 by maintainers)
 
Top Results From Across the Web
Realm.getInstanceAsync doesn't get called for the first time on ...
I now start the app, the 'Realm.getInstanceAsync(config, callback) never gets called — obviously as there is a conflict between local-realm ...
Read more >Realm sync not working after reconnecting to the internet
I have a trouble on sync with realm object server when user connects to the object server (login), than switch Internet Off, adds...
Read more >Realm Xamarin 2.0.0 - AWS
Realm Xamarin is the first database built for mobile. An alternative to SQLite and ORMs that's fast, easy to use, and open source....
Read more >SyncConfiguration.java example - Javatips.net
Callback )} for more information on * how to get a user object. ... canWrite()) { throw new IllegalArgumentException("Realm directory is not writable:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@molind doc updated here https://realm.io/docs/realm-object-server/latest/#cli
@molind Please let us know if it still doesn’t work the latest ROS.
I am closing this issue for now. Feel free to reopen it.