jellyfin / jellyfin-mpv-shim

MPV Cast Client for Jellyfin
Other
1.59k stars 93 forks source link

Cannot connect to jellyfin with traefik reverse proxy. #186

Closed calmcacil closed 3 years ago

calmcacil commented 3 years ago

Describe the bug Getting connection error on latest stable server with jellyfin desktop 1.9. Server is behind a traefik proxy so its possible there is some interaction there that I'm not aware of but I cant figure out how to access the jellyfin desktop log to figure out why its failing.

Console from jellyfin itself reports successful authentication but jellyfin desktop shows "Connection failure We're unable to connect to the selected server right now. Please ensure it is running and try again."

Shim does work so there seems to be some kind of weird interaction with the desktop application.

To Reproduce Try to connect jellyfin desktop behind traefik.

Expected behavior Being able to login and browse using the jellyfin desktop

Desktop (please complete the following information):

Error Messages Not sure how to access these as mpv shim itself actually works its just the desktop executable.

iwalton3 commented 3 years ago

What are you typing in to connect in the desktop app vs into your web browser?

calmcacil commented 3 years ago

I'm connecting with https://jellyfin.servername.domain.tld which is how I have my thing set up. Works in browser, and I Shim can cast, but the desktop client doesn't manage to get past username/password as it errors out, despite the server log returning Jellyfin.Server.Implementations.Users.UserManager: Authentication request for Calmcacil has succeeded.

iwalton3 commented 3 years ago

I have completely re-worked how the auth works so there is a chance it'll work better in the next release.

calmcacil commented 3 years ago

I guess I should wait till thats released then to see if it resolves the issue.

iwalton3 commented 3 years ago

Please try the new version: https://github.com/jellyfin/jellyfin-desktop/releases/tag/v1.10.0

calmcacil commented 3 years ago

Well, thats actually less functional, doesnt even spit out anything in the jellyfin console about authentication and results in an error.

Connection failure We're unable to connect to the selected server right now. Please ensure it is running and try again.

iwalton3 commented 3 years ago

Do you happen to be providing the CORS header on the reverse proxy? The Jellyfin server should set that but the proxy might be losing the headers.

calmcacil commented 3 years ago

That might potentially be it, need to look into how to make sure thats being passed trough.

calmcacil commented 3 years ago

Closing this as removing my secure headers for the treafik proxy has resolved this issue.