Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music playback stops when app is in the background #1378

Open
3 tasks
joshuamkite opened this issue May 5, 2024 · 9 comments
Open
3 tasks

Music playback stops when app is in the background #1378

joshuamkite opened this issue May 5, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@joshuamkite
Copy link

Describe the bug

I am using a Google Pixel 6 and have app battery usage set to 'unrestricted' - see screenshot - but as soon as I switch away from having the app in the foreground music playback stops. This makes it unusable for audio playback. None of my other audio apps have this problem, e.g. Spotify; VLC.

As per previous bug report I see a trail of reports of this same issue here on GitHub #948 and elsewhere, e.g. Reddit but no solutions. In each case we see the issue was closed by a bot without effective resolution.

In my case I am not using a VPN

303915035-db97c12d-27aa-41c7-aa46-19e1196d2847

Logs

No response

Application version

2.6.1

Where did you install the app from?

Google Play

Device information

Google Pixel 6

Android version

Android 14

Jellyfin server version

10.8.13

Which video player implementations does this bug apply to?

  • Web player (default)
  • Integrated player (ExoPlayer)
  • External player (VLC, mpv, MX Player)
@ipod86
Copy link

ipod86 commented May 5, 2024

I have something similar. For me the song finishes playing, but the next song doesn't start playing. When the display is on, everything plays nicely one after the other.

EDIT

I saw that your bug is different than the one you referenced (which I also have). Is the playback not working at all for you or is the song change not working?

@joshuamkite
Copy link
Author

@ipod86 playback stops very soon after app moved to background

@PlayTics
Copy link

PlayTics commented May 9, 2024

Hi there, i am here after i found the "previous bug".
I have the same problem with music playback: if the app is in the background for a short time, it does not resume after the last song. I don't use a vpn either > The App is connected directly to the server via my home network.

Image

image

the app usually just stops at the end of a song, but I can still move on to the next song manually.

For the technical aspect:

  • Xiaomi Poco X3 Pro | Android 13
  • The Jellyfin app is set to "Optimised" for background tasks

  • When set to "Not restricted", the playback works fine > Amazon Music or other playback apps work fine with "Optimised", so this looks like an issue with Jellyfin to me

@StackVader00
Copy link

Same here.

Pixel 6a | Android 14
No restrictions on battery.

@jamesbaber
Copy link

Pixel 7a, Android 14, Unrestricted background usage.
Music playback often stops after a while when another app has focus, even when using Waze in the car. When the music stops, I can almost always change back to Jellyfin (through recent apps) and music will begin to play immediately. If I had to guess, I'd say the problem occurs 2-10 times per hour of listening.

@friedemann
Copy link

Can also confirm this issue. Music stops approx. 10 secs after app is put to background and resumes almost immediately when focus is regained. While the music is not playing the "Media notification" is still looking as if it played, pausing it and pressing play again gives another 10 seconds of music. If the app is left in foreground and just the display is turned off it also can play along for quite some time. Battery settings to "Unrestricted".

  • Pixel 8 @ Android 14
  • Jellyfin Android 2.6.1 via F-Droid
  • Jellyfin Server 10.9.1

@michd
Copy link

michd commented May 23, 2024

I've captured some log filtered to package:org.jellyfin.mobile when music playback stopping happened at the end of a track for me.

Motorola Edge 20 Pro running Android 14 (LineageOS 21)
Jellyfin Android version 2.6.1 via F-Droid

I apologize for the formatting, copypasted directly from Android Studio.

