# Global context variables do not display in the Context Sidebar

**URL:** <https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153>\
**Category:** General\
**Created:** [14 September 2018 20:22 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153 "2018-09-14T20:22:47Z")\
**Posts on this page:** 14\
**Page:** 6

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 September 2018 20:24 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/101 "2018-09-24T20:24:44Z")

</div>

> [@tree-frog](#):
>
> I was hoping that you had some means of peeking into the source code and finding why Global keys() would behave differently than Flow keys()

Of course I do. As does everyone else - [https://github.com/node-red/node-red/blob/master/red/runtime/nodes/context/index.js](https://github.com/node-red/node-red/blob/master/red/runtime/nodes/context/index.js)

As I've said many many times, I cannot explain this behaviour. I'm sorry about that. I've already spent a lot of time trying to figure this out, and no doubt I'll end up spending more time on it. But right now, I don't have an answer for you.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 September 2018 20:27 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/102 "2018-09-24T20:27:49Z")

</div>

> [@tree-frog](#):
>
> Projects disabled : git command not found

That's just a warning. You don't need git if projects are not active. You will need to copy your flow to the right place of course, maybe your credentials file too.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [24 September 2018 20:30 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/103 "2018-09-24T20:30:25Z")

</div>

Nick,  
I realize that it's taken way too much time. Thank you for looking into it and trying to resolve it. I'll just apply the Windows uninstall/reinstall debug technique. Sometimes upgrades cause embedded gremlins that just multiply. Especially with the Windows OS. 🤯

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [24 September 2018 20:37 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/104 "2018-09-24T20:37:04Z")

</div>

Disabled Projects. Restarted NR, loaded new browser page... Same results. 😭

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 September 2018 20:51 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/105 "2018-09-24T20:51:59Z")

</div>

> [@tree-frog](#):
>
> Disabled Projects. Restarted NR, loaded new browser page... Same results

Drat. Worth a try. Well, you are now down to adding your own debugging to NR as Nick has intimated. Using the VScode debugger is also possible and might help though it takes a while to get your head around it.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [9 October 2018 19:49 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/106 "2018-10-09T19:49:11Z")

</div>

TotallyInformation,  
can you elaborate on the VScode Debugger?

Thanks.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 October 2018 06:10 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/107 "2018-10-10T06:10:32Z")

</div>

> [@tree-frog](#):
>
> can you elaborate on the VScode Debugger?

Sure 😄

> **[Node-RED - How to use the Visual Studio Code debugger](https://it.knightnet.org.uk/kb/nr-qa/vscode-debugger/)**
>
> Using the Visual Studio Code debugger to debug Node-RED issues

There are also some other blog poss and YouTube videos on the subject.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [10 October 2018 12:31 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/108 "2018-10-10T12:31:50Z")

</div>

Ahh VScode Debugger... VS = Visual Studio.. I should have known that. Thanks for the Link.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [8 March 2019 19:48 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/109 "2019-03-08T19:48:29Z")

</div>

Closing the topic!.. Installed 0.20.0-beta.5. I'm not sure which version from Beta 4 or 5 fixed this issue, but it now is working! This is so nice to get this feature working.

Thanks Node-RED team

---

<div class="post-metadata">

**Author:** ![gfcittolin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gfcittolin/32/23354_2.png) [@gfcittolin](https://discourse.nodered.org/u/gfcittolin)\
**Post date:** [14 May 2019 00:36 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/111 "2019-05-14T00:36:11Z")

</div>

Okay, so I was preparing a presentation about Node-RED, and I've run across the exact same issue. After reading the really long thread and debugging my instance with VSCode, I've found the culprit, finally.

Issue is with a module called `collections`, in my case it's a dependency of `node-red-contrib-opcua`. It sets-up an Array-shim that modifies the behavior of `Array.from()`, and that can't handle `Array.from` of a `Set`, exactly what happens on [https://github.com/node-red/node-red/blob/master/packages/node\_modules/%40node-red/runtime/lib/nodes/context/index.js#L398](https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/runtime/lib/nodes/context/index.js#L398)

Uninstalling the offending module solves the issue. Why that happens only with the global context remains an open question, but I have to prepare the presentation after all 🙂.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 May 2019 05:54 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/112 "2019-05-15T05:54:00Z")

</div>

Interesting. That's the 2nd time I've come across this node causing this kind of issue.

> <https://github.com/TotallyInformation/node-red-contrib-uibuilder/issues/40>

  

> <https://github.com/mikakaraila/node-red-contrib-opcua/issues/97>

Last time, it was the dependent package [collections](https://github.com/montagejs/collections/issues/215). This was overwriting JS's native Array.prototype.find() function with something incompatible. Sounds like this may be a very similar issue.

Needless to say, overwriting native functions is never a good idea.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 May 2019 23:01 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/113 "2019-05-15T23:01:01Z")

</div>

I [commented on an issue](https://github.com/BiancoRoyal/node-red-contrib-iiot-opcua/issues/71#issuecomment-439479279) 6 month ago on node-red-contrib-iiot-opcua....

@biancode fixed it...

"require('collections/map') has to be removed, because it has collisions with node-red"

Perhaps the same issue need to be raised with this other contrib node? Pointing to this issue?

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [16 May 2019 13:54 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/114 "2019-05-16T13:54:06Z")

</div>

So, the original problem is how Node-RED relates to other installs which overwrite it's default condition(s). The only way to find this without a code debugger is to uninstall everything, install Node-RED and start installing and testing until you find the culprit.

Thanks to those who debugged the problem and addressed it. I resolved it by updating past the problem...

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [6 June 2020 18:56 UTC](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153/115 "2020-06-06T18:56:44Z")

</div>

Closed on 6 June 2020 18:56 UTC



[Previous page](https://discourse.nodered.org/t/global-context-variables-do-not-display-in-the-context-sidebar/3153.md?page=5)
