gerry
1 June 2024 18:57
21
Installed the package, imported the multi needle example and I get an absolutely blank page, everything is white.
Try restarting node-red.
Today installed on the server and similar thing happened, not all white but gauge was not showing, the other time was using node-red on laptop running frim command line, don't remenber if restart was necessary.
If alk blank page in dashboard higher than 1.8.0 check this
opened 05:20PM - 01 Jun 24 UTC
bug
needs-triage
### Current Behavior
Hello
This issue is related to #817 it seems that the fā¦ ix applied in #881 is not sufficient, at least for Android.
Just updated one of the instances I have to v1.11.1 to check if this was fixed or not.
According to my tests:
- In Windows PC using Edge or Chrome there are issues, it show a white page upon opening the page, with the same error that was being generated before
![image](https://github.com/FlowFuse/node-red-dashboard/assets/17281826/e49719a3-9937-4e50-bcfd-3131b5cbb361)
- Same thing in Linux (raspberryPi) using Chromium and Firefox
- Same thing in Android using Chrome
In order for this error to show, is necessary to open the page in the browser (wait until the new PWA version is downloaded and the popup to reload appears), after this is necessary to close the browser window (all instances of chrome / edge / etc.., in windows is necessary to close the chrome icon on the notification tray and in android is necessary to force close the chrome browser), when trying to access again the site the page does not load until we force an incorrect address (like 'https://my.site.com/dashboar') at this point the login popup is shown and we can access the real address `https://my.site.com/dashboard`.
If we close the browser it is necessary to repeat the process.
The fix seems simple, according to my attempts is necessary to change the file `ui/src/main.mjs` the `catch` for the `fetch('_setup')` needs to change to:
```js
.catch((err) => {
if (err instanceof TypeError) {
if (err.message === 'Failed to fetch') {
console.log('auth error:', err)
console.log('redirecting to:', window.location.origin + '/dashboard')
// window.location.replace(window.location.origin + '/dashboard') //Original, seems to have no issues with Edge and Chrome on Windows, doesn't work on Android (Not tested on Linux browser)
// window.location.href = window.location.origin + window.location.pathname + window.location.search + (window.location.search ? '&' : '?') + 'reloadTime=' + Date.now().toString() + window.location.hash; // Also works on Edge + Chrome on windows, doesn't work on android
// Reloading dashboard without using cache by apending a cache-busting string to fully reload page to allow redirecting to auth
window.location.replace(window.location.origin + '/dashboard' + '?' + 'reloadTime=' + Date.now().toString() + Math.random()) // Seems to work on Edge and Chrome on Windows, Chromium and Firefox on Linux, and also on Chrome Android (and also as PWA App)
} else {
// handle general Type errors here
console.error('An error occurred:', err)
}
} else {
// handle general errors here
console.error('An error occurred:', err)
window.location.replace(window.location.origin + '/dashboard' + '?' + 'reloadTime=' + Date.now().toString() + Math.random()) // Seems to work on Edge and Chrome on Windows, Chromium and Firefox on Linux, and also on Chrome Android (and also as PWA App)
}
})
```
It seems the original fix was enclosed in a series of `if` statements that are not catching the correct error, since I just added the original fix ` window.location.replace....` to the `else` of the first `if`
### Expected Behavior
_No response_
### Steps To Reproduce
_No response_
### Environment
- Dashboard version: 1.11.1
- Node-RED version: 3.1.7
- Node.js version: 20.11.0
- npm version: 10.4.0
- Platform/OS: Server (Ubuntu 22.04.3
- Browser: windows (Edge, chrome), Linux (Chromim, Firefox), Android (Chrome)
### Have you provided an initial effort estimate for this issue?
I am not a FlowFuse team member
gerry
1 June 2024 19:13
23
restart fixed it. didn't see that one coming
1 Like
Colin
1 June 2024 20:38
24
You certainly should not need to restart node-red after installing the gauge node (assuming it was installed using Manage Palette). Did you try refreshing the page in the browser?
gerry
1 June 2024 21:02
25
I think I did that would be normal for me, but sadly can't make that statement with total certainty,
[edit] yes, did use palette manager on Pi 3b+ running bookworm. node red 3.19
Colin
1 June 2024 21:14
26
Which version of the dashboard are you using?
Just did a test in a new node-red instance (V4.0.0-beta4) and Dashboard V1.11.1.
Indeed is necessary to restart node-red in order for the gauge appears on the page. It's the same issue with the ui-led
and ui-frame
nodes for DashBoard2, it seems is a condition for nodes for dashboard2 that requires a node-red restart to be correctly placed on the dashboard page.
Colin
2 June 2024 06:42
29
gerry:
dashboard 1.8.1
It is on 1.11.1 now, but if you use the dashboard requiring a login then I suggest not upgrading yet due to the PWA issue noted in post #22 .
Colin
2 June 2024 07:35
30
I think you are right. Either a restart should not be required, or the user should be informed that it is required. I have submitted an issue against the dashboard. A node red restart is necessary after installing third party ui nodes Ā· Issue #938 Ā· FlowFuse/node-red-dashboard Ā· GitHub
Thanks Colin - its something ive asked Nick for some help on, but don't have a clear solution yet
gerry
3 June 2024 18:48
32
Playing with the gauge, aside from install, it seems solid with no hassles. Pretty much everything I've thrown at it so far it handles well.
Colin
3 June 2024 20:03
33
Excellent, thanks @gerry .
Colin
Split this topic
4 June 2024 07:40
34
2 posts were split to a new topic: Dashboard 2 widget positioning
(Waves hello)
Hi folks.
I have been a bit slack lately and am not sure where I am in the scheme of things NR.
I have dashboard 3.6.6
if I look at/in my palette manager.
So can I use this node?
Bobo
4 June 2024 06:00
36
This is for the Flowfuse Dashboard (known as 2). Do you have it installed?
Honestly.... I don't know.
Probably not though.
Thanks.
Colin
4 June 2024 07:31
39
Trying_to_learn:
I don't know.
Surely you have been using node-red long enough to know that you can see which nodes you have installed by looking in Manage Palette. You can see there whether @flowfuse /node-red-dashboard is installed. If you didn't know that the flowfuse dashboard was called then a search for flowfuse dashboard would no doubt have answered that.
Maybe.
But the topic is Dashboard 2.0
(no mention of fuse
.)
I gave the version from Palette manager - which is greater than 2.0.
I was asking as I am not sure.
Colin
4 June 2024 13:27
41
It seems you have not been paying attention to the 242 threads there have been, tagged with dashboard-2, about the new Dashboard that is now the recommended dashboard for new systems.
1 Like