dashy
dashy copied to clipboard
[BUG] Uptime-Kuma Widget Gives JSON Error and Fails to Load
Environment
Self-Hosted (Bare Metal)
System
Proxmox PVE - Based on Debian
Version
3.0.1
Describe the problem
When updating the conf.yml file with widget information to load an Uptime-Kuma dashboard, it fails with
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
On the page and console, the initial error reports ' An error occurred, see the logs for more info. Unable to fetch data '.
This error only appears when the YAML code for uptime-kuma is present.
I've put the strings in "" and ''. With the clock, the YAML update loads the clock but still fails when adding uptime-kuma widget. So it sounds like something isn't parsing correctly in the uptime-kuma widget? Could very well be wrong.
Code block in conf.yml
- name: Status
displayData:
collapsed: false
widgets:
- type: clock
- type: uptime-kuma
useProxy: true
options:
apiKey: umy_5secret_ARmAPIkeyufeJ9l
url: http://IPaddress:3001/status/dashy
I've also tried the same port/page as listed in the documentation. Same error.
Doc page: https://dashy.to/docs/widgets/#uptime-kuma
Additional info
- Issue exists in Chrome and Safari
- Tried rebuilding app after including API key
- Removed YAML for problem widget and all errors went away
Please tick the boxes
- [x] You have explained the issue clearly, and included all relevant info
- [X] You are using a supported version of Dashy
- [X] You've checked that this issue hasn't already been raised
- [X] You've checked the docs and troubleshooting guide
- [X] You agree to the code of conduct
Could be related to https://github.com/Lissy93/dashy/issues/1549
Hi, I've just tested this myself and you have to use /metrics url instead of "/status/dashy" which you used. When using /metrics it should work.
But as you already found there currently is an issue with auth-headers, so you will get a 401 error. I will close this issue as duplicate, and we will track progress of the auth-headers in https://github.com/Lissy93/dashy/issues/1549
I'm getting an error with uptime kuma as well. I'm using the metrics endpoint but from the logs it looks like dashy is expecting json but uptime kuma just returns text