NativeWebSocket icon indicating copy to clipboard operation
NativeWebSocket copied to clipboard

Unable to connect to the remote server - wss

Open mustafa-sibai opened this issue 4 years ago • 1 comments

I have created a WebSocket server in NodeJs and hosted it on GCP. The URL for the server is wss://scramblegram.bluemsoftware.com

I created a client using this library

Here is my issue

If I connect to wss://scramblegram.bluemsoftware.com using this library I get "Unable to connect to the remote server"

If I connect to wss://scramblegram.bluemsoftware.com using https://www.websocket.org/echo.html it works perfectly.

If I connect to wss://echo.websocket.org using this library it works perfectly.

can someone explain what is going on and how I can debug and solve this? It makes no sense

mustafa-sibai avatar May 04 '21 08:05 mustafa-sibai

If your client is some kind of platform that can't dynamically look up certificates (e.g. Unity on Android apparently?), unity-tlsexception-handshake-failed-unitytls-x509verify-flag-not-trusted might be the issue. I had this issue when using Letsencrypt for my server. I fixed the problem by using fullchain.pem instead of cert.pem.

elmisback avatar Jun 08 '21 17:06 elmisback