Node Red crash on start >10.1.1

Im running Node Red in Home Assistant. Currently running version 10.1.1 When i upgrade (currently to 20.2.2) Node Red is looping and the webserver never starts. It looks like its related to a Hue node but im not sure how i can fix this.

`26 Dec 01:28:05 - [info] Context store : 'default' [module=memory]
26 Dec 01:28:05 - [info] User directory : /config/node-red/
26 Dec 01:28:05 - [warn] Projects disabled : editorTheme.projects.enabled=false
26 Dec 01:28:05 - [info] Flows file : /config/node-red/flows.json
26 Dec 01:28:05 - [info] Server now running at http://127.0.0.1:46836/
26 Dec 01:28:05 - [info] Starting flows
26 Dec 01:28:05 - [info] Started flows
26 Dec 01:28:05 - [error] [api-current-state:37f29009.5939e] Entity could not be found in cache for entity_id: input_datetime.litter_tray_time
26 Dec 01:28:05 - [error] [trigger-state:82d8e3a2.fb1d8] TypeError: Cannot destructure property 'entity_id' of 'message.payload' as it is undefined.
26 Dec 01:28:05 - [red] Uncaught Exception:
26 Dec 01:28:05 - [error] Error: Philips Hue: 4, method, GET, not available for resource, /
at /config/node-red/node_modules/huejay/lib/Transport.js:88:17
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[01:28:06] INFO: Starting Node-RED...

start
node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
26 Dec 01:28:06 - [info]
Welcome to Node-RED
===================
26 Dec 01:28:06 - [info] Node-RED version: v2.1.4
26 Dec 01:28:06 - [info] Node.js version: v16.13.1
26 Dec 01:28:06 - [info] Linux 5.10.83 x64 LE
26 Dec 01:28:07 - [info] Loading palette nodes
26 Dec 01:28:08 - [info] Dashboard version 3.1.2 started at /endpoint/ui
Traceback (most recent call last):
File "/opt/node_modules/node-red-node-pi-gpio/testgpio.py", line 3, in
import RPi.GPIO as GPIO
File "/usr/lib/python3.9/site-packages/RPi/GPIO/init.py", line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
26 Dec 01:28:08 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
26 Dec 01:28:08 - [info] Settings file : /etc/node-red/config.js
26 Dec 01:28:08 - [info] Context store : 'default' [module=memory]
26 Dec 01:28:08 - [info] User directory : /config/node-red/
26 Dec 01:28:08 - [warn] Projects disabled : editorTheme.projects.enabled=false
26 Dec 01:28:08 - [info] Flows file : /config/node-red/flows.json
26 Dec 01:28:08 - [info] Server now running at http://127.0.0.1:46836/
26 Dec 01:28:08 - [info] Starting flows
26 Dec 01:28:08 - [info] Started flows
26 Dec 01:28:08 - [error] [api-current-state:37f29009.5939e] Entity could not be found in cache for entity_id: input_datetime.litter_tray_time
26 Dec 01:28:08 - [error] [trigger-state:82d8e3a2.fb1d8] TypeError: Cannot destructure property 'entity_id' of 'message.payload' as it is undefined.
26 Dec 01:28:08 - [red] Uncaught Exception:
26 Dec 01:28:08 - [error] Error: Philips Hue: 4, method, GET, not available for resource, /
at /config/node-red/node_modules/huejay/lib/Transport.js:88:17
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[01:28:08] INFO: Starting Node-RED...
start
node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
26 Dec 01:28:09 - [info]
Welcome to Node-RED
===================
26 Dec 01:28:09 - [info] Node-RED version: v2.1.4
26 Dec 01:28:09 - [info] Node.js version: v16.13.1
26 Dec 01:28:09 - [info] Linux 5.10.83 x64 LE
26 Dec 01:28:09 - [info] Loading palette nodes
26 Dec 01:28:10 - [info] Dashboard version 3.1.2 started at /endpoint/ui
Traceback (most recent call last):
File "/opt/node_modules/node-red-node-pi-gpio/testgpio.py", line 3, in
import RPi.GPIO as GPIO
File "/usr/lib/python3.9/site-packages/RPi/GPIO/init.py", line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
26 Dec 01:28:11 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
26 Dec 01:28:11 - [info] Settings file : /etc/node-red/config.js
26 Dec 01:28:11 - [info] Context store : 'default' [module=memory]
26 Dec 01:28:11 - [info] User directory : /config/node-red/
26 Dec 01:28:11 - [warn] Projects disabled : editorTheme.projects.enabled=false
26 Dec 01:28:11 - [info] Flows file : /config/node-red/flows.json
26 Dec 01:28:11 - [info] Server now running at http://127.0.0.1:46836/
26 Dec 01:28:11 - [info] Starting flows
26 Dec 01:28:11 - [info] Started flows
26 Dec 01:28:11 - [error] [api-current-state:37f29009.5939e] Entity could not be found in cache for entity_id: input_datetime.litter_tray_time
26 Dec 01:28:11 - [error] [trigger-state:82d8e3a2.fb1d8] TypeError: Cannot destructure property 'entity_id' of 'message.payload' as it is undefined.
26 Dec 01:28:11 - [red] Uncaught Exception:
26 Dec 01:28:11 - [error] Error: Philips Hue: 4, method, GET, not available for resource, /
at /config/node-red/node_modules/huejay/lib/Transport.js:88:17
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[01:28:11] INFO: Starting Node-RED...
start
node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
26 Dec 01:28:12 - [info]
Welcome to Node-RED
===================
26 Dec 01:28:12 - [info] Node-RED version: v2.1.4
26 Dec 01:28:12 - [info] Node.js version: v16.13.1
26 Dec 01:28:12 - [info] Linux 5.10.83 x64 LE
26 Dec 01:28:12 - [info] Loading palette nodes
26 Dec 01:28:13 - [info] Dashboard version 3.1.2 started at /endpoint/ui`

The best approach would be to get node-red to launch in safe mode (where the flow is loaded but not started). Then edit the flow to disable the Phillips nodes or to ensure they are upgraded to the newest available

How you do that with Home Assistant I don't know since I don't use it. Best guess would be to insert the NODE_RED_ENABLE_SAFE_MODE=true environment variable.

Otherwise you will need to ask on the Home Assistant support pages.

P.S. also please use Node-RED version numbers, not Home Assistant version numbers as we have no idea what they map to. This is v2.1.4 from the logs

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.