Я использую библиотеку paho-mqtt в SPA, работающем в Chrome и вызываю соединение с примером кода, и получаю две чередующиеся ошибки
var client = mqtt.connect('mqtts:mqtt.ably.io', {
keepalive: 30,
username: 'keyPartA1.artA2',
password: 'keyPartB',
port: 8883
});
Ошибки повторяются, не всегда в тот же порядок ...
stream.js?553e:64 WebSocket connection to 'ws://mqtt.ably.io:8883/' failed: Connection closed before receiving a handshake response
WebSocketStream @ stream.js?553e:64
createWebSocket @ ws.js?fcb9:59
buildBuilderBrowser @ ws.js?fcb9:85
wrapper @ index.js?e7fc:148
MqttClient._setupStream @ client.js?df86:263
MqttClient._reconnect @ client.js?df86:847
eval @ client.js?df86:862
stream.js?553e:64 WebSocket connection to 'wss://mqtt.ably.io:8883/' failed: Connection closed before receiving a handshake response
WebSocketStream @ stream.js?553e:64
createWebSocket @ ws.js?fcb9:59
buildBuilderBrowser @ ws.js?fcb9:85
wrapper @ index.js?e7fc:148
MqttClient._setupStream @ client.js?df86:263
MqttClient._reconnect @ client.js?df86:847
eval @ client.js?df86:862
stream.js?553e:64 WebSocket connection to 'ws://mqtt.ably.io:8883/' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
WebSocketStream @ stream.js?553e:64
createWebSocket @ ws.js?fcb9:59
buildBuilderBrowser @ ws.js?fcb9:85
wrapper @ index.js?e7fc:148
MqttClient._setupStream @ client.js?df86:263
MqttClient._reconnect @ client.js?df86:847
eval @ client.js?df86:862