2024-05-23 09:44:47.432 21419-21419 AppVisibilityProxy      org.jellyfin.mobile                  I  onAppEnteredBackground
2024-05-23 09:44:57.105 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:45:07.115 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:45:17.115 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:45:27.114 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:45:37.115 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:45:47.115 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:45:57.115 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:07.116 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:17.117 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:27.118 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:37.117 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:47.118 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:47.532 21419-21419 WebView                 org.jellyfin.mobile                  I  web socket closed, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:47.532 21419-21419 WebView                 org.jellyfin.mobile                  I  nulling out web socket, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:46:57.124 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:07.118 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:07.575 21419-21485 AAudio                  org.jellyfin.mobile                  D  AAudioStream_requestStop(s#6) called
2024-05-23 09:47:07.575 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#6) from 4 to 9
2024-05-23 09:47:07.575 21419-21485 AudioTrack              org.jellyfin.mobile                  D  stop(161): called with 8857680 frames delivered
2024-05-23 09:47:07.577 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#6) from 9 to 10
2024-05-23 09:47:07.582 21419-21537 System.err              org.jellyfin.mobile                  W  android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=org.jellyfin.mobile.intent.action.REPORT cmp=org.jellyfin.mobile/.webapp.RemotePlayerService (has extras) }: app is in background uid UidRecord{3a4976 u0a222 TPSL bg:+2m20s450ms idle change:cached|procstate procs:0 seq(245255,244857)} caps=------
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1946)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startService(ContextImpl.java:1901)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at org.jellyfin.mobile.bridge.NativeInterface.updateMediaSession(SourceFile:130)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.nativePollOnce(Native Method)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.next(MessageQueue.java:344)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loopOnce(Looper.java:189)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loop(Looper.java:317)
2024-05-23 09:47:07.583 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.HandlerThread.run(HandlerThread.java:68)
2024-05-23 09:47:07.586 21419-21419 WebView                 org.jellyfin.mobile                  E  Uncaught Error: Java exception was raised during method invocation, http://192.168.1.9:8096/native/nativeshell.js (51)
2024-05-23 09:47:07.592 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Stopped, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:07.598 21419-21537 System.err              org.jellyfin.mobile                  W  android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=org.jellyfin.mobile.intent.action.REPORT cmp=org.jellyfin.mobile/.webapp.RemotePlayerService (has extras) }: app is in background uid UidRecord{3a4976 u0a222 TPSL bg:+2m20s466ms idle change:cached|procstate procs:0 seq(245255,244857)} caps=------
2024-05-23 09:47:07.598 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1946)
2024-05-23 09:47:07.598 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startService(ContextImpl.java:1901)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at org.jellyfin.mobile.bridge.NativeInterface.hideMediaSession(SourceFile:24)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.nativePollOnce(Native Method)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.next(MessageQueue.java:344)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loopOnce(Looper.java:189)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loop(Looper.java:317)
2024-05-23 09:47:07.599 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.HandlerThread.run(HandlerThread.java:68)
2024-05-23 09:47:07.601 21419-21419 WebView                 org.jellyfin.mobile                  E  Uncaught Error: Java exception was raised during method invocation, http://192.168.1.9:8096/native/nativeshell.js (55)
2024-05-23 09:47:10.918 21419-21419 WindowOnBackDispatcher  org.jellyfin.mobile                  W  OnBackInvokedCallback is not enabled for the application.
                                                                                                    Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
