1

I created a EC2 instance based on Realm public AMI: ami-9f1522e4. It seems to be working fine.

I am trying to connect to it in Android with the following code

    String authUrl= "realm://54.173.116.160:9080/auth"; // 54.173.116.160 is my instance IPv4 public IP
    String serverURL = "realm://54.173.116.160:9080/~/default";
    final SyncCredentials syncCredentials = SyncCredentials.usernamePassword(myEmail, myPassword, false);

    SyncUser.loginAsync(syncCredentials, authUrl, new SyncUser.Callback() {
        @Override
        public void onSuccess(SyncUser user) {
            final SyncConfiguration syncConfiguration = new SyncConfiguration.Builder(user, serverURL).build();
            realm = Realm.getInstance(syncConfiguration);
        }
        @Override
        public void onError(ObjectServerError error) {
            Log.e("err", error.getErrorMessage());
        }
    });

However this is triggering the onError hook with the following message: Unexpected error.

What I am doing wrong?

georges49
  • 11
  • 1

0 Answers0