[Bug]: Streaming playback stops after a long pause: app keeps syncing to a server-closed session instead of opening a new one
Author: mikekennCreated Sep 28, 2026Updated Sep 29, 2026
Labelsbug
What happened?
What happens: When a book is streamed (not downloaded) and playback is paused for a while, resuming often fails: playback pauses, skips, or stops. Closing and reopening the book fixes it until the next long pause. Downloaded books are not affected.
What did you expect to happen?
Expected: If the server says the session no longer exists (a 404 on the track, or a failed sync), the app should start a new playback session automatically and continue from the saved position.
Steps to reproduce the issue
What the server logs show:
- After the pause, the server has already closed the playback session. On resume, the app keeps sending progress for that old session every ~5 seconds, and the server logs this hundreds of times, for up to 30 minutes:
- [SessionController] Unable to find playback session with id=
- Examples: 373 errors in ~30 min on one day, 244 on another.
- At the same time, the reverse proxy shows 404 responses for the audio of the old session:
- GET /public/session//track/1 → 404
- It only recovers when the user reopens the book, which starts a new session
- (the server logs startSession: Closing open session ...).
Audiobookshelf version
Audiobookshelf 2.36.1
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
Linux
If the issue is being seen in the UI, what browsers are you seeing the problem on?
No response
Logs
AudioBooth iOS: after resuming a paused stream, the app closes its own playback session but keeps streaming from it (404s) until the book is reopened
Environment: AudioBooth iOS 1.11 (build 1784179683) on iPhone (AppleCoreMedia 1.0.0.23G90), streaming (not downloaded).
Server: Audiobookshelf 2.36.x in Docker, behind Nginx Proxy Manager (websockets enabled). One incident on 2026-09-22.
Redactions: username -> user1, book title -> Book A, IPs -> [client-ip], hostname -> abs.example.com.
Server log times are local (UTC-3); proxy log times are UTC (so 12:13 local = 15:13 UTC).
TIMELINE (UTC)
14:11:59 Session 7d236217-…-c8514b70871d starts; audio streams normally (206 track requests, /sync every ~20 s).
14:30:05 Last audio request, then playback paused for ~42 min.
15:12:43 On resume the app POSTs /api/session/<id>/sync -> 200
15:12:44 ...then immediately POSTs /api/session/<id>/close -> 200 (the app closes its own session)
15:13:49 The iOS player keeps requesting /public/session/<id>/track/1 -> 404
370 x 404 over 31 minutes; the server logs "[SessionController] Unable to find playback session" for each.
15:45:18 Last 404.
15:46:22 The user reopens the book -> a new session starts and playback works again.
EXPECTED: after closing or re-syncing a session on resume, the player should switch to a new session (POST /api/items/<id>/play) instead of continuing to stream the closed session's track URL.
===== Audiobookshelf server log (daily log, 11:05-12:50 local) =====
2026-09-22 11:11:56.587 [INFO] [PlaybackSessionManager] Not updating progress for "Book A" because it has been updated more recently (1790086315633 > 1790085251815) (incoming currentTime: 6990.097060197) (current currentTime: 6990.097060197)
2026-09-22 12:12:43.536 [INFO] [PlaybackSessionManager] Syncing local session "undefined" (7d236217-ad5e-4d72-a736-c8514b70871d) (updatedAt: 1790087403375)
2026-09-22 12:12:44.669 [INFO] [PlaybackSessionManager] Not updating progress for "Book A" because it has been updated more recently (1790089963581 > 1790087403375) (incoming currentTime: 7945.351495879) (current currentTime: 7945.351495879)
2026-09-22 12:13:49.510 [ERROR] [SessionController] Unable to find playback session with id=7d236217-ad5e-4d72-a736-c8514b70871d
2026-09-22 12:13:51.250 [ERROR] [SessionController] Unable to find playback session with id=7d236217-ad5e-4d72-a736-c8514b70871d
2026-09-22 12:16:44.371 [ERROR] [SessionController] Unable to find playback session with id=7d236217-ad5e-4d72-a736-c8514b70871d
... 367 more identical lines (12:13:49 to 12:45:18, total 373) ...
2026-09-22 12:45:17.405 [ERROR] [SessionController] Unable to find playback session with id=7d236217-ad5e-4d72-a736-c8514b70871d
2026-09-22 12:45:18.645 [ERROR] [SessionController] Unable to find playback session with id=7d236217-ad5e-4d72-a736-c8514b70871d
2026-09-22 12:45:18.764 [ERROR] [SessionController] Unable to find playback session with id=7d236217-ad5e-4d72-a736-c8514b70871d
2026-09-22 12:46:22.198 [INFO] [PlaybackSessionManager] startSession: Closing open session "Book A" for user "user1" (Device: iOS)
2026-09-22 12:46:22.910 [INFO] [PlaybackSessionManager] Updating progress for "Book A" with current time 9587.296237979 (previously 9575.000259457)
===== Nginx Proxy Manager access log (same session, UTC; trimmed) =====
[22/Sep/2026:14:11:59 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 2] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:14:12:00 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 2097152] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:14:12:01 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 2097152] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:14:12:02 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 2097152] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:14:12:05 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 5890473] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:14:12:10 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 2097152] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:14:12:10 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 54110] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:14:12:24 +0000] - 200 200 - POST https abs.example.com "/api/session/7d236217-ad5e-4d72-a736-c8514b70871d/sync" [Client [client-ip]] [Length 2] [Gzip -] [Sent-to [client-ip]] "AudioBooth/…"
[22/Sep/2026:14:12:45 +0000] - 200 200 - POST https abs.example.com "/api/session/7d236217-ad5e-4d72-a736-c8514b70871d/sync" [Client [client-ip]] [Length 2] [Gzip -] [Sent-to [client-ip]] "AudioBooth/…"
... normal playback: /sync POST every ~20 s (200) and track range GETs (206) until 14:30:05 ...
[22/Sep/2026:14:29:57 +0000] - 200 200 - POST https abs.example.com "/api/session/7d236217-ad5e-4d72-a736-c8514b70871d/sync" [Client [client-ip]] [Length 2] [Gzip -] [Sent-to [client-ip]] "AudioBooth/…"
[22/Sep/2026:14:30:05 +0000] - 206 206 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 5369423] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
... no requests for ~42 minutes (playback paused) ...
[22/Sep/2026:15:12:43 +0000] - 200 200 - POST https abs.example.com "/api/session/7d236217-ad5e-4d72-a736-c8514b70871d/sync" [Client [client-ip]] [Length 2] [Gzip -] [Sent-to [client-ip]] "AudioBooth/…"
[22/Sep/2026:15:12:44 +0000] - 200 200 - POST https abs.example.com "/api/session/7d236217-ad5e-4d72-a736-c8514b70871d/close" [Client [client-ip]] [Length 2] [Gzip -] [Sent-to [client-ip]] "AudioBooth/…"
[22/Sep/2026:15:13:49 +0000] - 404 404 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 9] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:15:13:51 +0000] - 404 404 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 9] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:15:16:44 +0000] - 404 404 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 9] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
... 367 more identical requests ...
[22/Sep/2026:15:45:17 +0000] - 404 404 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 9] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:15:45:18 +0000] - 404 404 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 9] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"
[22/Sep/2026:15:45:18 +0000] - 404 404 - GET https abs.example.com "/public/session/7d236217-ad5e-4d72-a736-c8514b70871d/track/1" [Client [client-ip]] [Length 9] [Gzip -] [Sent-to [client-ip]] "AppleCoreMedia/…"Additional Notes
Notes: The official Audiobookshelf Android app on the same server doesn't show this pattern. It happens on both Wi-Fi and mobile data, but more often on mobile data.
- After the pause, when the user presses play, AudioBooth itself closes its own listening session (a /close call at 15:12:44).
- The iPhone's audio player then keeps asking for audio from that closed session: 370 "not found" responses over 31 minutes.
- It only recovers when the user reopens the book.
Source: advplyr/audiobookshelf