addon-node-red: Serial port crash on startup with 11.0.4 on ARM
Problem/Motivation
In 11.0.4 on ARM devices, serial port nodes crash Node-RED. Root cause is https://github.com/serialport/node-serialport/issues/2438
Expected behavior
Node-RED starts up and works
Actual behavior
[16:07:23] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
28 Feb 16:07:26 - [info]
Welcome to Node-RED
===================
28 Feb 16:07:26 - [info] Node-RED version: v2.2.2
28 Feb 16:07:26 - [info] Node.js version: v16.14.0
28 Feb 16:07:26 - [info] Linux 5.10.92-v8 arm64 LE
28 Feb 16:07:28 - [info] Loading palette nodes
28 Feb 16:07:32 - [info] Dashboard version 3.1.6 started at /endpoint/ui
28 Feb 16:07:34 - [info] Settings file : /etc/node-red/config.js
28 Feb 16:07:34 - [info] Context store : 'default' [module=memory]
28 Feb 16:07:34 - [info] User directory : /config/node-red/
28 Feb 16:07:34 - [info] Projects directory: /config/node-red/projects
28 Feb 16:07:34 - [info] Server now running at http://127.0.0.1:46836/
28 Feb 16:07:34 - [info] Active project : foxden-home
28 Feb 16:07:34 - [info] Flows file : /config/node-red/projects/foxden-home/flows.json
28 Feb 16:07:34 - [info] Starting flows
[16:07:37] INFO: Starting Node-RED...
And this repeats over and over, no error messages I can find.
Full log: log.txt
Steps to reproduce
Just on startup, every time. In case it is related to my config. All my config is in a git project that can be found here: https://github.com/FoxDenHome/nodered
Proposed changes
If this is widespread, unpublish the update or hotfix
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 50 (6 by maintainers)
Finally figured out how to roll back. You only need to roll back node-red-node-serialport.
In Home Assistant, go to the NodeRed add-on. Then go to the configuration for the add-on. Next to npm packages to install, put “node-red-node-serialport@0.15.0”.
Then save and restart the NR add-on. This will revert node-red-node-serialport to the previous version that was working.
Agreed. But for sure keep this open so people who find their 11.0.4 crashing. From this it seems like everyone who uses a serial port and is using an ARM-based device will be affected.
Try it like this:
Alternatively:
Found the probable actual cause this time: https://github.com/serialport/node-serialport/issues/2438
Comfirm this is solved in 12.0.2. 😃 Thanks @frenck
Thanks for the (good) news!
Thanks @frenck for the work!
Good to know! Thanks @corvy 👍
The issue continue
Still an issue
Perfect - have been having a nightmare trying to recover Node-Red the last two weeks, the lack of revealing logs from HA / docker has hampered the troubleshooting - but this has nailed the issue.
thanks @juanhaywood
I confirm too. I’ve tested to reconnect my serial device (electric probe through USB) and immediately Node-Red crash. Also immediatelly, by removing the USB cable (plug to serial adapter) Node-Red works again.
I have tested 11.1.0 but the same issue i have downgraded to 11.0.3 after and back normal