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

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

Hi @NathGreg,

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

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

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

I have no idea what could cause this.

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

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)

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

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.

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

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

        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.

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". 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:

        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.

1 Like

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):


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:

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?

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