#Web Socket connection refuse with https

4 messages · Page 1 of 1 (latest)

silver mason
#

Hiiiii, I have a problem with NestJS Web-Socket if i connect to this web socket in localhost it work normaly (http://localhost:3000) but if i deploy my app on my vps with https and domain name (https://api.discutoi.tonycava.dev/) i doesn't have response at my connection request on Postman but if for example on my front end i send a request to it he response properly and send the data to other chrome tab like a normal web socket and have this error once on my console :

I think it's because the first connection made is by "websocket" transport and the other by "polling" if some have already encountered this error please let me know

Here is the source code :
https://github.com/tonycava/discution-app-back
https://github.com/tonycava/discution-app-front

GitHub

Contribute to tonycava/discution-app-back development by creating an account on GitHub.

GitHub

Contribute to tonycava/discution-app-front development by creating an account on GitHub.

lost oar
#

Hello excuse me, any update about your error?? i have same problem with you too. It can connect if i access it with http in local or even in live server but, i can't connect if i using https & got error message like you

tired oak
#

Hi, @lost oar , @silver mason did you guys find any solution to the issue? Im currently facing the exact same problem moondespair

silver mason
# tired oak Hi, <@464139449023070220> , <@238675048859303937> did you guys find any solutio...

@lost oar
Hi mate in my case i remember just ignoring the error because in all case it work just fine, and it's so weird

My websocket configuration on the server :
https://github.com/tonycava/discution-app-back/blob/master/src/gateway/gateway.controller.ts

My websocket configuration on the client :
https://github.com/tonycava/discution-app-front/blob/main/src/lib/socket/webSocketClient.ts

Try copy and paste the config and see if it work for you (don't forget to change the server url or the CORS url)

GitHub

Contribute to tonycava/discution-app-back development by creating an account on GitHub.

GitHub

Contribute to tonycava/discution-app-front development by creating an account on GitHub.