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

**URL:** <https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731>\
**Category:** General\
**Created:** [26 April 2021 07:45 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731 "2021-04-26T07:45:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeorgeCastanza](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/georgecastanza/32/40766_2.png) [@GeorgeCastanza](https://discourse.nodered.org/u/GeorgeCastanza)\
**Post date:** [26 April 2021 07:45 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/1 "2021-04-26T07:45:18Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/b/5be070751db033ec95970e6c50333f6085d0af59.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2021 08:22 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/2 "2021-04-26T08:22:39Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![GeorgeCastanza](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/georgecastanza/32/40766_2.png) [@GeorgeCastanza](https://discourse.nodered.org/u/GeorgeCastanza)\
**Post date:** [26 April 2021 08:29 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/3 "2021-04-26T08:29:26Z")

</div>

Thanks Colin.

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

```auto
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 http://127.0.0.1:1880/
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 https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (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 http://192.168.1.200:8123
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

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2021 08:41 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/4 "2021-04-26T08:41:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![GeorgeCastanza](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/georgecastanza/32/40766_2.png) [@GeorgeCastanza](https://discourse.nodered.org/u/GeorgeCastanza)\
**Post date:** [26 April 2021 08:44 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/5 "2021-04-26T08:44:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2021 09:02 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/6 "2021-04-26T09:02:09Z")

</div>

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

> [@GeorgeCastanza](#):
>
> ` at /home/mike/.node-red/node_modules/node-red-contrib-bool-gate/lib/RuleManager.js:109:37`

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](https://flows.nodered.org/node/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.

---

<div class="post-metadata">

**Author:** ![GeorgeCastanza](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/georgecastanza/32/40766_2.png) [@GeorgeCastanza](https://discourse.nodered.org/u/GeorgeCastanza)\
**Post date:** [27 April 2021 04:22 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/7 "2021-04-27T04:22:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 June 2021 04:23 UTC](https://discourse.nodered.org/t/nodered-crashing-after-recent-install-of-zigbee2mqtt/44731/8 "2021-06-26T04:23:33Z")

</div>

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