martin-doyle / node-red-contrib-aedes

MQTT broker for Node-RED based on Aedes
MIT License
62 stars 11 forks source link

TypeError: Cannot assign to read only property 'writeQueueSize' of object '#<TCP>' #34

Closed zorgoban closed 3 years ago

zorgoban commented 3 years ago

Hi!

I'm trying to connect from an ESP32 and send MQTT messages to Node-Red using node-red-contrib-aedes. As soon as the ESP32 tries to connect, either with authentication or none, the Node-Red service crashes with the following error message:

8 Dec 19:43:08 - TypeError: Cannot assign to read only property 'writeQueueSize' of object '#\<TCP>' at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:16) at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18) at clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:202:10) at Object.cloneMessage (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/util.js:91:17) at AedesBrokerNode.Node.send (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:410:61) at Aedes. (/home/pi/.node-red/node_modules/node-red-contrib-aedes/aedes.js:138:12) at Aedes.emit (events.js:198:13)

Additional Information: 8 Dec 19:48:23 - [info] Node-RED version: v1.0.6 8 Dec 19:48:23 - [info] Node.js version: v10.21.0 8 Dec 19:48:23 - [info] Linux 5.4.79-v7+ arm LE

Node-Red runs on a Raspberry Pi 3 B

Many Greetings! Remo

martin-doyle commented 3 years ago

Hi Remo, could you provide the flow you use, please? What are the MQTT settings for Aedes and ESP32? Thank you. Martin

zorgoban commented 3 years ago

Hi!

I solved the problem with uninstalling Aedes and installing Mosquitto instead. The flow was just the Aedes node plus a debug node on the output. There was not much configuration. Just a name, username and password. I didn't use any db settings.

Many Greetings! Remo