WebSocket SSL not supported in 1.10.2

WebSocket SSL not supported in 1.10.2


As the topic says, for some reason opening a wss connection doesn’t work on 1.10.2, while the ws connections works perfectly.
This issue is only appearing on Windows and Android. On macOS and iOS, the wss connection works as good as the ws.

I have uploaded a test project.

Best regards

WebSocketTest.zip (713.3 KB)

1 Like


Can confirm the issue for Cocos Creator 2.0.9

Here’s a simple project that tests both unsecure (ws://) and secure (wss://). Both work in web version but secure connection is failed in Android build. I also tried to include CA certificate and specifiy it during WebSocket creation. Doesn’t work. With extra logs I saw this socket callback invocation:

LWS_CALLBACK_CLIENT_CONNECTION_ERROR: lws_ssl_client_connect2 failed

Tested against echo.websocket.org. CA certificate is of Let's Encrypt Authority X3. Particular file used may be found in repo. Full log from WebSocket-libwebsockets.cpp can be found here.