2024-05-23 09:47:10.939 21419-21419 VRI[MainActivity]       org.jellyfin.mobile                  D  Start draw after previous draw not visible
2024-05-23 09:47:10.990 21419-21419 WebView                 org.jellyfin.mobile                  I  opening web socket with url: ws://192.168.1.9:8096/socket?api_key=1718267ded07422fadbd95dafcb353f0&deviceId=f3cca0d44ef45850, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:11.010 21419-21419 WebView                 org.jellyfin.mobile                  I  web socket connection opened, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:11.010 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting http://192.168.1.9:8096/Sessions?ControllableByUserId=75c4d5655f4046cfaa70de58e96e6424, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:11.226 21419-21419 AppVisibilityProxy      org.jellyfin.mobile                  I  onAppEnteredForeground
2024-05-23 09:47:11.226 21419-21419 MR2                     org.jellyfin.mobile                  W  registerTransferCallback: Ignoring the same callback
2024-05-23 09:47:11.226 21419-21419 MR2                     org.jellyfin.mobile                  W  registerControllerCallback: Ignoring the same callback
2024-05-23 09:47:12.577 21419-21485 AAudio                  org.jellyfin.mobile                  D  AAudioStream_requestStop(s#6) called
2024-05-23 09:47:12.577 21419-21485 AAudio                  org.jellyfin.mobile                  D  AAudioStream_close(s#6) called ---------------
2024-05-23 09:47:12.578 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#6) from 10 to 11
2024-05-23 09:47:12.579 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#6) from 11 to 12
2024-05-23 09:47:12.580 21419-21485 AAudioStream            org.jellyfin.mobile                  D  ~AudioStream(s#6) mPlayerBase strongCount = 2
2024-05-23 09:47:12.580 21419-21485 AAudio                  org.jellyfin.mobile                  D  AAudioStream_close(s#6) returned 0 ---------
2024-05-23 09:47:14.627 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting http://192.168.1.9:8096/Users/75c4d5655f4046cfaa70de58e96e6424/Items?Ids=7a165d6d948b24b5659bffaed7bf87ac%2Cd9e7068db7ed236c7146e0a05bf7aa0b%2Cf6fc1317d8829b3e4ae5e1bb5f526a90%2Cc2d2ddd4d6001fd47d94cf9902828481%2C0a2b026c8beff3f223b17977343983a9%2Cbdea2b6060ed38242c89a4963dcf816a%2C173e0d85ced2bd0bed48e778d121d650%2C14d4c1578d66f422ebe4c7deba1526b3%2C7f35185518292e7235374dec3aa03796%2C2fa89c2cbd6cd1fce4ca04ea501593b8%2Cf87586f1bea453fc5a9cb4ad69cdd829%2C75f867eb87af442e1923c86868e48827&Limit=300&Fields=Chapters&ExcludeLocationTypes=Virtual&EnableTotalRecordCount=false&CollapseBoxSetItems=false, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:14.666 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Stopped, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:14.731 21419-21485 AAudio                  org.jellyfin.mobile                  I  AAudioStreamBuilder_openStream() called ----------------------------------------
2024-05-23 09:47:14.731 21419-21485 AudioStreamBuilder      org.jellyfin.mobile                  I  rate   =  44100, channels  = 2, channelMask = 0x80000003, format   = 5, sharing = SH, dir = OUTPUT
2024-05-23 09:47:14.731 21419-21485 AudioStreamBuilder      org.jellyfin.mobile                  I  device =      0, sessionId = -1, perfMode = 11, callback: ON with frames = 1024
2024-05-23 09:47:14.732 21419-21485 AudioStreamBuilder      org.jellyfin.mobile                  I  usage  =      1, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
2024-05-23 09:47:14.732 21419-21485 AudioStreamBuilder      org.jellyfin.mobile                  I  privacy sensitive = false, opPackageName = (null), attributionTag = (null)
2024-05-23 09:47:14.732 21419-21485 AudioStreamBuilder      org.jellyfin.mobile                  D  build() MMAP not used because AAUDIO_PERFORMANCE_MODE_LOW_LATENCY not requested.
2024-05-23 09:47:14.732 21419-21485 jellyfin.mobile         org.jellyfin.mobile                  D  PlayerBase::PlayerBase()
2024-05-23 09:47:14.733 21419-21485 AudioStreamTrack        org.jellyfin.mobile                  D  open(), request notificationFrames = 0, frameCount = 0
2024-05-23 09:47:14.747 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#7) from 0 to 2
2024-05-23 09:47:14.749 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:14.750 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting http://192.168.1.9:8096/Users/75c4d5655f4046cfaa70de58e96e6424/Items/2fa89c2cbd6cd1fce4ca04ea501593b8, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:14.756 21419-21485 AAudio                  org.jellyfin.mobile                  I  AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#7 ----------------
2024-05-23 09:47:14.763 21419-21485 AAudio                  org.jellyfin.mobile                  D  AAudioStream_requestStart(s#7) called --------------
2024-05-23 09:47:14.763 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#7) from 2 to 3
2024-05-23 09:47:14.764 21419-21485 AAudio                  org.jellyfin.mobile                  D  AAudioStream_requestStart(s#7) returned 0 ---------
2024-05-23 09:47:14.766 21419-21520 AudioStreamLegacy       org.jellyfin.mobile                  D  onAudioDeviceUpdate(deviceId = 144)
2024-05-23 09:47:14.774 21419-21419 MediaRouter             org.jellyfin.mobile                  D  onRestoreRoute() : route=RouteInfo{ name=Soundcore Q30, description=Bluetooth audio, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO , presentationDisplay=null }
2024-05-23 09:47:14.774 21419-21419 MediaRouter             org.jellyfin.mobile                  V  Selecting route: RouteInfo{ name=Soundcore Q30, description=Bluetooth audio, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO , presentationDisplay=null }
2024-05-23 09:47:14.887 21419-24895 AAudioStream            org.jellyfin.mobile                  D  setState(s#7) from 3 to 4
2024-05-23 09:47:14.988 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:17.643 21419-21419 VRI[MainActivity]       org.jellyfin.mobile                  D  visibilityChanged oldVisibility=true newVisibility=false
2024-05-23 09:47:17.668 21419-21419 VRI[MainActivity]       org.jellyfin.mobile                  D  Not drawing due to not visible
2024-05-23 09:47:17.936 21419-21419 AppVisibilityProxy      org.jellyfin.mobile                  I  onAppEnteredBackground
2024-05-23 09:47:17.936 21419-21419 MR2                     org.jellyfin.mobile                  W  registerTransferCallback: Ignoring the same callback
2024-05-23 09:47:17.936 21419-21419 MR2                     org.jellyfin.mobile                  W  registerControllerCallback: Ignoring the same callback
2024-05-23 09:47:25.028 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:35.028 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:45.031 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:47:55.028 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:48:05.029 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:48:15.032 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:48:25.032 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:48:35.032 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:48:45.037 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:48:45.757 21419-21419 AudioManager            org.jellyfin.mobile                  D  dispatching onAudioFocusChange(-3) to android.media.AudioManager@8f60b78org.chromium.content.browser.AudioFocusDelegate@f11a251
2024-05-23 09:48:48.418 21419-21419 AudioManager            org.jellyfin.mobile                  D  dispatching onAudioFocusChange(1) to android.media.AudioManager@8f60b78org.chromium.content.browser.AudioFocusDelegate@f11a251
2024-05-23 09:48:48.419 21419-21419 MediaRouter             org.jellyfin.mobile                  D  onRestoreRoute() : route=RouteInfo{ name=Soundcore Q30, description=Bluetooth audio, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO , presentationDisplay=null }
2024-05-23 09:48:48.419 21419-21419 MediaRouter             org.jellyfin.mobile                  V  Selecting route: RouteInfo{ name=Soundcore Q30, description=Bluetooth audio, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO , presentationDisplay=null }
2024-05-23 09:48:55.032 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:49:05.033 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:49:15.034 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:49:25.034 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:49:35.034 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:49:45.029 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:49:55.034 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:50:05.035 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:50:15.036 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:50:25.035 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:50:35.036 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:50:45.029 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Progress, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:50:47.976 21419-24895 chromium                org.jellyfin.mobile                  W  [WARNING:sync_reader.cc(175)] ASR: No room in socket buffer.: Broken pipe (32)
2024-05-23 09:50:47.982 21419-21485 AAudio                  org.jellyfin.mobile                  D  AAudioStream_requestStop(s#7) called
2024-05-23 09:50:47.982 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#7) from 4 to 9
2024-05-23 09:50:47.982 21419-21485 AudioTrack              org.jellyfin.mobile                  D  stop(162): called with 9405656 frames delivered
2024-05-23 09:50:47.983 21419-21485 AAudioStream            org.jellyfin.mobile                  D  setState(s#7) from 9 to 10
2024-05-23 09:50:47.987 21419-21537 System.err              org.jellyfin.mobile                  W  android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=org.jellyfin.mobile.intent.action.REPORT cmp=org.jellyfin.mobile/.webapp.RemotePlayerService (has extras) }: app is in background uid UidRecord{3a4976 u0a222 TPSL bg:+3m30s350ms idle change:cached|procstate procs:0 seq(246791,245567)} caps=------
2024-05-23 09:50:47.987 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1946)
2024-05-23 09:50:47.987 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startService(ContextImpl.java:1901)
2024-05-23 09:50:47.987 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:50:47.987 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:50:47.987 21419-21537 System.err              org.jellyfin.mobile                  W  	at org.jellyfin.mobile.bridge.NativeInterface.updateMediaSession(SourceFile:130)
2024-05-23 09:50:47.987 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.nativePollOnce(Native Method)
2024-05-23 09:50:47.988 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.next(MessageQueue.java:344)
2024-05-23 09:50:47.988 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loopOnce(Looper.java:189)
2024-05-23 09:50:47.988 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loop(Looper.java:317)
2024-05-23 09:50:47.988 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.HandlerThread.run(HandlerThread.java:68)
2024-05-23 09:50:47.990 21419-21419 WebView                 org.jellyfin.mobile                  E  Uncaught Error: Java exception was raised during method invocation, http://192.168.1.9:8096/native/nativeshell.js (51)
2024-05-23 09:50:47.998 21419-21419 WebView                 org.jellyfin.mobile                  I  Requesting url without automatic networking: http://192.168.1.9:8096/Sessions/Playing/Stopped, http://192.168.1.9:8096/web/main.jellyfin.bundle.js?d5f64bca077b6d6aaf33?deferred=true&ts=1716451831662 (2)
2024-05-23 09:50:48.004 21419-21537 System.err              org.jellyfin.mobile                  W  android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=org.jellyfin.mobile.intent.action.REPORT cmp=org.jellyfin.mobile/.webapp.RemotePlayerService (has extras) }: app is in background uid UidRecord{3a4976 u0a222 TPSL bg:+3m30s368ms idle change:cached|procstate procs:0 seq(246791,245567)} caps=------
2024-05-23 09:50:48.004 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1946)
2024-05-23 09:50:48.004 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.app.ContextImpl.startService(ContextImpl.java:1901)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.content.ContextWrapper.startService(ContextWrapper.java:826)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at org.jellyfin.mobile.bridge.NativeInterface.hideMediaSession(SourceFile:24)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.nativePollOnce(Native Method)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.MessageQueue.next(MessageQueue.java:344)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loopOnce(Looper.java:189)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.Looper.loop(Looper.java:317)
2024-05-23 09:50:48.005 21419-21537 System.err              org.jellyfin.mobile                  W  	at android.os.HandlerThread.run(HandlerThread.java:68)

I'd like to call out specifically:

android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=org.jellyfin.mobile.intent.action.REPORT cmp=org.jellyfin.mobile/.webapp.RemotePlayerService (has extras) }: app is in background uid UidRecord{3a4976 u0a222 TPSL bg:+3m30s350ms idle change:cached|procstate procs:0 seq(246791,245567)} caps=------

I haven't dived into the source code right now, but with my background of working on a music playback app for a living, I feel like

  1. the service playing media should be started as a foreground service while the main app UI is in the foreground, ASAP (so you don't get "StartForegroundServiceNotAllowedException" or something along those lines).
  2. No new service start should be attempted while the app is in the background

@wiw7777
Copy link

wiw7777 commented Jun 3, 2024

Same issue except mine runs for 13 seconds then cuts off when re-entering app it continues.

Android 14, Pixel 6 Pro, Jellyfin server 10.9.3, Jellyfin Android 2.6.1

@wiw7777
Copy link

wiw7777 commented Jun 6, 2024

Same issue except mine runs for 13 seconds then cuts off when re-entering app it continues.

Android 14, Pixel 6 Pro, Jellyfin server 10.9.3, Jellyfin Android 2.6.1

More in depth with my experience of it I play any song and close (but not exit) the app and it runs for 18 seconds then stops and in the server dashboard says "(name) has disconnected from (device)" but at 10 seconds in it has a slight cut in audio, I've also since posting my previous reply updated my server to 10.9.4 the issue still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants