paho.mqtt.javascript icon indicating copy to clipboard operation
paho.mqtt.javascript copied to clipboard

WSS connection failed on chrome but connected on Firefox, Safari and other browsers

Open danishsuri123 opened this issue 4 years ago • 6 comments

I am using paho mqtt client javascript for connecting my wss mqtt broker I added in connect option "useSSL: true" but it showing in console that "Websocket connection wss://{host}/ws failed:" in chrome else the same code running on other browsers it connected.

I shall be very great full to everyone for this help.

Everyone's help shall be appreciated

danishsuri123 avatar Sep 08 '21 07:09 danishsuri123

@danishsuri123 Were you able to fix this? Apparently, for me, this is happening on iOS/iPAD OS 15.

imankur avatar Oct 25 '21 09:10 imankur

I have exactly the same problem

hossein-nahali avatar Aug 17 '22 05:08 hossein-nahali

same here :(

Snorker8406 avatar Sep 01 '22 22:09 Snorker8406

I have the same problem. I tried with Firefox and Chrome (Incognito window), and it works well. However, it fails to connect in Chrome normal mode.

trunganh5795 avatar Aug 16 '23 00:08 trunganh5795

I have just got this issue as well (Chrome 116). No idea why. Incognito window works well. This is crazy.

joysfera avatar Oct 23 '23 15:10 joysfera

Oh, Clear Site Data in Google Chrome fixed the issue! F12 -> Application -> Storage -> Clear Site Data (button)

At first I have tried deleting local storage manually but that didn't help. So glad this global clear function helped.

joysfera avatar Oct 23 '23 15:10 joysfera