Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Uptime-Kuma Widget Gives JSON Error and Fails to Load #1561

Closed
5 tasks done
awildeone opened this issue May 1, 2024 · 2 comments
Closed
5 tasks done

[BUG] Uptime-Kuma Widget Gives JSON Error and Fails to Load #1561

awildeone opened this issue May 1, 2024 · 2 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working 📜 Config issue Issue inside the user's config

Comments

@awildeone
Copy link

awildeone commented May 1, 2024

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

image image

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

@awildeone awildeone added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label May 1, 2024
@awildeone
Copy link
Author

Could be related to #1549

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label May 1, 2024
@CrazyWolf13
Copy link
Collaborator

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 #1549

@CrazyWolf13 CrazyWolf13 added 📜 Config issue Issue inside the user's config and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working 📜 Config issue Issue inside the user's config
Projects
Status: Done
Development

No branches or pull requests

4 participants