# Issue with node-red-context-monitor and Node-RED 5

**URL:** <https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256>\
**Category:** General\
**Created:** [10 June 2026 13:44 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256 "2026-06-10T13:44:35Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [10 June 2026 13:44 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/1 "2026-06-10T13:44:35Z")

</div>

Just switched to this (on previous install that was running the beta) and getting an error message with my q-gate nodes (node-red-contrib-queue-gate) that I've not noticed before.

Not declaring a fault just yet with NR5 but just putting it here in case someone else is seeing the same.

Doing further testing.  
[edit] It's throwing an error when I send it a control queue command. open/close work fine. Doesn't happen in a NR 4.1.10 install

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/7/17bf8398aac3bd76400408a947f0eca7f6752c61.png)

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [10 June 2026 19:29 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/2 "2026-06-10T19:29:05Z")

</div>

This could be related to `node-red-context-monitor`. I'll check...

[edit] @cymplecy Could you please post the full error message? What's the version of `node-red-context-monitor` running on this system?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [10 June 2026 23:46 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/3 "2026-06-10T23:46:59Z")

</div>

2.0.0.

Looking back in my logs - I did update this after I upgraded to NR 5

```auto
TypeError: Cannot read properties of undefined (reading 'length')
    at /home/simon/.node-red/node_modules/node-red-contrib-queue-gate/q-gate.js:171:68
    at callback_wrapper (/home/simon/.node-red/node_modules/@ralphwetzel/node-red-context-monitor/lib/monitor.js:212:25)
    at Memory.get (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/context/memory.js:81:18)
    at LocalFileSystem.get (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/context/localfilesystem.js:256:27)
    at Object.value (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/context/index.js:328:33)
    at Proxy.value (/home/simon/.node-red/node_modules/@ralphwetzel/node-red-context-monitor/lib/monitor.js:215:29)
    at QueueGateNode._inputCallback (/home/simon/.node-red/node_modules/node-red-contrib-queue-gate/q-gate.js:83:21)
    at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:214:26
    at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
    at Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:206:11)
    at Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:190:25)
    at Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:506:10)
    at deliverMessageToDestination (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:824:40)
    at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:840:21)
    at process.processImmediate (node:internal/timers:504:21)

```

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [11 June 2026 11:40 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/4 "2026-06-11T11:40:38Z")

</div>

I can confirm this is related to `node-red-context-monitor`. A fix will be available within the next day(s)...

NB: Someone with appropriate privileges should push this exchange into a dedicated topic...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [11 June 2026 12:19 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/5 "2026-06-11T12:19:50Z")

</div>

I removed node-red-context-monitor (as wasn't actually using it AFAICT) and issue has gone away

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [11 June 2026 12:38 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/6 "2026-06-11T12:38:27Z")

</div>

Quick update: Issue due to the fact that `node-red-contrib-queue-gate` gets/sets multiple context keys in one function call. I wasn't aware - until today - this is possible!

I've just pushed an update ([v2.1.0](https://github.com/ralphwetzel/node-red-context-monitor/releases/tag/v2.1.0)) for `node-red-context-monitor`. It would be great if you find a moment to check if this version fixes the issue you saw.

BTW: v2.1.0 adds, among other features, as well context store awareness.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [11 June 2026 13:34 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/7 "2026-06-11T13:34:45Z")

</div>

Just installed it - restarted node-red - got this in log after install  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/optimized/3X/f/4/f4f43230d47a4daec4556541a86cb8a375d26c80_2_690x50.png)  
restarted NR - got this after I added the node to a flow

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/60401de04f442792eebc9fc82e505ac7deb6859a.png)  
Uninstalled - restarted NR - reinstalled - same problem - currently uninstalled again

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [12 June 2026 06:41 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/8 "2026-06-12T06:41:04Z")

</div>

Thank you for your support and your patience.  
[v2.1.1](https://github.com/ralphwetzel/node-red-context-monitor/releases/tag/v2.1.1) is available addressing this latest issue.  
Feedback welcome!

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [12 June 2026 10:58 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/9 "2026-06-12T10:58:07Z")

</div>

2.1.1 has loaded OK 🙂

I've added one of them to a flow and q-gate is still working OK 🙂  
[edit]Might have spoken too soon ...

I just tried sending a trigger message to a q-gate node in queue mode and got this error message

```auto
ReferenceError: previous_value is not defined
    at Object.deleteProperty (/home/simon/.node-red/node_modules/@ralphwetzel/node-red-context-monitor/lib/monitor.js:388:89)
    at Reflect.deleteProperty (<anonymous>)
    at Object.deleteProperty (/home/simon/.node-red/node_modules/@ralphwetzel/node-red-context-monitor/lib/monitor.js:374:52)
    at Proxy.shift (<anonymous>)
    at Proxy.prop_chain (/home/simon/.node-red/node_modules/@ralphwetzel/node-red-context-monitor/lib/monitor.js:260:76)
    at /home/simon/.node-red/node_modules/node-red-contrib-queue-gate/q-gate.js:130:49
    at callback_wrapper (/home/simon/.node-red/node_modules/@ralphwetzel/node-red-context-monitor/lib/monitor.js:422:29)
    at Memory.get (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/context/memory.js:81:18)
    at LocalFileSystem.get (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/context/localfilesystem.js:256:27)
    at Object.value (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/context/index.js:328:33)
    at Proxy.value (/home/simon/.node-red/node_modules/@ralphwetzel/node-red-context-monitor/lib/monitor.js:430:29)
    at QueueGateNode._inputCallback (/home/simon/.node-red/node_modules/node-red-contrib-queue-gate/q-gate.js:83:21)
    at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:214:26
    at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
    at Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:206:11)
    at Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:190:25)
    at Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:506:10)
    at deliverMessageToDestination (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:824:40)
    at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:840:21)
    at process.processImmediate (node:internal/timers:504:21)

```

Normal open/close/queuing seems to be working OK

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [12 June 2026 20:36 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/10 "2026-06-12T20:36:35Z")

</div>

Looks like your node is a perfect test bench for `node-red-context-monitor`. 👍  
I've fixed this issue - and a few others on top. =\> [v2.1.2](https://github.com/ralphwetzel/node-red-context-monitor/releases/tag/v2.1.2)

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [13 June 2026 09:53 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/11 "2026-06-13T09:53:35Z")

</div>

Trigger issue sorted 🙂

---

<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:** [11 September 2026 09:54 UTC](https://discourse.nodered.org/t/issue-with-node-red-context-monitor-and-node-red-5/101256/12 "2026-09-11T09:54:32Z")

</div>

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