Node-RED is stuck in a constant crash loop and I’m not completely clear why. I’m able to run Node-RED in Safe Mode. But other than that the log isn’t particularly clear to me. What could be causing the issue exactly?
This appears to be the main error causing the crash.
13 Jun 19:53:49 - [error] Error: JSONata Error: Argument 1 of function "contains" does not match function signature
at EventsState.getComparatorResult (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:241:27)
at EventsState.onHaEventsStateChanged (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/events-state/controller.js:71:32)
at EventsState.onStatesLoaded (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/events-state/controller.js:179:18)
at EventEmitter.emit (node:events:539:35)
at /config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:223:27
Here’s the full log up to the point where NR crashes and reboots.
Flow-based programming for the Internet of Things
-----------------------------------------------------------
Add-on version: 12.0.2
You are running the latest version of this add-on.
System: Home Assistant OS 8.1 (amd64 / qemux86-64)
Home Assistant Core: 2022.6.5
Home Assistant Supervisor: 2022.05.3
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/customizations.sh
cont-init: info: /etc/cont-init.d/customizations.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/node-red.sh
patching file nodes/ui_base.html
Hunk #1 succeeded at 1164 (offset 633 lines).
[19:53:26] WARNING:
[19:53:26] WARNING: Direct access mode is disabled, Node-RED Dashboard
[19:53:26] WARNING: will not work!
[19:53:26] WARNING:
[19:53:26] WARNING: Please assign a port in the Network section of this
[19:53:26] WARNING: add-on configuration.
[19:53:26] WARNING:
up to date, audited 727 packages in 11s
1 package is looking for funding
run `npm fund` for details
31 vulnerabilities (5 moderate, 21 high, 5 critical)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
cont-init: info: /etc/cont-init.d/node-red.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun nodered (no readiness notification)
s6-rc: info: service legacy-services successfully started
[19:53:38] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
13 Jun 19:53:39 - [info]
Welcome to Node-RED
===================
13 Jun 19:53:39 - [info] Node-RED version: v2.2.2
13 Jun 19:53:39 - [info] Node.js version: v16.15.0
13 Jun 19:53:39 - [info] Linux 5.15.41 x64 LE
13 Jun 19:53:40 - [info] Loading palette nodes
13 Jun 19:53:42 - [info] Dashboard version 3.1.7 started at /endpoint/ui
/config/node-red/node_modules/node-red-node-pi-gpio/testgpio: line 5: python: command not found
/config/node-red/node_modules/node-red-node-pi-gpio/testgpio: line 8: -u: command not found
13 Jun 19:53:42 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
13 Jun 19:53:43 - [info] Settings file : /etc/node-red/config.js
13 Jun 19:53:43 - [info] Context store : 'default' [module=memory]
13 Jun 19:53:43 - [info] User directory : /config/node-red/
13 Jun 19:53:43 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Jun 19:53:43 - [info] Flows file : /config/node-red/flows.json
13 Jun 19:53:43 - [info] Server now running at http://127.0.0.1:46836/
13 Jun 19:53:43 - [info] Starting flows
[19:53:44] INFO: Starting NGinx...
13 Jun 19:53:45 - [info] Started flows
13 Jun 19:53:46 - [error] [api-current-state:House Unoccupied?] Entity could not be found in cache for entity_id: binary_sensor.house_occupied
13 Jun 19:53:46 - [error] [api-current-state:House Unoccupied?] Entity could not be found in cache for entity_id: binary_sensor.house_occupied
13 Jun 19:53:48 - [info] [server:Home Assistant] Connecting to http://supervisor/core
13 Jun 19:53:48 - [info] [server:Home Assistant] Connected to http://supervisor/core
13 Jun 19:53:49 - [red] Uncaught Exception:
13 Jun 19:53:49 - [error] Error: JSONata Error: Argument 1 of function "contains" does not match function signature
at EventsState.getComparatorResult (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:241:27)
at EventsState.onHaEventsStateChanged (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/events-state/controller.js:71:32)
at EventsState.onStatesLoaded (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/events-state/controller.js:179:18)
at EventEmitter.emit (node:events:539:35)
at /config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:223:27
[19:53:49] WARNING: Node-RED crashed, halting add-on
[19:53:49] INFO: Node-RED stoped, restarting...
s6-rc: info: service legacy-services: stopping
[19:53:49] INFO: Node-RED stoped, restarting...
s6-svwait: fatal: supervisor died
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
[19:53:49] INFO: nginx stoped, restarting...
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped