martin-doyle / node-red-contrib-aedes

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

Crashes with ESP-8266 connected to it at nodered #58

Open Snotmann opened 2 years ago

Snotmann commented 2 years ago

After update my ESP-8266 it crashes:

Apr 18 11:41:06 raspberrypi Node-RED[18988]: 18 Apr 11:41:06 - [red] Uncaught Exception: Apr 18 11:41:06 raspberrypi Node-RED[18988]: 18 Apr 11:41:06 - [error] TypeError: Cannot read property 'toString' of undefined Apr 18 11:41:06 raspberrypi Node-RED[18988]: at Aedes.authenticate (/home/pi/.node-red/node_modules/node-red-contrib-aedes/aedes.js:172:68) Apr 18 11:41:06 raspberrypi Node-RED[18988]: at ClientPacketStatus.authenticate (/home/pi/.node-red/node_modules/aedes/lib/handlers/connect.js:101:17) Apr 18 11:41:06 raspberrypi Node-RED[18988]: at makeCallTwo (/home/pi/.node-red/node_modules/fastseries/series.js:150:3) Apr 18 11:41:06 raspberrypi Node-RED[18988]: at release (/home/pi/.node-red/node_modules/fastseries/series.js:138:7) Apr 18 11:41:06 raspberrypi Node-RED[18988]: at resultList (/home/pi/.node-red/node_modules/fastseries/series.js:125:3) Apr 18 11:41:06 raspberrypi Node-RED[18988]: at Aedes.series [as _series] (/home/pi/.node-red/node_modules/fastseries/series.js:45:7) Apr 18 11:41:06 raspberrypi Node-RED[18988]: at Immediate.init (/home/pi/.node-red/node_modules/aedes/lib/handlers/connect.js:83:17) Apr 18 11:41:06 raspberrypi Node-RED[18988]: at processImmediate (internal/timers.js:466:21) Apr 18 11:41:06 raspberrypi systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE

Dont know why ...

Milmoor commented 2 years ago

Got the same thing on my Raspberry Pi. I think it was after an apt update and upgrade sequence.

Edit: mine is working again. Tried to downgrade to 0.7.0, installed, uninstalled, did a dance, and it now works. Not a clue why.

Edit2: now it fails again. 28 May 20:23:19 - [red] Uncaught Exception: 28 May 20:23:19 - [error] TypeError: Cannot read property 'toString' of undefined at Aedes.authenticate (/home/pi/.node-red/node_modules/node-red-contrib-aedes/aedes.js:172:68) at ClientPacketStatus.authenticate (/home/pi/.node-red/node_modules/aedes/lib/handlers/connect.js:101:17) at makeCallTwo (/home/pi/.node-red/node_modules/fastseries/series.js:150:3) at release (/home/pi/.node-red/node_modules/fastseries/series.js:138:7) at resultList (/home/pi/.node-red/node_modules/fastseries/series.js:125:3) nodered.service: Main process exited, code=exited, status=1/FAILURE nodered.service: Unit entered failed state. nodered.service: Failed with result 'exit-code'.

martin-doyle commented 2 years ago

Looks like there is an issue if credentials are set for the username but not for the password. Please check version 0.8.1. It should fix the problem.

Milmoor commented 2 years ago

/cheer That helped. Thanks.

I do have both a username and password set for connecting to the MQTT server. Strange, will take a better look at the settings.