FlowFuse / FlowFuse/node-red-dashboard

Yet Another PWA Hang - after dashboard (or node red) update

Open
#1,042 0 comments 0 reactions 0 assignees View on GitHub
needs-triage type:bug
Dominant language
HTML
Stars
355
Forks
82
Avg merge
4d 23h
Merged PRs (30d)
24

Description

### Current Behavior

On a system using cloudflare Zero Trust for authorisation, after upgrading node red and the dashboard (I don't know which was the trigger) I find that if, in addition, the authorisation token has expired, existing PWA apps hang on startup, showing a blank page.
In the developer tools I see
`An error occurred:
SyntaxError: Unexpected token '<', " {
...
})
.catch((err) => {
if (err instanceof TypeError && err.message === 'Failed to fetch') {
forcePageReload(err)
} else {
// handle general errors here
console.error('An error occurred:', err)
}
})
```
In this case forcing a page reload would presumably fix it, but then there is the possibility of repeated reload attempts if the error is caused by something else. On the other hand, what else can we do if there is an error? Just hanging with a blank screen and no notification is not ideal.

### Expected Behavior

_No response_

### Steps To Reproduce

_No response_

### Environment

- Dashboard version: 1.12.1
- Node-RED version: 4.0.1
- Node.js version:
- npm version:
- Platform/OS: Ubuntu and Android
- Browser: Edge and Chrome

### Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.