Android App Music Playback stops after 2 songs (metadata hang)

Server Version#: 1.19.5.3112
Player Version#: 8.3.1
Player Hardware: Samsung Galaxy S10e, Android 10, One UI 2.1

I continue to encounter a problem where music playback via the Android app will stop after 2 tracks.
Here is a breakdown of what happens:

Play an album

Track 1 plays
Screen displays track title/metadata for Track 1
Track 1 finishes

Track 2 plays
Screen continues to display title/metadata for Track 1
Track 2 finishes

Playback stops while still displaying title/metadata for Track 1

If I skip forward at any time during/after Track 2’s playback, the metadata will update to Track 2 and continue playing.
(meaning I have to manually skip forward every track after that)

My only fix when this happens is to completely close the app, reopen and try again and hope it works better.

I am encountering this more often than not recently, which is why I am hoping someone knows of a fix for this, or maybe the dev team can look at it.

I’ve searched for other topics and found other users with the same issue, but never a solution.

I also have all battery optimization options turned off for the Plex app, as this sometimes causes issues on Samsung hardware.

1 Like

It seems this might be mostly happening when coming back to the app after a period (several hours) of not using it, and attempting to resume the already in progress queue. Not yet completely certain if this is the only time the problem occurs.

Sorry for the multiple posts in a row, but I wanted to share my continued findings just in case it could help anyone else who is experiencing the same problem (or help the dev team identify the issue, if this ever gets any attention).

It seems this is happening (as I mentioned in my previous post) when I return to the app to resume the current playback queue.

However, it seems to NOT happen if I manually close the app when I am done with my initial listening session. Normally when I am done listening, I just swipe the playback controls out of my notification center. However if I do this followed by manually closing the app, I seem to not have any problems the next time I return to the app.

I am assuming this means that the problem is being caused by the way the app goes to sleep after not being used for a while.
I have all battery optimization settings turned OFF for Plex on my phone, as I know this can cause other playback problems with Plex that people seem to experience on Samsung and some Pixel or LG hardware, I think.

I am not sure if the Plex app is closing itself (putting itself to sleep?) after a period of not being used, or if the Samsung/Android system is closing the app after a while.
I turned battery optimize functions ON for Plex, just so that I could specifically set the option for “never put Plex to sleep” on, but it still seemed to occur.

So, after digging a little, I found that closing an app and the app being put to sleep are two different things (putting an app to sleep will even disable notifications and network checks, etc).
I am myself unable to determine if the playback error I am encountering is due to the Samsung/Android system closing Plex after a few hours of unuse, or if Plex closes itself to stop running in the background after a little while. But in either case, it seems the app being auto-closed after a while is what is causing this problem.
Manually closing the app after I am done listening to music seems to prevent this issue the next time I open the app, but it is a little tedious and annoying, since other music apps don’t need this extra attention.

Hopefully this info helps the dev team resolve this issue?
Or maybe it could be useful for anyone else having this problem.

(another note I’d like to add is that when I come back to the app to continue listening to music, the progress bar for the current track usually seems to remember my progress, but after I press play, it jumps back to the beginning of the track. This happens whether I manually close the app myself or not. May or may not be directly related to this issue, but wanted to share it as well)

I have the same problem. There is some sort of disconnect between the UI and whatever service is playing the track. Restarting the app is the only solution I’ve found. Extremely annoying and has me looking in to Emby as an alternative.

1 Like

Despite the Android app having several updates since my original post, I can confirm this issue is still present. It seems to happen even leaving the app idle for as little as 20 minutes.

