eclipse-paho / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.16k stars 466 forks source link

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

Open danishsuri123 opened 3 years ago

danishsuri123 commented 3 years ago

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

imankur commented 3 years ago

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

hossein-nahali commented 2 years ago

I have exactly the same problem

Snorker8406 commented 2 years ago

same here :(

trunganh5795 commented 1 year ago

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.

joysfera commented 1 year ago

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

joysfera commented 1 year ago

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.