eclipse / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.14k stars 468 forks source link

MQTT client connection fail in firefox #136

Open ghost opened 6 years ago

ghost commented 6 years ago

I try to connect with websockets to my broker (mosquitto). This works in Chrome (and in Edge), but in Firefox I get following error:

Firefox can’t establish a connection to the server at ws://:/ws.

Then, the onFailure callback gets called with this parameter: Object { invocationContext: undefined, errorCode: 7, errorMessage: "AMQJS0007E Socket error:undefined." }

jpwsutton commented 6 years ago

Hi @ramyalathaseethala, Is the connection to the broker or the web page being served over HTTPS? We have seen issues in the past where Firefox is very strict with mixed content and this could be related..

tyler-suderman-kr commented 3 years ago

I'm having the same issue here and am connecting over HTTP. Thanks for any help you can provide.