I have two (annoying) methods for dealing with this issue:
Preventative: Manually fully closing the app after each session (not just swiping away play controls in the notification center, but actually closing the app itself.
(feel I should re-mention that I do not have to do this for any other music apps)
Reactive: If I failed to close the app after my last session the only way to get the playback working correctly again is to completely clear the current play queue and start over. (annoying as this will lose the place in a shuffled playlist)
Fully closing the app and restarting at this point also works, as mentioned by @jaredgoldsmith above.

It has been several months since my original post and the Plex dev team has not commented here yet. It would be really nice to get some acknowledgement on this issue.
Is it a known issue being worked on?
Is it a known issue that is impossible to fix? (specific to Samsung/LG/etc??)
Is this low priority since it is regarding music playback on the regular Plex app and not Plexamp?

Any comment would be appreciated.
I understand I may be low priority as I am not a Plex Pass holder, however I did pay $5 to unlock full playback options on this app, so I am a “paying customer.”

@jaredgoldsmith I see you have a Plex Pass. Have you tried to see if this bug happens on the Plexamp app?
I am extremely hesitant to fork out the bucks for a Plex Pass just to try that app if the same bug is going to be present, especially due to the lack of acknowledgement from the dev team.

1 Like

The problem did not exist with Plexamp, but the limited offline sync’ing with that app is a deal breaker for me - if that isn’t a priority for you, it may still be a good solution. I think your hesitation for premium seems justified. After I saw years old posts in this forum about the buggy-ness in the android app, I moved on to an opensource alternative. Still love plex as tv/movie player, but the music experience was a headache for me.

1 Like

Thank for the info about Plexamp. This gives me something to think about. Syncing is not usually a factor for me as I tend to just put a couple albums on my SD card when at home (network drive sharing) and then use a stock music app to play them if I can’t access Plex for whatever reason.

However, it would seem that if Plexamp does not have this issue, then surely it would be possible to fix it in the Plex app?
Hopefully some staff notice this thread at some point ever. Or acknowledge it if they have seen it.

Same issue here, just weighing in…

1 Like

Also having this issue. Also on the second song it doesn’t update in the persistent notification either, and if I click the persistent notification, it stops playback and starts it at the previous song.
It’s so frustrating that trying to listening to an album I own is such a chore.

1 Like

This is happening to me as well. Have there been any solutions yet?

Sorry to hear about the issues with the Android client. As far as I’m aware, we are following all the guidelines to prevent that the app get killed by the system while playing content in the background. It’d be nice if you could share some app logs when you notice the issue, so we can investigate the issue from there.
Thanks in advance

Thank you for your assistance, @jesusmc.
I have sent my logs to you in a direct message. If you can check by timestamps, look for playback starting at 5pm (a Paul McCartney album).

However, I don’t think the issue is as you described. The app is not being killed by the system WHILE playing content in the background.
It happens after playback is paused, playback controls are swiped away from persistent notifications, and the app is not closed/killed by user.
Something is happening after that point that messes up playback when the queue is resumed at a later point.
The ideal situation would be that after playback has been ended/paused and the app has been idle for a while that the app would kill itself or be killed by the system (so as not to use battery/ram while not doing anything). And then be able to properly resume playback from the same point in the playback queue at a later time, without the playback errors occurring.
Please let me know if you need better clarification if I am not explaining this well.
Thank you.

1 Like

Then I suspect it might be the app just crashing or somehow getting an order to stop playback. I’ll dig in those logs and try to reproduce it myself. Thanks!

Is there any news on this problem ? I’m facing it too, and it’s really annoying.

Yes, @jesusmc used my logs to work on a fix. I tried it out, but still had the same issue and let him know. I presume he is still working on it now. Haven’t heard any other updates yet.

I too am having these same issues on both a Samsung Galaxy S8 and a Samsung Galaxy Tab S7.

Only 2 or 3 songs played after shuffle on both smart and normal play list
Now Playing screen does not show current song
This still occurs even after syncing the whole playlist, so i is not a connection issue
Only way to get it to work again is to close down the App and start again

These problems DO NOT occur on the Windows app or the television app (which also happens to be a Samsung)

Having the same issue on Moto x4

Can confirm this problem as well. Imported my first album into my new Plex install (FLAC files), tried to play it on my Android phone via the Plex app, it stopped after the second title. Created a manual playlist, same thing. Plexamp works, which is OK as a workaround for me, but still. Happy to provide logs if it helps!

I confirm the same issue happening with my plex music files, using ACC files. I have not tried the plex amp work around, I will have to try that. A

I am having the same thing on latest plex android. Go into an album and hit the yellow play button at the top to play the whole album. First track plays and then playback stops.

Plex in foreground but screen off/locked (timeout during first song). Unlocking phone shows plex thinks it is currently playing (yellow playback button shows pause icon) but timer stuck at 0:00.

This happens for both local/synced content as well as server/streamed content.

These albums are FLAC on the server but I assume a different (transcoded) format in the synced/local case…so I don’t think this is a format-specific.

The fact there is a problem with synced content indicates this is likely a (android) client problem.

I found log options under settings > help & support.

The interesting bit I saw is this:

02-15 14:12:46.596 e: An exception occurred: java.net.SocketTimeoutException: failed to connect to /10.12.12.25 (port 32400) from /192.168.178.60 (port 49708) after 5000ms

I am at the office (office LAN 192.168.178.*) plex server is at home. Plex server home/private ip address is 10.12.12.25). Since I am not on the same network, the android app should be using the public ip address of my plex server, not the private/LAN ip address.

