jellyfin-android
jellyfin-android copied to clipboard
Music sometimes doesn't advance to the next playlist entry
Describe the bug When the app is playing music in the background sometimes playback stalls at the end of song and doesn't advance to the next song. When unlocking the phone and opening the app at this time I see client being sure that the song is still "playing" (not stopped, not paused) and the music timer stuck at the last or the previous-last second.
To Reproduce This is not easily reproducible. I notice this when the song is allowed to play from the beginning to the end (phone locked, music plays in the background). Using the progress bar to advance the music forward usually results in things working as they should.
System (please complete the following information):
- App version: 2.0.1
- Android version: Android 10
- Device manufacturer and model: Xiaomi Mi A3
- Jellyfin server version: 10.6.4
Screenshot of the stuck playback (the playback has been stuck for well above 30 seconds):

At this point clicking "Pause/Play" will cause the playback timer to reset to zero. Subsequent presses to "Play/Pause" button will do nothing. It's only possible to "unstick" the playback by using the seek-bar or use the Next/Previous buttons.
More observations: This issue never happens when the app is playing music in foreground. Once the playback is stuck, the device is no longer visible as "active" in the server dashboard.
I have bee experiencing exactly the same for quite some time now. I was hoping this would be fixed in new releases but so far it still happens.
Using LineageOS 17 and Jellyfin Beta
Having the same problem with OOS and jellyfin stable
This is probably caused by the handling of webviews in Android and the webclient itself. We can't fix this, but it won't be an issue anymore once we have a fully native client, which is in the works.
In the meantime, I suggest using Gelli for music playback.
This is probably caused by the handling of webviews in Android and the webclient itself. We can't fix this, but it won't be an issue anymore once we have a fully native client, which is in the works.
In the meantime, I suggest using Gelli for music playback.
Thanks!
We can't fix this, but it won't be an issue anymore once we have a fully native client, which is in the works.
Just wondered what sort of timescale we are looking at for the native client?
Thanks!
At least not any time soon
Oh ok ☹️
At least not any time soon
Is there something holding it up, or is the focus just on the video player for now?
The Android app is mostly maintained by @Maxr1998 and me. Both of us are busy with other things. The fully native client is in a separate branch on this repository but it's very early stage.
bummer- is this still an issue on IOS or am missing a setting?
ps. finamp doesn’t seem to have the issue
You have to turn off battery optimization for the app in Android system settings. When you first open the app there's a message encouraging you to do this but since you can still use the app without changing this setting, you might ignore this (i did). Turning it off for the app solved this issue for me, hope that's your problem too.
I did experience the issue consistently, but turning off battery optimization in the Android settings as suggested by @j-luis29 solved it!
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.