speedtest-tracker: Discord webhook notifications doesn't work

Describe the bug Discord webhook notifications doesn’t work. Console outputs production.ERROR: Undefined array key "discord_webhook_url"

To Reproduce Steps to reproduce the behavior:

  1. Enable Discord Notifications and Notify on every speedtest run or on threshold failures
  2. Queue Speedtest

Expected behavior Discord notification being actually sent.

Environment (please complete the following information):

  • OS: Raspbian with docker using lscr.io/linuxserver/speedtest-tracker:latest as image
  • Architecture: arm64
  • Version: App: 0.17.1

Screenshots image

image

Logs

speedtest-tracker  | [migrations] 01-nginx-site-confs-default: skipped
speedtest-tracker  | [migrations] done
speedtest-tracker  | ───────────────────────────────────────
speedtest-tracker  | 
speedtest-tracker  |       ██╗     ███████╗██╗ ██████╗
speedtest-tracker  |       ██║     ██╔════╝██║██╔═══██╗
speedtest-tracker  |       ██║     ███████╗██║██║   ██║
speedtest-tracker  |       ██║     ╚════██║██║██║   ██║
speedtest-tracker  |       ███████╗███████║██║╚██████╔╝
speedtest-tracker  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
speedtest-tracker  | 
speedtest-tracker  |    Brought to you by linuxserver.io
speedtest-tracker  | ───────────────────────────────────────
speedtest-tracker  | 
speedtest-tracker  | To support the app dev(s) visit:
speedtest-tracker  | speedtest-tracker: https://github.com/sponsors/alexjustesen
speedtest-tracker  | 
speedtest-tracker  | To support LSIO projects visit:
speedtest-tracker  | https://www.linuxserver.io/donate/
speedtest-tracker  | 
speedtest-tracker  | ───────────────────────────────────────
speedtest-tracker  | GID/UID
speedtest-tracker  | ───────────────────────────────────────
speedtest-tracker  | 
speedtest-tracker  | User UID:    1000
speedtest-tracker  | User GID:    1000
speedtest-tracker  | ───────────────────────────────────────
speedtest-tracker  | 
speedtest-tracker  | using keys found in /config/keys
speedtest-tracker  | An application key was generated at start up, as no environment variable was set.
speedtest-tracker  | To set an application key that persists, read the docs: https://docs.speedtest-tracker.dev/
speedtest-tracker  | [custom-init] No custom files found, skipping...
speedtest-tracker  | [ls.io-init] done.
speedtest-tracker  | [2024-02-22 23:27:46] production.ERROR: Undefined array key "discord_webhook_url"  
speedtest-tracker  | [2024-02-22 23:34:30] production.ERROR: Undefined array key "discord_webhook_url"

Additional context Pressing “Test discord notification” button does send a discord message: Discord_FysiYhGwwE

I’ve tried

  • php artisan migrate --force outputs Nothing to migrate.
  • php artisan cache:clear

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 31 (16 by maintainers)

Most upvoted comments

Apologies, yesterday got away from me. Just put that PR in

@jonezy35 actually yeah its bits vs. bytes. absoluteDownloadThresholdFailed() and absoluteUploadThresholdFailed() expect it’s two inputs to be in byte format as it’s doing a bit conversion.

https://github.com/alexjustesen/speedtest-tracker/blob/main/app/helpers.php#L43-L48

If you open a PR and change the data from downloadBits to just download being passed into the function this should fix it. I can merge from my phone later.

I did the same all day yesterday. Nice refresh! I can get to it later today. Interesting that it works fine on my system, but I WAS testing it with insane thresholds (500000 upload & download) so I guess testing it with lower values would have caused me to see the problem.

Expect a PR later today/ tonight most likely

@jonezy35 actually yeah its bits vs. bytes. absoluteDownloadThresholdFailed() and absoluteUploadThresholdFailed() expect it’s two inputs to be in byte format as it’s doing a bit conversion.

https://github.com/alexjustesen/speedtest-tracker/blob/main/app/helpers.php#L43-L48

If you open a PR and change the data from downloadBits to just download being passed into the function this should fix it. I can merge from my phone later.

Back from a weekend of tech-detox so I’ll take a look at this tonight. I think it has to do with a pretty dated app/helpers.php file getting mixed up with bits vs. byte conversion.

The image I’m using is the latest tag from 30 mins ago.

i cant find this image ?!?

My bad, I didn’t mean the image was released 30 minutes ago. I just meant I pulled whatever the latest image was 30 mins ago. I’m in the middle of work so didn’t check what time the image was released

I JUST pulled this image 30 minutes ago and it’s working, at least with MariaDB. lscr.io/linuxserver/speedtest-tracker:latest @masterwishx Could you try it with MariaDB and see if the issue persists? Can just stand up the containers on a separate machine for testing purposes so as not to mess with your current setup.

i can try but later today , in oracle cloud vps , but should this be problem fixed in bff40b2 ?

Should be working after that PR, which is what I just tested by pulling the latest image 30 mins ago. Did you try re-pulling the image to the latest one as of this morning? The image I’m using is the latest tag from 30 mins ago.

@masterwishx I see. I can stand it up later and test to see if I get any issues with SQLite. Don’t have the time at the moment.

im using SQLite