Garnett
Garnett

Reputation: 299

"Could not connect to the server" when authenticateWithCredential

I got such error

Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x1744467e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://192.243.48.203:9080/auth, NSErrorFailingURLKey=https://192.243.48.203:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}

when performed authenticateWithCredential into my iOS project

Can anybody help?Thanks!

Upvotes: 0

Views: 1104

Answers (2)

user8152635
user8152635

Reputation: 52

From the looks of it, I think you should do this:

1.Install the macOS bundle Frome https://realm.io/cn/docs/get-started/installation/mac/
2.please Starting Realm Object Server

like this:enter image description here

3.you're using the localhost IP address`127.0.0.1`

enter image description here 4.login in enter image description here 5.You’re done! congratulations!

Upvotes: 1

teotwaki
teotwaki

Reputation: 1033

You are connecting to a non-SSL port, but asking the client to connect via SSL. This will probably not work.

Also, please note that SSL is disabled by default in the Realm Object Server, considering that we can not possibly provide a valid certificate in our installation packages. This is something that needs to be setup manually after installing the packages.

For reference, by default, if you enable SSL support, the port will be 9443. If you didn't setup anything regarding SSL on the server, you will need to use port 9080, which is non-SSL, so use realm:// instead of realms://.

Upvotes: 0

Related Questions