Realm Cloud Mac App Error: A server with the specified hostname could not be found

cloud

#1

I just set up a new Realm Cloud instance. I can connect to it in Realm Studio. When I attempt to connect to it in a Mac app, it won’t work.

When I run this code:

let creds = SyncCredentials.nickname("clifton", isAdmin: true)
    
    SyncUser.logIn(with: creds, server: Constants.authURL, onCompletion: { [weak self](user, err) in
      if let user = user {
        print("Successful sign in!\n\(user)")
      } else if let error = err {
        print("----- ! -----")
        print(error.localizedDescription)
      }
    })

I get this error:

2018-05-16 23:24:21.582102-0700 MyApp[17625:2786497] TIC TCP Conn Failed [2:0x60c000164980]: 12:8 Err(-65554)
2018-05-16 23:24:21.582402-0700 MyApp[17625:2786496] Task <F2D56975-00D7-40A8-8419-8CA950C49505>.<2> HTTP load failed (error code: -1003 [12:8])
2018-05-16 23:24:21.582477-0700 MyApp[17625:2786496] Task <F2D56975-00D7-40A8-8419-8CA950C49505>.<2> finished with error - code: -1003
----- ! -----
A server with the specified hostname could not be found.

I’ve tried repeatedly and triple-checked the instance URL.

Any ideas?


#2

I finally figured this out. I had mistakenly included the https:// in my Constants.authURL more than once. Doh!