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)

Most upvoted comments

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.

Hi Juan, Thanks for that trick but…it seems not working… get: Échec de l’enregistrement de la configuration du module complémentaire, Invalid list for option ‘npm_packages’ in Node-RED (a0d7b954_nodered). Got {‘certfile’: ‘fullchain.pem’, ‘credential_secret’: ‘&Petroineos’, ‘http_node’: {‘password’: ‘’, ‘username’: ‘’}, ‘http_static’: {‘password’: ‘’, ‘username’: ‘’}, ‘init_commands’: [], ‘keyfile’: ‘privkey.pem’, ‘npm_packages’: @.', ‘ssl’: False, ‘system_packages’: [], ‘theme’: ‘default’} Any advise? Regards Patrice Le 12/03/2022 à 20:57, juanhaywood a écrit : 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 @.". Then save and restart the NR add-on. This will revert node-red-node-serialport to the previous version that was working. — Reply to this email directly, view it on GitHub <#1312 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/APEDJY4GS4XSWUTNSDP22VLU7TZJ7ANCNFSM5PSQSLLQ. You are receiving this because you commented.Message ID: @.***>

Try it like this:

npm_packages:
  - node-red-node-serialport@0.15.0

Alternatively:

npm_packages: [node-red-node-serialport@0.15.0]

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

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

node-red-node-serialport@0.15.0

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.

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.

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.

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.

Hi,

Have somebody with Serial node tested the 11.1.0?

Thanks!

I have tested 11.1.0 but the same issue i have downgraded to 11.0.3 after and back normal