SwiftDDP icon indicating copy to clipboard operation
SwiftDDP copied to clipboard

Unencrypted connection (ws://) throws 'SSLHandshake failed'

Open sjkummer opened this issue 5 years ago • 1 comments

Hi there,

While developing & debugging, it is convenient to use the meteor server 'out of the box' without further ssl proxy configuration.

But actually, the SwiftDDP refuses to connect when using the "ws:" scheme and logs SSL errors.

The 'Allow Arbitrary Loads' flag is enabled in the Xcode project settings.

Meteor.connect("ws://10.0.0.10:3000/websocket")

019-02-14 11:07:48.185595+0100 APP[2154:1017819] CFNetwork SSLHandshake failed (-9806)
2019-02-14 11:07:48.185617+0100 APP[2154:1017819] TCP Conn 0x28195fcc0 SSLHandshake failed (-9806)
[Error] [DDP] [SwiftWebSocket] [55] DDPEvents > websocket error Network(The operation couldn’t be completed. (OSStatus error -9806.))
[Info] [DDP] [main] [191] connect(_:callback:) > Web socket connection closed with code 0. Clean: false. 

sjkummer avatar Feb 14 '19 10:02 sjkummer

Well, as a workarround, make sure to never set Meteor.client.allowSelfSignedSSL = true while using the "ws:" scheme

sjkummer avatar Feb 15 '19 16:02 sjkummer