Perhaps there is some DNS/caching issue at play here but strange since playing manually starts fine and it is just when playing subsequent tracks in the list that it errors out trying to connect to plex server over LAN ip?

Hope that helps, this is super annoying bug.

02-15 14:12:45.114  i: Fetching [method:GET] http://127.0.0.1:32500/:/timeline?bufferedTime=117823&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F268530052&playbackTime=90010&playQueueItemID=1879048261&ratingKey=268530052&state=playing&time=90176&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android
02-15 14:12:45.136  i: [HttpServer] /127.0.0.1:40472 - GET /:/timeline
02-15 14:12:45.168  i: Fetching [method:GET] https://PUBLIC-HOME-IP-REDACTED.dd8f8a30aeeb4b22878ef81197ef4319.plex.direct:33400/:/timeline?bufferedTime=117823&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F94596&playbackTime=90010&playQueueItemID=1879048261&ratingKey=94596&state=playing&time=90176&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android&X-Plex-Token=...EC5K
02-15 14:12:45.171  e: Error parsing XML from http://127.0.0.1:32500/:/timeline?bufferedTime=117823&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F268530052&playbackTime=90010&playQueueItemID=1879048261&ratingKey=268530052&state=playing&time=90176&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android: Unexpected token (position:TEXT Failure: 200 OK
@2:1 in java.io.InputStreamReader@cb254a9) 
02-15 14:12:46.592  e: [PlexServerWebSocket] (ID: 94413395 | Server: Schillerstr) Connection failed.
02-15 14:12:46.596  e: An exception occurred: java.net.SocketTimeoutException: failed to connect to /10.12.12.25 (port 32400) from /192.168.178.60 (port 49708) after 5000ms
02-15 14:12:46.598  e: Stacktrace: java.net.SocketTimeoutException: failed to connect to /10.12.12.25 (port 32400) from /192.168.178.60 (port 49708) after 5000ms
    at libcore.io.IoBridge.connectErrno(IoBridge.java:191)
    at libcore.io.IoBridge.connect(IoBridge.java:135)
    at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
    at java.net.Socket.connect(Socket.java:621)
    at okhttp3.internal.platform.AndroidPlatform.connectSocket(SourceFile:1)
    at okhttp3.internal.connection.RealConnection.connectSocket(SourceFile:9)
    at okhttp3.internal.connection.RealConnection.connect(SourceFile:14)
    at okhttp3.internal.connection.ExchangeFinder.findConnection(SourceFile:30)
    at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(SourceFile:1)
    at okhttp3.internal.connection.ExchangeFinder.find(SourceFile:6)
    at okhttp3.internal.connection.Transmitter.newExchange(SourceFile:5)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(SourceFile:5)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at okhttp3.internal.cache.CacheInterceptor.intercept(SourceFile:22)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:22)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:6)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at com.plexapp.plex.net.b3.intercept(SourceFile:25)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at okhttp3.RealCall.getResponseWithInterceptorChain(SourceFile:13)
    at okhttp3.RealCall$AsyncCall.execute(SourceFile:2)
    at okhttp3.internal.NamedRunnable.run(SourceFile:3)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)

