NodeRed crashing after recent install of (?)zigbee2mqtt(?)

I've had no issues for years with Node Red. However, it's crashing every couple of hours. I presume it's because of a recent install of zigbee2mqtt.....but not sure. How would I go about debugging. I've been checking the logs and nothing appears when the crash occurs.

In other threads where Node Red crashes, they've been asked for startup logs. Here they are:

Can you post the log from the start please? Also please copy/paste rather than screenshot. When you paste it in use the </> button at the top of the forum text entry window and paste it in, that will stop the forum from messing with the syntax.

Also tell us what hardware/OS you are running on.

P.S. Should have said welcome to the forum :slight_smile:

1 Like

Thanks Colin.

Running on Odroid N2+. Armbian
Node Red 1.3.3
NPM 6.4.12
Node 14.16.1

26 Apr 18:26:51 - [info]
Welcome to Node-RED
26 Apr 18:26:51 - [info] Node-RED version: v1.3.3
26 Apr 18:26:51 - [info] Node.js  version: v14.16.1
26 Apr 18:26:51 - [info] Linux 5.10.27-meson64 arm64 LE
26 Apr 18:26:52 - [info] Loading palette nodes
26 Apr 18:26:55 - [info] Dashboard version 2.29.0 started at /ui
26 Apr 18:26:55 - [info] Settings file  : /home/mike/.node-red/settings.js
26 Apr 18:26:55 - [info] Context store  : 'default' [module=localfilesystem]
26 Apr 18:26:55 - [info] User directory : /home/mike/.node-red
26 Apr 18:26:55 - [warn] Projects disabled : editorTheme.projects.enabled=false
26 Apr 18:26:55 - [info] Flows file     : /home/mike/.node-red/flows_odroidn2.json
26 Apr 18:26:55 - [info] Server now running at
26 Apr 18:26:55 - [warn]
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
26 Apr 18:26:56 - [info] Starting flows
26 Apr 18:26:56 - [info] [hubitat config:Hubitat Client] Starting endpoint for /hubitatclient/webhook
26 Apr 18:26:56 - [info] [hubitat config:Hubitat Coordinator] Starting endpoint for /hubitat/webhook
26 Apr 18:26:57 - [info] [aedes broker:Synology Docker MongoDB ] Start persistence to MongeDB
26 Apr 18:26:58 - [info] Started flows
26 Apr 18:26:58 - [info] [aedes broker:Synology Docker MongoDB ] Binding aedes mqtt server on port: 1885
(node:7175) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'value' of null
    at /usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/util.js:415:29
    at Array.reduce (<anonymous>)
    at getObjectProperty (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/util.js:414:18)
    at getMessageProperty (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/util.js:386:12)
    at Object.evaluateNodeProperty (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/util.js:614:22)
    at /home/mike/.node-red/node_modules/node-red-contrib-bool-gate/lib/RuleManager.js:109:37
    at new Promise (<anonymous>)
    at RuleManager.updateState (/home/mike/.node-red/node_modules/node-red-contrib-bool-gate/lib/RuleManager.js:106:16)
    at andGateNode._inputCallback (/home/mike/.node-red/node_modules/node-red-contrib-bool-gate/nodes/and.js:27:30)
    at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:203:26
    at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/hooks.js:113:9)
    at andGateNode.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:195:11)
    at andGateNode.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:179:25)
    at andGateNode.Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:476:10)
    at Immediate.<anonymous> (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:679:52)
    at processImmediate (internal/timers.js:461:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:7175) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 2)
(node:7175) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
26 Apr 18:26:58 - [info] [hubitat event:Client] Event: last_seen
26 Apr 18:26:58 - [info] [hubitat event:Client] Event: last_seen_readable
26 Apr 18:26:58 - [info] [hubitat event:Client] Event: csrf
26 Apr 18:26:58 - [info] [hubitat event:Client] Event: cookie
26 Apr 18:26:58 - [info] [server:Home Assistant] Connecting to
26 Apr 18:26:59 - [info] [hubitat mode:Mode] Initialized. mode: Evening
26 Apr 18:26:59 - [info] [hubitat mode:Mode] Initialized. mode: Evening
26 Apr 18:26:59 - [info] [hubitat mode:Co-ordinator] Initialized. mode: Evening
26 Apr 18:26:59 - [info] [tasmota-mqtt-broker:MQTT] Connected to broker: mqtt://localhost:1883
26 Apr 18:26:59 - [info] [zigbee2mqtt-server:zigbee2mqtt] MQTT Connected
26 Apr 18:26:59 - [info] [zigbee2mqtt-server:zigbee2mqtt] Refreshing devices
26 Apr 18:26:59 - [info] [hubitat device:Presence: Mike] Initialized. presence: present
26 Apr 18:26:59 - [info] [hubitat device:House Alarm] Initialized. alarm: off

It isn't clear exactly where the problem is arising but I suspect that some of your nodes may not be compatible with nodejs14. Did you upgrade nodejs recently?
Are you using the latest versions of all nodes?

Thanks for looking. Using latest versions of all nodes.

I have probably upgraded nodejs recently. I've doing a lot of fiddling this week. What version should I downgrade nodejs to?

Oh, I had not looked carefully enough at the errors:

The crash is in node-red-contrib-bool-gate, which I see has not been updated in 4 years so it is not surprising that it gives problems. Also there is no github page to report issues on so we can't see if others have had the problem. I suggest you ditch that node and use something else. I have seen node-red-contrib-boolean-logic-ultimate recommended here though I have not used it myself.

It may not be a nodejs issue with that node, it may just be that you are passing it data that it doesn't like and is crashing it, so as a quick fix you could check where you have used that node and see if you are passing it valid data.

1 Like

Thanks Colin. I removed node-red-contrib-bool-gate, and it seems to have fixed the issue. No errors on startup & no more crashing. I have however, not been playing with zigbee2mqtt, since it took some time to remove all my node-red-contrib-bool-gate's. I'll return for more shenangians if Node Red crashes again.

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