hassio-addons / addon-grafana

Grafana - Home Assistant Community Add-ons
https://addons.community
MIT License
226 stars 62 forks source link

Grafana fails to display with multiple browsers behind cloudfared #332

Closed philbert closed 1 year ago

philbert commented 1 year ago

Problem/Motivation

Grafana fails to display with multiple browsers behind cloudfared with the following error: image The only browser I have not encountered the same error on is Chrome.

Tested versions:

The specific error from firefox is this: Uncaught SyntaxError: identifier starts immediately after numeric literal /api/hassio_ingress/hO7ODvUpaIuTffaVzVbrsvYPD7iIVSe5c9JGgc3AkIo/public/build/7490.cf2da2a42f577bdb1843.js:187:4516

In Safari it is this: SyntaxError: No identifiers allowed directly after numeric literal /api/hassio_ingress/hO7ODvUpaIuTffaVzVbrsvYPD7iIVSe5c9JGgc3AkIo/public/build/7490.cf2da2a42f577bdb1843.js:187

Here is the offending file from Firefox (with the problem) and from Chrome (without the problem) Firefox.7490.cf2da2a42f577bdb1843.js.txt Chrome.7490.cf2da2a42f577bdb1843.js.txt

I did not upload the file from Safari because the offending line looks the same as it does in Firefox.

Looking at line 187 character 4516 in Firefox.7490.cf2da2a42f577bdb1843.js.txt which is the .

T.exports=i(1.valueOf)}
             ^

Compare this with line 198 in character 4516 in Chrome.7490.cf2da2a42f577bdb1843.js.txt, which is a space

T.exports=i(1 .valueOf)}
             ^

Further notes:

Expected behavior

I expect the dashboard to be displayed

Actual behavior

I get the error "If you're seeing this Grafana has failed to load its application files"

Steps to reproduce

The error looks reasonably platform independent. Install HA OS, Grafana and setup the Cloudfare tunnel. I don't believe it should be necessary to have any graphs configured.

Proposed changes

Find and fix the offending numeric literal Work around is to use the mobile app, or use the local connection.

kanersps commented 1 year ago

I have suddenly started getting this as well, un sure what caused it. No updates happened, no restarts either, and it just suddenly quit working via Cloudflared. Locally it still works fine

kanersps commented 1 year ago

Update: re-installing resolves the issue, unsure for how long. Will report back if it breaks again, it's also quite simple to get backup and running, just export your dashboards and re-import them.

philbert commented 1 year ago

This issue seems to have disappeared since the release of the 9.0.0 addon