manuel-rw / jellyfin-discord-music-bot

A simple and leightweight Discord Bot, that integrates with your Jellyfin Media server and enables you to listen to your favourite music directly from discord.
MIT License
81 stars 9 forks source link

Bot unable to authenticate against Jellyfin #363

Open IReclaimer opened 3 weeks ago

IReclaimer commented 3 weeks ago

The Music Bot is unable to authenticate against Jellyfin: ERROR [JellyfinService] Failed to authenticate with response code 200

Steps to reproduce the behaviour:

  1. Start the Music Bot container.
  2. Observe the logs and authentication process.

The Music Bot should be able to authenticate successfully against Jellyfin, allowing access to the media resources.

DEBUG Logs: https://pastebin.com/cqm4Qj1g

Environment Variables:

DISCORD_CLIENT_TOKEN=[Discord_Token]
JELLYFIN_SERVER_ADDRESS=[http://my.internal.jellyfin.server:8096]
JELLYFIN_AUTHENTICATION_USERNAME=Jellybot
JELLYFIN_AUTHENTICATION_PASSWORD=[Complex_Password]
LOG_LEVEL=DEBUG
UPDATER_DISABLE_NOTIFICATIONS=false
manuel-rw commented 5 days ago

Are the [ ] just from removing the actual value or do you have them in your environment variables?

IReclaimer commented 5 days ago

Thanks for writing replying!

Everything in the square brackets '[xxx]' is just to indicate that what's shown isn't the real value. There are no square brackets in the real values.

manuel-rw commented 3 days ago

Do you have anything after the Jellyfin URL? Remove any /, # or index.html from the URL. Example: https://my-jellyfin.com

IReclaimer commented 3 days ago

I use the internal network FQDN of the Jellyfin server as opposed to the external domain since both are on the same network. The internal FQDN is: http://jellyfin.lab.home.arpa:8096

I assume the port is needed and isn't causing an issue? Unless it absolutely has to be the external network name?

manuel-rw commented 2 days ago

No, that shouldn't be an issue. Is there a proxy between the bot and Jellyfish? What version of Jellyfin do you run?

IReclaimer commented 2 days ago

No, there's no proxy between the box and jellyfin. They're both on the same subnet.

There is an Nginx instance on the network which Jellyfin uses as a reverse proxy, but that shouldn't come into play unless I used the external domain name to access it.

Is there anything I can do to gather more helpful information for you?

manuel-rw commented 2 days ago

Yes, send your Jellyfin version. You could also try to replicate the request manually to debug further. It seems that Jellyfin is trying to return the normal UI instead of the API. The bot only works when the API is correctly handled.