Weird NodeRED Behavior, Reloading

I don’t know what’s causing this, but recently, if I switch tabs in Chrome for a while, then go back to a tab that had NodeRED open, NodeRED re-loads and I lose everything I was working on that wasn’t yet deployed.

NodeRED latest running as add-on in Home Assistant.

I have the same problem, and no idea how to solve…

Same here, and no idea either, but I think it is not NodeRED related, but an issue of Home Assistant. I have this effect on other pages, too, for example Supervisor or any lovelace dashboards.

One workaround is to open NodeRED directly in you browser, not thru HA ingress. You just need the right port, which is 1880 until you haven’t changed it.
http://<homeassistant-ip>:1880
If you need to login, you can use your HA credentials.

4 Likes

That works.

So, it’s not NodeRED only. It seems to happen with other add-ons as well. I wonder if it’s a Chrome setting and not related to HA.

And it’s not only chrome, happens with firefox as well. It has something to do with the way browsers handle inactive tabs that resets the connection with HA.

If you open the HA instance in its own window with no other tabs, it works fine.

1 Like

That’s another workable solution. Thanks for the tip.

I’m having the same issue. This is realy annoying because I sometimes need to lookup things while I’m creating a flow. When I get back to the nodered tab, it reloads and all work is lost. Opening NodeRED directly is a solution, but it’s not that practical.

Kind regards,
Merijn

Pull your browser tab to its own space so it’s always in focus and use a separate window for other lookups.

If only chrome/browsers would treat pinned tabs similarly… :confused:

THANK YOU!
the other thing that ended up being solved is I would often lose the ability to see debug messages or even statuses under nodes in the workspace. It’s an early christmas present!

After not being super satisfied by the workaround mentioned here, I got a great answer from some folks on discord about this. This reload happens because the connection to HA is closed after 5 minutes of inactivity. Once you navigate back to the tab, it has to reconnect, and that apparently triggers a refresh on the page being loaded through ingress. (I have this silly reload problem on NodeRED, ESPHome, and Grafana). I was told this was introduced here: Close websocket connection after being hidden for 5 minutes by bramkragten · Pull Request #6149 · home-assistant/frontend · GitHub

The Fix:
Go to your profile (bottom left of the HA screen) and turn off “Automatically close connection”

this seems to be working for me so far.

11 Likes

I can’t tell you if that works or not. What I can tell you, using direct access (yourHAip:1880) will not trigger any reloading of the page when you navigate to another window/tab

This is the winner. Thanks for this!!!