grafana / tns

Observability Demo App
227 stars 51 forks source link

Grafana is running but when you try to access it I get a message saying Grafana failed to load application files #41

Open larsf opened 2 years ago

larsf commented 2 years ago

The full message is: If you're seeing this Grafana has failed to load its application files

  1. This could be caused by your reverse proxy settings.

  2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath. If not using a reverse proxy make sure to set serve_from_sub_path to true.

  3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build

  4. Sometimes restarting grafana-server can help

  5. Check if you are using a non-supported browser. For more information, refer to the list of supported browsers.

In the Grafana log I do see the following :

t=2022-08-18T20:20:00+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/grafana/public/build/1762.f173e95646339d94c42a.js status=404 remote_addr=127.0.0.1 time_ms=1 size=36874 referer=http://localhost:60936/ t=2022-08-18T20:20:00+0000 lvl=eror msg="Failed to look up user based on cookie" logger=context error="user token not found" t=2022-08-18T20:20:00+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/grafana/public/build/grafana.light.f173e95646339d94c42a.css status=404 remote_addr=127.0.0.1 time_ms=3 size=36874 referer=http://localhost:60936/ t=2022-08-18T20:20:00+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/grafana/public/build/8529.f173e95646339d94c42a.js status=404 remote_addr=127.0.0.1 time_ms=7 size=36874 referer=http://localhost:60936/ t=2022-08-18T20:20:00+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/grafana/public/build/6695.f173e95646339d94c42a.js status=404 remote_addr=127.0.0.1 time_ms=10 size=36874 referer=http://localhost:60936/ t=2022-08-18T20:20:00+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/grafana/public/build/app.f173e95646339d94c42a.js status=404 remote_addr=127.0.0.1 time_ms=11 size=36874 referer=http://localhost:60936/ t=2022-08-18T20:20:00+0000 lvl=eror msg="Failed to look up user based on cookie" logger=context error="user token not found" t=2022-08-18T20:20:00+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/grafana/public/img/grafana_icon.svg status=404 remote_addr=127.0.0.1 time_ms=1 size=36874 referer=http://localhost:60936/

larsf commented 2 years ago

I thought for a second I figured out what the problem was - I thought it was trying to find the wrong files because I had a tab already open running a different version of Grafana and that the filenames from that were being cached and reused when I tried to access Grafana in the demo. Started a virgin Firefox, and tried accessing Grafana in the demo pod from that, but same problem. However the Grafana web developer console does provide some hints:

The resource from “http://localhost:50530/grafana/public/build/runtime.f173e95646339d94c42a.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).