eclipse-paho / eclipse-paho/paho.mqtt.javascript

Connection closed before receiving a handshake response

Open
#154 22 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
466
PR merge metrics
No merged PRs in 30d

Description

Hi,
We are getting below error in some browsers(chrome or mozilla) when we connect mqtt using web sockets. When we clear browser history then connected.
Error:
WebSocket connection to 'wss://host:port/mqtt' failed: Connection closed before receiving a handshake response Paho.MQTT.ClientImpl._doConnect @ mqttws31.js:979

My connection:

var client = new Paho.MQTT.Client("host", Number(port), "myClientId" + new Date().getTime());
client.connect({userName:username,password:password,onSuccess:onConnect,onFailure:doFail,useSSL:true,cleanSession:false});

So please look into this.
Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.