Node Red re-loads flows in Chrome tab

Prior to a day-or-two ago, I could load NodeRed into a tab in Chrome and could come back to it at any time and the flows were still there, and (more importantly), the debug window was still there with all the history.

Now, I switch away from that tab in Chrome for "a while" (a few minutes ??), and when I select that Chrome tab again, it "re-loads" all the nodes and flows and when I select the debug window, it is blank (which doesn't help with debugging!!)

1 Like

What do you mean by ā€œre-loadsā€?
Do you display the debug output ā€˜all nodesā€™ or ā€˜current flowsā€™?
Do you have lots of debug activity on other tabs?

The debug log is one log. It can be filtered per tab but it is a finite length then things get rolled off it. I believe there is a setting in ā€˜settings.jsā€™ that you can increase it.

When you select the NodeRed tab that I had left open in Chrome, it blanks, then a little progress bar appears and says "Loading Nodes", then "Loading Flows", and then you can see all your nodes and flows - but the debug window has been erased - again.

What version of chrome and what OS is this on?

Node-red never reloads the page by itself, so must be something Chrome is choosing to do for some reason.

Windows 10, latest Chrome 90.0.4430.85, Home Assistant on a Raspberry Pi. As I mentioned, it was all working fine, then I wrecked the installation and had to re-load it from a snapshot etc - and now it's gone awry.

I've opened NodeRed in a Microsoft Edge window too - same behaviour

Do you happen to use one on of th tab saving programs ? In my case i am using The Marvellous Suspender and it causes this behaviour as it puts the tab to sleep in the background to save memory.

This happens in Google Chrome and with the inbuilt sleep function in Edge

Craig

Craig, I got excited about your reply (because it sounded just like the issue), found the chrome://discards/ page and toggled-off the "Auto Discardable" field for the NodeRed tab - and it didn't fix the problem :frowning:

The problem is definitely in NodeRed I think because it happens over multiple browsers on multiple machines (and I don't use any tab saving programs). I did update NodeRed to the latest version when I re-installed after my crash.

Stop node red and restart it in a terminal and post the full log here, up to the point where you see the problem in the browser.

I don't understand what you mean by restarting it in a terminal ?

I mean start it using the command line command node-red or whatever is the normal way of doing that in Windows. You should see the log output, starting with the Welcome to node-red message.

Node-Red is running on my Raspberry Pi, and I'm using a browser to view it. Maybe I should be stopping it and starting it on the Pi and trying to see what Pi's log says ??

Sorry, I missed the fact that node-red is running on a pi. Yes it is the pi that we need to see the log from. Assuming you installed node-red using the recommended script then you should be able to do that with
node-red-stop
node-red-start

In HA on the Pi, I can find the HA full log, but it only displays warnings and errors (not routine information like startup and shutdown messages). I can start and stop NodeRed frm the Supervisor menu, but see nothing recorded. I wonder whether I should try (for the very first time) to roll-back NodeRed to the previous version?

I don't know anything about HA. Perhaps ask on an HA forum how to see the node-red startup log. In fact, since as far as I can see no-one else has seen this issue, perhaps it is an HA issue, so maybe ask there about this issue too.

Hi,
I also have this very annoying problem but I think is has nothing to do with Node Red. I run Home assistant on an RPI4 and work a lot with node red. The problem is due to all chromium based webbrowsers (and there are alot of them). They all try to limit the memory consumption and for that they reload at random intervals inactive tabs . Also other webpages have this problem, not only node red. I tried some chrome plugins who claim to "keep" the inactive tabs but all without much success. Also tried other browsers like edge, firefox etc but no solution. It's rather frustrating to go back to a node red tab and suddenly you are lost everything because chromium engine tries to safe memory :grimacing: If someone knows a solution to this ...

bart1511: I'm not sure it is a browser problem because it was all working fine until I had to rebuild my Home Assistant project from a snapshot, and chose to update NodeRed to the latest version in the process - and then I noticed the problem.

Maybe you are right. Afterwards I was thinking that I only have the problem with homeassistant webpages, not only node red but also supervisor, Z2MQTT etc. So I tried to open node red directly (not within the homeassistant interface) on http://:1880 and login with my HA username. I left the node red page open for about an hour and it did not reload. So I was wrong :thinking: , it has something to do with HA. Maybe you can use this as an intermediat solution

http://HA-Server-IP:1880