bastlirna / mqtt-wall

Twitter wall for your MQTT broker
MIT License
42 stars 9 forks source link

Malformed UTF data cause connection lost #29

Closed ah01 closed 7 years ago

ah01 commented 7 years ago

When some payload contains malformed UTF application close conection.

"AMQJS0005E Internal error. Error Message: AMQJS0009E Malformed UTF data:fc 7e -41., Stack trace: Error: AMQJS0009E Malformed UTF data:fc 7e -41.
    at G (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:17:339)
    at x._getPayloadString (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:70:63)
    at x.get payloadString [as payloadString] (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:71:303)
    at k.client.onMessageArrived (http://g4t.io/wall/wall.js:1:1188)
    at k._receiveMessage (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:52:517)
    at k._receivePublish (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:52:71)
    at k._handleMessage (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:47:379)
    at k._on_socket_message (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:43:8)
    at WebSocket.<anonymous> (https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js:19:132)"
VisComKreiser commented 5 years ago

i get the same error with the test server test.mosquitto.org is there a way to catch malformed UTF data?

ah01 commented 5 years ago

@VisComKreiser sorry, this bug was fixed long time ago, but it was not released yet, till now.

Please, check version 0.4.1, also available as demo

VisComKreiser commented 5 years ago

thanks for the fast reply!