node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

After multiple/quick dashboard reload top-bar and side-bar disappear

Open QBANIN opened this issue 1 year ago • 12 comments

Current Behavior

After multiple dashboard reload (F5 in web browser) top and side bar disappear and does not reappear until browser cache is cleared.

This is happening after upgrade from 1.4.1 to 1.8.1 . After reverting to 1.4.1 problem disappears.

Expected Behavior

Fully functional dashboard

Steps To Reproduce

  1. Open Dashboard
  2. Reload quickly few times

Environment

  • Dashboard version: 1.8.1
  • Node-RED version: 3.1.3 - 3.1.9
  • Node.js version: no idea, bundled with official NR docker image
  • npm version: no idea, bundled with official NR docker image
  • Platform/OS: Windows/ Mac
  • Browser: Firefox, Chrome, safari

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

QBANIN avatar Apr 28 '24 17:04 QBANIN

I have tried quite hard but have failed to replicate this. I am running on ubuntu and not using Docker.

colinl avatar Apr 28 '24 20:04 colinl

In my case I can reproduce this issue on Windows/Linux/Mac + Firefox/Chrome/Safari . I don't know how much it matters but the Dashboard is behind an Nginx Reverse Proxy with websockets active, it shouldn't change anything since as I mentioned earlier 1.4.1 works without a problem. Something must have changed in the Dashboard 2.0 code between 1.4.1 and 1.8.1.

QBANIN avatar Apr 28 '24 21:04 QBANIN

The main thing that changed between those releases was the configuration option for the sidebar type if I recall correctly. Why clearing the cache affects this though, I have no idea - we don't store anything in session storage or cookies 🤔

joepavitt avatar Apr 30 '24 09:04 joepavitt

Is there any way I can assist you to debug this issue?

QBANIN avatar May 01 '24 21:05 QBANIN

a screen recording if you're able to would be ideal

joepavitt avatar May 02 '24 07:05 joepavitt

It turned out that somehow when opening the URL Dashboard 2.0 also served data from the native Dashboard in the background, (you can see it in the local storage of the browser console) which causes some kind of garbage in the browser cache. Removing the node-red-dashboard from the palette is not enough, you need to physically remove the directory from disk. More interestingly, in the dockerized version od node-red, after some time this add-on reinstalls itself. I got around the problem by setting the permissions of the node-red-dashboard directory to 000, which is an indirect solution, but it works. Any idea why this is happening?

QBANIN avatar Jul 13 '24 15:07 QBANIN

Yeah you say "native dashboard", what do you mean?

joepavitt avatar Jul 13 '24 18:07 joepavitt

Yeah you say "native dashboard", what do you mean?

Dashboard 1.0 package node-red-dashboard

QBANIN avatar Jul 13 '24 20:07 QBANIN

you need to physically remove the directory from disk

Which directory? If you uninstall it then that should remove it completely.

colinl avatar Jul 13 '24 20:07 colinl

you need to physically remove the directory from disk

Which directory? If you uninstall it then that should remove it completely.

node-red-dashboard from modules dir. Pressing uninstall button on the list in palette manger does not remove this directory. That's just 1 half of the problem. The second half is why is it served together with dash 2.0 under /dashboard url?

The "3rd half" ;) is that even after deleting that dir it magically comes back after a while (few hours or days). Why? How?

QBANIN avatar Jul 13 '24 21:07 QBANIN

node-red-dashboard from modules dir.

Exactly which directory? Please try and answer questions fully.

colinl avatar Jul 14 '24 07:07 colinl

even after deleting that dir it magically comes back after a while (few hours or days). Why? How?

Show us your package.json file after you uninstall the dashboard.

colinl avatar Jul 14 '24 08:07 colinl