mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-24 07:30:57 +01:00
[Issue]: Android connects first time only. After close, will not reconnect. #5648
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#5648
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @caeci11ius on GitHub (Apr 29, 2024).
Please describe your bug
I'm having a problem with the Jellyfin Android app. When I connect the first time, it works great. Playback is successful and the UI displays as expected.
If I close the app by swiping it upwards in the task switcher or it is otherwise terminated, it will not reconnect and displays the message "Connection cannot be established. Please check the hostname and your network connection."
If I erase the app storage, it will then reconnect again one time only.
The web-ui and other clients such as Jellyfin Media Player (MacOS) + Jellyfin for WebOS (thanks so much for this one!!!) are working as expected.
Debug logs attached. Note I have removed messages using Grep of the following kinds to try to clean them up a little for you:
Reproduction Steps
Jellyfin Version
Unstable (master branch)
if other:
No response
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@felix920506 commented on GitHub (Apr 29, 2024):
This is most likely a configuration issue. Please head to our forum or chat rooms for troubleshooting help: https://jellyfin.ore/contact
@caeci11ius commented on GitHub (May 1, 2024):
Figured it out.
For anyone who finds this in future - the solution is to set the value "all=https://YOUR_SERVER.com" in the advanced networking settings options "Published Server URIs".
In my case, I have been trying to use a valid url with certificate both on lan and wan and limiting all connections to https - NAT loopback / hairpin NAT allows for it to be resolved locally once the traffic hits the router. I had already configured the "known proxies" and "local networks settings". Note that I intentionally did my config differently to the guide as I wanted to retain as much isolation with docker as possible (avoiding setting host networking). My server is exposed to the internet so this seemed a good idea. I won't use hdhomerun or dlna so this is otherwise not a problem for me.
It seems that after the first connection, the android app was storing some auto detected value for my lan IP rather than the URL I entered myself. After finding the following threads and discovering the issue disappeared when not on the lan, I was able to figure out what to do:
And particularly:
Given people seem to have recurring troubles with some of this stuff, I'd suggest a fallback to the original connection url as a last resort if any smarts with LAN detection etc fails to result in a connection - particularly if that url previously succeeded. After all, that's the value the user expects given what's shown on the display. Clearly an enhancement, but it'd be worthwhile and help keep things understandable for users. Or at the very least, a message explaining that the app didn't try to connect where the user told it to and why...
@Zanonia commented on GitHub (May 22, 2024):
I have the same problem with the current stable android app and server (community TrueNAS docker).
I use the local server ip and no https. After each use, I have to delet all the Android app data (not only the cache) to be able to use it again.
@caeci11ius commented on GitHub (May 22, 2024):
Check my comment above for a solution :-)