multi-scrobbler icon indicating copy to clipboard operation
multi-scrobbler copied to clipboard

bug: Gotify `version` check makes webook initialization unreliable

Open megatwig opened this issue 1 year ago • 2 comments

Please check existing knowledge before opening an issue

Describe the Bug

Gotify webhooks are initialized by calling the /version endpoint, and the webhook is only used if this call succeeds.

This check is never retried, so a transient error with your Gotify instance/your internet connection could mean no webhook notifications until multi-scrobbler is restarted. This could also happen if e.g. Gotify and multi-scrobbler are both running as docker containers on the same host, and multi-scrobbler starts up before gotify is ready.

https://github.com/FoxxMD/multi-scrobbler/blob/f308f71b5ddc5531fc330f7dd5ce3d1f86b8013f/src/backend/notifier/GotifyWebhookNotifier.ts#L35-L37

imo webhooks should be set up unconditionally - the only benefit I can see for failing on this version check is to avoid potentially sending out failing requests for the rest of the lifetime of the application, which is unlikely to cause major issues.

Platform

Docker

Versions

  • multi-scrobbler 0.8.6 on Docker

Logs

No response

Additional Context

nb: my true motivation for this is actually that I use Pushbits as a notification server which has a Gotify-compatible API but no /version endpoint. I filed an issue with them as it's not really compatible if it's missing API methods, but I'm not sure it's receiving active feature development

megatwig avatar Oct 27 '24 21:10 megatwig

Thanks for the detailed report. The intention behind checking version was mainly to let the user know if they have the URL for the endpoint correct. Since notifications aren't mission critical you are right it should send regardless and the check should instead just be a logged warning.

FoxxMD avatar Oct 28 '24 15:10 FoxxMD

Please try the docker image foxxmd/multi-scrobbler:pr-216 and let me know if this fixes things for you.

FoxxMD avatar Oct 28 '24 16:10 FoxxMD

Available in edge docker image. Will comment when a release is cut that includes it.

FoxxMD avatar Dec 10 '24 16:12 FoxxMD