jellyfin-media-player
jellyfin-media-player copied to clipboard
Trailing slash when adding server causes connection failure
To reproduce
Steps to reproduce the behavior:
- Select 'Add Server'
- Enter the 'Host' details with a trailing slash after the port, eg,
http://jellyfin:8096/
. - You'll notice you get a 'Connection Failure' error.
- Remove the trailing slash.
- You'll notice you can connect.
Expected behavior
The connection should work regardless of trailing slash.
Desktop
- OS: Windows
- Version: 10
- Installation method: Windows installer
- Server: 10.8.1 on Linux
Log excerpt
Notice the URL has //
which fails on the server.
2022-07-07 01:04:56 [ INFO ] JS: begin connectToServer
2022-07-07 01:04:56 [ INFO ] JS: tryReconnect: http://jellyfin:8096/
2022-07-07 01:04:56 [ INFO ] JS: getTryConnectPromise http://jellyfin:8096/
2022-07-07 01:04:56 [ INFO ] JS: ConnectionManager requesting url: http://jellyfin:8096//system/info/public
2022-07-07 01:04:56 [ INFO ] JS: fetchWithTimeout: timeoutMs: 20000, url: http://jellyfin:8096//system/info/public
2022-07-07 01:04:56 [ INFO ] JS: fetchWithTimeout: succeeded connecting to url: http://jellyfin:8096//system/info/public
2022-07-07 01:04:56 [ INFO ] JS: ConnectionManager response status: 404, url: http://jellyfin:8096//system/info/public
Still not fixed 👍
Still doesn't work - maybe it would be good enough to have the form strip the trailing slash on save? If that's acceptable, I could try making a PR with such workaround.
i mean at a glance this looks like its probably as simple as needing to check for the trailing slash before appending "/system/info/public". Frankly everybody that supports this repo is super busy and with 10.9 coming out soon its all hands on deck. this should be a simple fix, so, we are looking to you community members for it. fix the string concat and open a PR. edit: @jaen when I wrote this I thought I was on the other issue thread sorry. this was a really strong voice to use with somebody who literally just offered this exact thing, sorry. we would appreciate your contribution.
This is a rather simple one, server
needs to have the trailing /
stripped here before the public info endpoint is appended.
https://github.com/jellyfin/jellyfin-media-player/blob/d05f06da9a8a9ecebeb00ad52210247abb2d9916/native/find-webclient.js#L1-L9