And another one…

02-15 14:19:23.876  i: [PlaybackTimeBehaviour] Time: 280245 IsStarted: true
02-15 14:19:23.883  i: Fetching [method:GET] http://127.0.0.1:32500/:/timeline?bufferedTime=7358&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F268530052&playbackTime=280246&playQueueItemID=1879048261&ratingKey=268530052&state=playing&time=279641&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android
02-15 14:19:23.900  i: [HttpServer] /127.0.0.1:40730 - GET /:/timeline
02-15 14:19:23.928  i: Fetching [method:GET] https://PUBLIC-HOME-IP-REDACTED.dd8f8a30aeeb4b22878ef81197ef4319.plex.direct:33400/:/timeline?bufferedTime=7358&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F94596&playbackTime=280246&playQueueItemID=1879048261&ratingKey=94596&state=playing&time=279641&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android&X-Plex-Token=...EC5K
02-15 14:19:23.930  e: Error parsing XML from http://127.0.0.1:32500/:/timeline?bufferedTime=7358&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F268530052&playbackTime=280246&playQueueItemID=1879048261&ratingKey=268530052&state=playing&time=279641&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android: Unexpected token (position:TEXT Failure: 200 OK
@2:1 in java.io.InputStreamReader@6e77b48) 
02-15 14:19:30.626  i: [Treble]: BASS: The gapless stream for stream 1879048262 is dying a natural death.
02-15 14:19:30.628  i: [Treble]: BASS: Stream 1879048262 ended (dying: 0).
02-15 14:19:30.630  i: [Treble]: BASS: Asked to remove stream with identifier 1879048262 with 1 existing streams (fade: 0, kickOffNext: 1).
02-15 14:19:30.635  i: [Treble]: Play Queue: Set item 1879048262 active to 0, 0 active remaining.
02-15 14:19:30.641  i: [Treble]: BASS: Removed stream 1879048262 from position 0, there are now 0 streams.
02-15 14:19:30.643  i: [Treble]: Cache: Asked to close file.
02-15 14:19:30.643  i: [Treble]: BASS: Getting rid of stream 1879048262.
02-15 14:19:30.644  i: [Player][Treble] State (transcoding: false codec:  bitrate: 0)
02-15 14:19:30.645  i: [EngineEventManager] onPlaybackStopped: Completed
02-15 14:19:30.645  i: [Player][Timeline] Playback stopped (error: false)
02-15 14:19:30.646  i: [Treble]: BASS: Closing stream 1879048262.
02-15 14:19:30.647  i: [Treble]: BASS: Deleting gapless stream 0x800000c9.
02-15 14:19:30.647  w: [Player][Timeline] player position was negative. Position time will be reported as 0.
02-15 14:19:30.648  i: [Treble]: Play Queue: Set item 1879048262 active to 0, 0 active remaining.
02-15 14:19:30.648  i: [Treble]: Cache: Deleting file reader 0x7753a25598
02-15 14:19:30.649  i: [PlaybackTimeBehaviour] Time: 287009 IsStarted: true
02-15 14:19:30.649  i: [PlaybackTimeBehaviour] Time: 287010 IsStarted: true
02-15 14:19:30.650  i: Fetching [method:GET] http://127.0.0.1:32500/:/timeline?bufferedTime=0&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F268530052&playbackTime=287009&playQueueItemID=1879048261&ratingKey=268530052&state=stopped&time=0&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android
02-15 14:19:30.651  i: [PlaybackTimeBehaviour] Playback stopped, pausing stopwatch
02-15 14:19:30.652  i: [PlaybackTimeBehaviour] Time: 287020 IsStarted: false
02-15 14:19:30.652  i: [WiFiLockBehaviour] Releasing WiFi lock since playback was stopped.
02-15 14:19:30.656  i: [HttpServer] /127.0.0.1:40736 - GET /:/timeline
02-15 14:19:30.658  i: [BatteryMonitorBehaviour] Playback session was 4.8 minutes long.
02-15 14:19:30.660  i: [BatteryMonitorBehaviour] Average battery consumption was -5597.46 µAh per minute.
02-15 14:19:30.685  i: Fetching [method:GET] https://PUBLIC-HOME-IP-REDACTED.dd8f8a30aeeb4b22878ef81197ef4319.plex.direct:33400/:/timeline?bufferedTime=0&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F94596&playbackTime=287009&playQueueItemID=1879048261&ratingKey=94596&state=stopped&time=0&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android&X-Plex-Token=...EC5K
02-15 14:19:30.686  e: Error parsing XML from http://127.0.0.1:32500/:/timeline?bufferedTime=0&duration=364000&guid=plex%3A%2F%2Ftrack%2F5d07d664403c6402909ed1f1&key=%2Flibrary%2Fmetadata%2F268530052&playbackTime=287009&playQueueItemID=1879048261&ratingKey=268530052&state=stopped&time=0&X-Plex-Client-Identifier=54a973b802921a2e-com-plexapp-android: Unexpected token (position:TEXT Failure: 200 OK
@2:1 in java.io.InputStreamReader@5dfe0de) 
02-15 14:19:31.123  w: [Treble]: BASS: Mixer underflowed.
02-15 14:19:50.639  w: [Treble]: BASS: Mixer underflowed.
02-15 14:19:50.642  i: [Treble]: BASS: Pausing audio output.
02-15 14:21:06.666  e: [PlexServerWebSocket] (ID: 94413395 | Server: Schillerstr) Connection failed.
02-15 14:21:06.669  e: An exception occurred: java.net.SocketTimeoutException: failed to connect to /10.12.12.25 (port 32400) from /192.168.178.60 (port 49982) after 5000ms
02-15 14:21:06.670  e: Stacktrace: java.net.SocketTimeoutException: failed to connect to /10.12.12.25 (port 32400) from /192.168.178.60 (port 49982) after 5000ms
    at libcore.io.IoBridge.connectErrno(IoBridge.java:191)
    at libcore.io.IoBridge.connect(IoBridge.java:135)
    at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
    at java.net.Socket.connect(Socket.java:621)
    at okhttp3.internal.platform.AndroidPlatform.connectSocket(SourceFile:1)
    at okhttp3.internal.connection.RealConnection.connectSocket(SourceFile:9)
    at okhttp3.internal.connection.RealConnection.connect(SourceFile:14)
    at okhttp3.internal.connection.ExchangeFinder.findConnection(SourceFile:30)
    at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(SourceFile:1)
    at okhttp3.internal.connection.ExchangeFinder.find(SourceFile:6)
    at okhttp3.internal.connection.Transmitter.newExchange(SourceFile:5)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(SourceFile:5)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at okhttp3.internal.cache.CacheInterceptor.intercept(SourceFile:22)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:22)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:6)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at com.plexapp.plex.net.b3.intercept(SourceFile:25)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:10)
    at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:1)
    at okhttp3.RealCall.getResponseWithInterceptorChain(SourceFile:13)
    at okhttp3.RealCall$AsyncCall.execute(SourceFile:2)
    at okhttp3.internal.NamedRunnable.run(SourceFile:3)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)

02-15 14:22:04.944  i: [HttpServer] /192.168.178.49:53616 - GET /logging

I don’t think it is relevant to the bug but my plex server private (32400) and public (33400) ports are different. Port forwarding manually configured in my juniper srx. No uPnP. Only reason it might be relevant is plex server port is different for clients connecting on LAN vs WAN.

1 Like