# After upgrade, UI stuck at "Adding flows to workspace"

**URL:** <https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520>\
**Category:** General\
**Created:** [22 July 2020 01:52 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520 "2020-07-22T01:52:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![NathGreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nathgreg/32/26228_2.png) [@NathGreg](https://discourse.nodered.org/u/NathGreg)\
**Post date:** [22 July 2020 01:52 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/1 "2020-07-22T01:52:02Z")

</div>

I apologise if this has been written about elsewhere, but searching the forums and google haven't yielded anything helpful.

TL;DR: After upgrading the node-red install on my pi using the official script, everything appears to restart without error, but when I enter my credentials for the webUI, it cycles through some activities and progress bars, then gets stuck at "Adding flows to workspace" (about 90% through the progress bar).  
It's been stuck there for about an hour. Restarting the pi and the node-red haven't helped.

It appears that nodes are active and operating in the background, as I get an instant message from a node which triggers on-load. I just can't access the UI.

Running node-red-log gives no errors, even on trace level, and sits quietly waiting:

# Welcome to Node-RED

22 Jul 11:58:16 - [info] Node-RED version: v1.1.2  
22 Jul 11:58:16 - [info] Node.js version: v10.22.0  
22 Jul 11:58:16 - [info] Linux 5.4.51-v7+ arm LE  
22 Jul 11:58:17 - [info] Loading palette nodes  
22 Jul 11:58:27 - [info] Worldmap version 2.0.12  
22 Jul 11:58:28 - [info] Dashboard version 2.14.0 started at /ui

My previous install of node-red had been via apt, but after upgrading from Stretch to Buster, I used the official node-red Pi install script. It completed without error, showing that it uninstalled the previous version and successfully installed the new one.

I am using projects, if that makes any difference?

Any help about where to look would be appreciated.

Cheers,  
Nathan

---

<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:** [22 July 2020 08:53 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/2 "2020-07-22T08:53:39Z")

</div>

Hi @NathGreg,

can you check your browser's developer console for any error messages?

---

<div class="post-metadata">

**Author:** ![NathGreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nathgreg/32/26228_2.png) [@NathGreg](https://discourse.nodered.org/u/NathGreg)\
**Post date:** [22 July 2020 12:32 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/3 "2020-07-22T12:32:47Z")

</div>

Thanks Knolleary for the tip.  
Sure enough there are errors in the browser console.  
See image:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6beafb14f5f6896758bd85d7a8425b127a55cad4.png)

---

<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:** [22 July 2020 12:36 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/4 "2020-07-22T12:36:25Z")

</div>

What browser (and version) are you using?

`console.warn` is supported in every single browser - [https://developer.mozilla.org/en-US/docs/Web/API/Console/warn#Browser\_compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Console/warn#Browser_compatibility)

I have no idea what could cause this.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 July 2020 12:46 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/5 "2020-07-22T12:46:56Z")

</div>

Do you have any browser plugins installed ? maybe one of them is modifying console.warn ?

---

<div class="post-metadata">

**Author:** ![NathGreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nathgreg/32/26228_2.png) [@NathGreg](https://discourse.nodered.org/u/NathGreg)\
**Post date:** [22 July 2020 23:14 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/6 "2020-07-22T23:14:14Z")

</div>

That was from Chrome Version 83.0.4103.116 (Official Build) (64-bit) on OSX.

The following is from Safari Version 13.0.4 (15608.4.9.1.3)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9b6682813b61a86291d9db50ee1511a995e777b4.png)

---

<div class="post-metadata">

**Author:** ![NathGreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nathgreg/32/26228_2.png) [@NathGreg](https://discourse.nodered.org/u/NathGreg)\
**Post date:** [23 July 2020 01:11 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/7 "2020-07-23T01:11:52Z")

</div>

Good suggestion thanks.  
Both Chrome and Safari do the same, likewise Chrome Incognito with all extensions off.

---

<div class="post-metadata">

**Author:** ![NathGreg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nathgreg/32/26228_2.png) [@NathGreg](https://discourse.nodered.org/u/NathGreg)\
**Post date:** [23 July 2020 02:54 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/8 "2020-07-23T02:54:00Z")

</div>

I'm no developer, so I'm getting out of my depth here.

What has me curious is that on line 612 of red.min.js, a few lines before the console.warn that's supposedly causing the issue, console.warn is used without error.

```auto
if (RED.events.DEBUG && console.warn(t, e), n[t])

```

In context here, as part of the RED.events function:

```auto
        emit: function() {
            var t = arguments[0]
              , e = Array.prototype.slice.call(arguments, 1);
            if (RED.events.DEBUG && console.warn(t, e), n[t])
                for (var o = 0; o < n[t].length; o++)
                    try {
                        n[t][o].apply(null, e)
                    } catch (e) {console.warn("RED.events.emit error: ["+t+"] "+e.toString()),console.warn(e)
                    }
        }

```

The if statement must be evaluating true, otherwise we wouldn't end up in the for loop.  
I'm wondering why we're ending up in the catch block, I guess because it doesn't like something about:  
"n[t][o].apply(null, e)"...?

Anyway, I know this is not the right approach, because the catch block is being executed for a reason...  
but, I commented out the 2x console.warn statements in the catch, and it now loads the editor.

```auto
catch (e) {/*console.warn("RED.events.emit error: ["+t+"] "+e.toString()),console.warn(e)*/

```

Next step I tried, replacing console.warn with console.log, and adding a console.log(t,e) after the if and before the for loop.  
This actually worked fine, and the editor loaded as expected.

What I did notice though, as the console iterated through all the node-types added, the last one that was successfully loaded, was not the last on in my node-list. The next node should have been "[meraki-dashboard-api](https://flows.nodered.org/flow/b67248b9bc0777d641340403feb8bad6)". Looking in the pallet, it said it was running 0.8.0, but 0.9.0 was available.  
I upgraded to the new version of this node, switched the console.log back to console.warn, but unfortunately back to the original error.  
Switching the warns back to logs, I got in to the editor and disabled that node.  
Logs back to warns, and everything loaded fine.

red.min.js now looks like this:

```auto
        emit: function() {
            var t = arguments[0]
              , e = Array.prototype.slice.call(arguments, 1);
            if (RED.events.DEBUG && console.warn(t, e), n[t]) {
                console.log(t, e);
                for (var o = 0; o < n[t].length; o++)
                    try {
                        n[t][o].apply(null, e)
                    } catch (e) {
                        console.warn("RED.events.emit error: [" + t + "] " + e.toString()),
                        console.warn(e)
                    }
            }
        }

```

It appears that in my instance, the meraki-dashboard-api node is resulting in "e" being undefined, and console.warn isn't handling undefined. Is that expected behaviour?

So I guess long story short, there seems to be something unhappy with the combination of the meraki-dashboard-api node, my setup/config and the new version of node-red.

I'll talk to the developer of the node in question, he's a colleague of mine.

Thanks everyone for helping me get on the right track.

---

<div class="post-metadata">

**Author:** ![martin\_mpa](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@martin\_mpa](https://discourse.nodered.org/u/martin_mpa)\
**Post date:** [23 July 2020 10:09 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/9 "2020-07-23T10:09:49Z")

</div>

Hello together,

I am not sure if this is really related. I suddenly have the same "Adding flows to workspace" problem, but with a different error and on Windows 10 (Chrome as well as Firefox):

 ![error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/a/2a77da19d22ac92451ed7dfc00c8bf6adb43031d.png)  
It came out of nothing. Yesterday all was fine, today this, without updating node.js or Node-RED.  
I did, however, update both to the latest stable versions after encountering the blocker. my status now:

```auto
23 Jul 11:48:52 - [info] Node-RED version: v1.1.2
23 Jul 11:48:52 - [info] Node.js version: v12.18.3
23 Jul 11:48:52 - [info] Windows_NT 10.0.19041 x64 LE
23 Jul 11:48:52 - [info] Loading palette nodes
23 Jul 11:48:53 - [info] Dashboard version 2.23.0 started at /ui

```

Any ideas?

---

<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:** [21 September 2020 10:09 UTC](https://discourse.nodered.org/t/after-upgrade-ui-stuck-at-adding-flows-to-workspace/30520/10 "2020-09-21T10:09:50Z")

</div>

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