[Bug]: Need to re-login very often #2975

Open
opened 2026-02-20 10:25:22 -05:00 by deekerman · 26 comments
Owner

Originally created by @D3r3k23 on GitHub (Aug 27, 2025).

What happened?

After the update to authentication, it's automatically logging out multiple times per day. It usually is slow for a bit, then goes back to the login screen. This is happening on both the web UI and the Android app.

What did you expect to happen?

I'm not sure but the login session should last longer.

Steps to reproduce the issue

  1. Just use the app until the account is logged out.

Audiobookshelf version

v2.29.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Other (list in "Additional Notes" box)

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Chrome

Logs


Additional Notes

Unraid OS

Originally created by @D3r3k23 on GitHub (Aug 27, 2025). ### What happened? After the update to authentication, it's automatically logging out multiple times per day. It usually is slow for a bit, then goes back to the login screen. This is happening on both the web UI and the Android app. ### What did you expect to happen? I'm not sure but the login session should last longer. ### Steps to reproduce the issue 1. Just use the app until the account is logged out. ### Audiobookshelf version v2.29.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Other (list in "Additional Notes" box) ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Chrome ### Logs ```shell ``` ### Additional Notes Unraid OS
Author
Owner

@nichwall commented on GitHub (Aug 27, 2025):

What do the logs say?

@nichwall commented on GitHub (Aug 27, 2025): What do the logs say?
Author
Owner

@D3r3k23 commented on GitHub (Aug 28, 2025):

This part of the logs should cover one of the times that it happened. At 22:22:45.162 I logged in, but I don't know if there's anything from when it logged me out.

[2025-08-27 22:22:06.082] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3014
[2025-08-27 22:22:06.089] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3042
[2025-08-27 22:22:06.093] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3085
[2025-08-27 22:22:06.094] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3173
[2025-08-27 22:22:06.097] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3246
[2025-08-27 22:22:06.100] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3304
[2025-08-27 22:22:06.184] DEBUG: Loaded filterdata in 5.31s
[2025-08-27 22:22:06.188] DEBUG: Loaded filterdata in 5.28s
[2025-08-27 22:22:06.247] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:06.248] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:06.274] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:06.275] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:06.313] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:06.313] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:06.338] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:06.339] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:06.364] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:06.365] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:06.392] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:06.393] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:06.422] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:06.446] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:06.470] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:06.494] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:06.519] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:06.543] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:06.545] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a?include=filterdata"}
[2025-08-27 22:22:06.546] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a?include=filterdata"}
[2025-08-27 22:22:06.549] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/71e5a0b6-d6c4-4108-8aec-fb0edd2e889d/stats"}
[2025-08-27 22:22:13.201] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3309
[2025-08-27 22:22:13.248] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:13.248] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:13.279] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:28.176] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3322
[2025-08-27 22:22:28.220] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:28.221] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:28.247] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:43.104] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3335
[2025-08-27 22:22:43.151] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2025-08-27 22:22:43.151] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8
[2025-08-27 22:22:43.181] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2025-08-27 22:22:45.162] INFO: [LocalAuth] User "D3r3k23" logged in from ip ::ffff:192.168.50.62
[2025-08-27 22:22:45.197] DEBUG: [ApiCacheManager] session.afterCreate: Clearing cache
[2025-08-27 22:22:45.201] DEBUG: [Auth] handleLoginSuccess: returnTokens: false, isRefreshTokenInResponse: false
[2025-08-27 22:22:45.267] DEBUG: [ApiCacheManager] count: 0 size: 0
[2025-08-27 22:22:45.271] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a?include=filterdata"}
[2025-08-27 22:22:45.460] DEBUG: [ApiCacheManager] count: 1 size: 1359
[2025-08-27 22:22:45.464] INFO: [SocketAuthority] Socket Connected to /audiobookshelf/socket.io fyRK-VOXKEo2N1haAAAN
[2025-08-27 22:22:45.470] DEBUG: [ApiCacheManager] count: 1 size: 1359
[2025-08-27 22:22:45.473] DEBUG: [SocketAuthority] Authenticating socket to user "D3r3k23"
[2025-08-27 22:22:45.520] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries"}
[2025-08-27 22:22:45.754] DEBUG: Loaded 1 of 1 items for "Continue Listening/Reading" in 0.23s
[2025-08-27 22:22:46.091] DEBUG: Loaded 10 of 3195 episodes for "Newest Episodes" in 0.34s
[2025-08-27 22:22:46.127] DEBUG: Loaded 10 of 25 items for "Recently Added" in 0.04s
[2025-08-27 22:22:46.518] DEBUG: Loaded 10 of 1782 items for "Listen/Read Again" in 0.39s
[2025-08-27 22:22:46.518] DEBUG: Loaded 4 personalized shelves in 1.00s
[2025-08-27 22:22:46.519] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a/personalized?include=rssfeed,numEpisodesIncomplete,share"}
[2025-08-27 22:22:46.519] DEBUG: [ApiCacheManager] Caching with 1800000 ms TTL
@D3r3k23 commented on GitHub (Aug 28, 2025): This part of the logs should cover one of the times that it happened. At 22:22:45.162 I logged in, but I don't know if there's anything from when it logged me out. ``` [2025-08-27 22:22:06.082] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3014 [2025-08-27 22:22:06.089] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3042 [2025-08-27 22:22:06.093] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3085 [2025-08-27 22:22:06.094] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3173 [2025-08-27 22:22:06.097] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3246 [2025-08-27 22:22:06.100] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3304 [2025-08-27 22:22:06.184] DEBUG: Loaded filterdata in 5.31s [2025-08-27 22:22:06.188] DEBUG: Loaded filterdata in 5.28s [2025-08-27 22:22:06.247] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:06.248] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:06.274] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:06.275] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:06.313] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:06.313] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:06.338] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:06.339] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:06.364] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:06.365] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:06.392] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:06.393] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:06.422] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:06.446] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:06.470] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:06.494] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:06.519] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:06.543] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:06.545] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a?include=filterdata"} [2025-08-27 22:22:06.546] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a?include=filterdata"} [2025-08-27 22:22:06.549] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/71e5a0b6-d6c4-4108-8aec-fb0edd2e889d/stats"} [2025-08-27 22:22:13.201] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3309 [2025-08-27 22:22:13.248] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:13.248] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:13.279] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:28.176] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3322 [2025-08-27 22:22:28.220] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:28.221] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:28.247] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:43.104] DEBUG: [PlaybackSessionManager] syncSession "19de2963-09f8-4add-9cd6-f96dfd013f5c" (Device: SM-S911U1 SDK 35 / v0.10.0-beta) | Total Time Listened: 3335 [2025-08-27 22:22:43.151] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2025-08-27 22:22:43.151] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 75c21696-ae20-4567-8495-0f0237b826a8 [2025-08-27 22:22:43.181] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2025-08-27 22:22:45.162] INFO: [LocalAuth] User "D3r3k23" logged in from ip ::ffff:192.168.50.62 [2025-08-27 22:22:45.197] DEBUG: [ApiCacheManager] session.afterCreate: Clearing cache [2025-08-27 22:22:45.201] DEBUG: [Auth] handleLoginSuccess: returnTokens: false, isRefreshTokenInResponse: false [2025-08-27 22:22:45.267] DEBUG: [ApiCacheManager] count: 0 size: 0 [2025-08-27 22:22:45.271] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a?include=filterdata"} [2025-08-27 22:22:45.460] DEBUG: [ApiCacheManager] count: 1 size: 1359 [2025-08-27 22:22:45.464] INFO: [SocketAuthority] Socket Connected to /audiobookshelf/socket.io fyRK-VOXKEo2N1haAAAN [2025-08-27 22:22:45.470] DEBUG: [ApiCacheManager] count: 1 size: 1359 [2025-08-27 22:22:45.473] DEBUG: [SocketAuthority] Authenticating socket to user "D3r3k23" [2025-08-27 22:22:45.520] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries"} [2025-08-27 22:22:45.754] DEBUG: Loaded 1 of 1 items for "Continue Listening/Reading" in 0.23s [2025-08-27 22:22:46.091] DEBUG: Loaded 10 of 3195 episodes for "Newest Episodes" in 0.34s [2025-08-27 22:22:46.127] DEBUG: Loaded 10 of 25 items for "Recently Added" in 0.04s [2025-08-27 22:22:46.518] DEBUG: Loaded 10 of 1782 items for "Listen/Read Again" in 0.39s [2025-08-27 22:22:46.518] DEBUG: Loaded 4 personalized shelves in 1.00s [2025-08-27 22:22:46.519] DEBUG: [ApiCacheManager] Cache miss: {"user":"D3r3k23","url":"/libraries/a15082b7-58ca-4e38-89fd-43c50c18e61a/personalized?include=rssfeed,numEpisodesIncomplete,share"} [2025-08-27 22:22:46.519] DEBUG: [ApiCacheManager] Caching with 1800000 ms TTL ```
Author
Owner

@D3r3k23 commented on GitHub (Sep 7, 2025):

Image

I get this message about the new authentication when I have to re-login. Was this just supposed to be for the first time you login after updating or is it just on the login screen now?

@D3r3k23 commented on GitHub (Sep 7, 2025): ![Image](https://github.com/user-attachments/assets/76c0aeb2-52c6-4d77-8928-29ace8cf1071) I get this message about the new authentication when I have to re-login. Was this just supposed to be for the first time you login after updating or is it just on the login screen now?
Author
Owner

@000al000 commented on GitHub (Dec 16, 2025):

Same problem, need relogin about week

2025-12-16 08:50:35.341

ERROR

[TokenManager] Failed to refresh token. Session not found for refresh token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI0OWNhYzJhZi03M2FlLTQ3MzUtOGI4NS03NjE0YzQyMGJkZGYiLCJ1c2VybmFtZSI6InJvb3QiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTc2NTc5MTU2OSwiZXhwIjoxNzY2Mzk2MzY5fQ.ZtUOBHNOiLY-yXmHXQnNofHLlLsHGwbsnvXoHmdwRIw

@000al000 commented on GitHub (Dec 16, 2025): Same problem, need relogin about week 2025-12-16 08:50:35.341 ERROR [TokenManager] Failed to refresh token. Session not found for refresh token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI0OWNhYzJhZi03M2FlLTQ3MzUtOGI4NS03NjE0YzQyMGJkZGYiLCJ1c2VybmFtZSI6InJvb3QiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTc2NTc5MTU2OSwiZXhwIjoxNzY2Mzk2MzY5fQ.ZtUOBHNOiLY-yXmHXQnNofHLlLsHGwbsnvXoHmdwRIw
Author
Owner

@Vito0912 commented on GitHub (Dec 16, 2025):

For your info. You should never, ever share aboves token. It's like a password. If that would be an old token, anyone would be able to login to your server.
Anyway, that above will expire soon and anyway is not valid as you said

But it looks like the session got deleted.
As long as you did not lgog out, which makes no sense, the only line that probably would affect this is:
github.com/advplyr/audiobookshelf@626596b192/server/auth/TokenManager.js (L364-L393)

because it invalidates all refresh tokens, which sounds like the cause and, as far as I can tell is the only occurrence of invalidating all sessions

@Vito0912 commented on GitHub (Dec 16, 2025): For your info. You should never, ever share aboves token. It's like a password. If that would be an old token, anyone would be able to login to your server. Anyway, that above will expire soon and anyway is not valid as you said But it looks like the session got deleted. As long as you did not lgog out, which makes no sense, the only line that probably would affect this is: https://github.com/advplyr/audiobookshelf/blob/626596b192013ba9f5a011dd110e288124c95ebe/server/auth/TokenManager.js#L364-L393 because it invalidates all refresh tokens, which sounds like the cause and, as far as I can tell is the only occurrence of invalidating all sessions
Author
Owner

@JamesRagnar commented on GitHub (Dec 16, 2025):

I can second this, every so often my refresh token is rejected and the server logs a "Failed to refresh token. Session not found for refresh token" error. I haven't seen a consistent cause for this, it seems to fail about 1 of 5 app launches when I call /auth/refresh.

I'm working on adding a bit more logging and double checking I'm not making duplicate requests or anything, but figured it was worth checking in if there are any scenarios that could lead to a deleted session like this.

@JamesRagnar commented on GitHub (Dec 16, 2025): I can second this, every so often my refresh token is rejected and the server logs a "Failed to refresh token. Session not found for refresh token" error. I haven't seen a consistent cause for this, it seems to fail about 1 of 5 app launches when I call `/auth/refresh`. I'm working on adding a bit more logging and double checking I'm not making duplicate requests or anything, but figured it was worth checking in if there are any scenarios that could lead to a deleted session like this.
Author
Owner

@D3r3k23 commented on GitHub (Dec 16, 2025):

On my system, the audiobookshelf server regularly goes unresponsive, and the app loses connection. Sometimes when this happens, I need to re-login when it gets connected again. Also, sometimes when it asks me to login again, I can close and reopen the app to skip the login screen.

@D3r3k23 commented on GitHub (Dec 16, 2025): On my system, the audiobookshelf server regularly goes unresponsive, and the app loses connection. Sometimes when this happens, I need to re-login when it gets connected again. Also, sometimes when it asks me to login again, I can close and reopen the app to skip the login screen.
Author
Owner

@lagset commented on GitHub (Dec 28, 2025):

I can second this, every so often my refresh token is rejected and the server logs a "Failed to refresh token. Session not found for refresh token" error. I haven't seen a consistent cause for this, it seems to fail about 1 of 5 app launches when I call /auth/refresh.

I'm working on adding a bit more logging and double checking I'm not making duplicate requests or anything, but figured it was worth checking in if there are any scenarios that could lead to a deleted session like this.

JFYI: I observe exactly this behaviour on my instance (docker + traefik reverse proxy). I mostly use the android audiobookshelf app for playback. Re-logins occur about once a week. I use audiobookshelf mainl on a daily basis.

@lagset commented on GitHub (Dec 28, 2025): > I can second this, every so often my refresh token is rejected and the server logs a "Failed to refresh token. Session not found for refresh token" error. I haven't seen a consistent cause for this, it seems to fail about 1 of 5 app launches when I call `/auth/refresh`. > > I'm working on adding a bit more logging and double checking I'm not making duplicate requests or anything, but figured it was worth checking in if there are any scenarios that could lead to a deleted session like this. JFYI: I observe exactly this behaviour on my instance (docker + traefik reverse proxy). I mostly use the android audiobookshelf app for playback. Re-logins occur about once a week. I use audiobookshelf mainl on a daily basis.
Author
Owner

@biondogs commented on GitHub (Dec 29, 2025):

On my system, the audiobookshelf server regularly goes unresponsive, and the app loses connection. Sometimes when this happens, I need to re-login when it gets connected again. Also, sometimes when it asks me to login again, I can close and reopen the app to skip the login screen.

I third this exact experience.

I'm using docker and Nginx Proxy Manager.

@biondogs commented on GitHub (Dec 29, 2025): > On my system, the audiobookshelf server regularly goes unresponsive, and the app loses connection. Sometimes when this happens, I need to re-login when it gets connected again. Also, sometimes when it asks me to login again, I can close and reopen the app to skip the login screen. I third this exact experience. I'm using docker and Nginx Proxy Manager.
Author
Owner

@Vito0912 commented on GitHub (Dec 29, 2025):

For all that experience this: Do you do something special (e.g. daily restarts, database on network drive or similar etc.).
Anything that not every user does (/ only very few users)

@Vito0912 commented on GitHub (Dec 29, 2025): For all that experience this: Do you do something special (e.g. daily restarts, database on network drive or similar etc.). Anything that not every user does (/ only very few users)
Author
Owner

@biondogs commented on GitHub (Dec 29, 2025):

I think my use case is fairly typical.

Android app on several devices, one primary device.

Occasional webplayer use, 90% used with android auto in car.

About once per day, typically first use of day, app opens disconnected from server, with no books available. Either close app or reconnect manually, everything returns. Usually holds that way for at least the next several android auto sessions of the day. Then at some point auth / disconnect.

I do have the battery optimizations off, not using a power save profile.

I do switch from WiFi to mobile several times throughout the day.

@biondogs commented on GitHub (Dec 29, 2025): I think my use case is fairly typical. Android app on several devices, one primary device. Occasional webplayer use, 90% used with android auto in car. About once per day, typically first use of day, app opens disconnected from server, with no books available. Either close app or reconnect manually, everything returns. Usually holds that way for at least the next several android auto sessions of the day. Then at some point auth / disconnect. I do have the battery optimizations off, not using a power save profile. I do switch from WiFi to mobile several times throughout the day.
Author
Owner

@lagset commented on GitHub (Dec 29, 2025):

I am one of the affected users. my setup should be fairly typical:

Setup

  • Host system: Synology DSM 7.2 (DS420+)
  • Deployment: Docker via docker compose (command line, I do not use "Synology Container Manager")
  • Access: Traefik (via docker) as Reverse Proxy and Certificate Provider (Let's Encrypt)
  • Container is only exposed to local LAN, external access is done using Wireguard VPN into my local LAN network

Usage

  • Accessing/Playback mainly with Apps:

    • Android (90% of time): Audiobookshelf App (works)
    • iOS/iPadOS (10% of time): Plappa (works)
  • Two main user accounts, one admin user account

  • Usage locally in LAN or remotely by connecting the client device using Wireguard to local network (both playbacks work)

There is, so far, no recognizable pattern to when the re-authentication appears. It's not one single client, it appears when connected internally as well as externally (VPN).

If it helps, I can of course provinde additional resources like logs or the used docker compose file.

Thanks for looking into this!

@lagset commented on GitHub (Dec 29, 2025): I am one of the affected users. my setup should be fairly typical: ## Setup - Host system: Synology DSM 7.2 (DS420+) - Deployment: Docker via docker compose (command line, I do not use "Synology Container Manager") - Access: Traefik (via docker) as Reverse Proxy and Certificate Provider (Let's Encrypt) - Container is only exposed to local LAN, external access is done using Wireguard VPN into my local LAN network ## Usage - Accessing/Playback mainly with Apps: - Android (90% of time): Audiobookshelf App (works) - iOS/iPadOS (10% of time): Plappa (works) - Two main user accounts, one admin user account - Usage locally in LAN or remotely by connecting the client device using Wireguard to local network (both playbacks work) There is, so far, no recognizable pattern to when the re-authentication appears. It's not one single client, it appears when connected internally as well as externally (VPN). If it helps, I can of course provinde additional resources like logs or the used docker compose file. Thanks for looking into this!
Author
Owner

@JamesRagnar commented on GitHub (Jan 4, 2026):

For all that experience this: Do you do something special (e.g. daily restarts, database on network drive or similar etc.).
Anything that not every user does (/ only very few users)

I'm a bit of an edge case, working on a personal third party app on iOS. Server has been running consistently for some time with no changes. I get these events irregularly, without a consistent repro unfortunately.

I store the refresh token in keychain and use it to elevate to a full online session on each app launch. There is also a basic re-auth flow that catches unathentication events and attempts to renew the token where applicable. For both of these, I get an irregular error where the server can't seem to find the associated session for that token. I tend not to log out unless testing something through that flow, often I'm just launching the app to check some work and 20% of the time it won't accept the refresh token.

@JamesRagnar commented on GitHub (Jan 4, 2026): > For all that experience this: Do you do something special (e.g. daily restarts, database on network drive or similar etc.). Anything that not every user does (/ only very few users) I'm a bit of an edge case, working on a personal third party app on iOS. Server has been running consistently for some time with no changes. I get these events irregularly, without a consistent repro unfortunately. I store the refresh token in keychain and use it to elevate to a full online session on each app launch. There is also a basic re-auth flow that catches unathentication events and attempts to renew the token where applicable. For both of these, I get an irregular error where the server can't seem to find the associated session for that token. I tend not to log out unless testing something through that flow, often I'm just launching the app to check some work and 20% of the time it won't accept the refresh token.
Author
Owner

@ggrensteiner commented on GitHub (Jan 5, 2026):

I was getting this daily on the latest android client. Traefik+official current docker server+authentik

Downgraded to 9.81-beta and it hasn't happened for 5 days.

Also that obnoxious 35 second delay on opening the app doesn't occur on 9.81-beta

Maybe the place to look is client side, not server side.

@ggrensteiner commented on GitHub (Jan 5, 2026): I was getting this daily on the latest android client. Traefik+official current docker server+authentik Downgraded to 9.81-beta and it hasn't happened for 5 days. Also that obnoxious 35 second delay on opening the app doesn't occur on 9.81-beta Maybe the place to look is client side, not server side.
Author
Owner

@D3r3k23 commented on GitHub (Jan 6, 2026):

For all that experience this: Do you do something special (e.g. daily restarts, database on network drive or similar etc.).
Anything that not every user does (/ only very few users)

I can think of a couple possibilities.

Large podcast library:
My library has 125 podcasts, and most of the podcasts have scheduled automatic episode downloads.

Memory issues:
I've had some problems with my server running out of memory, and being slow/unresponsive as a result. But I've removed some services that had high memory usage and I don't think I'm experiencing this issue anymore.

Maybe the place to look is client side, not server side.

Not for the issue I have. It's been going on for a while, on both the web client and Android app.

@D3r3k23 commented on GitHub (Jan 6, 2026): > For all that experience this: Do you do something special (e.g. daily restarts, database on network drive or similar etc.). Anything that not every user does (/ only very few users) I can think of a couple possibilities. Large podcast library: My library has 125 podcasts, and most of the podcasts have scheduled automatic episode downloads. Memory issues: I've had some problems with my server running out of memory, and being slow/unresponsive as a result. But I've removed some services that had high memory usage and I don't think I'm experiencing this issue anymore. > Maybe the place to look is client side, not server side. Not for the issue I have. It's been going on for a while, on both the web client and Android app.
Author
Owner

@jneidel commented on GitHub (Jan 19, 2026):

JFYI: I observe exactly this behaviour on my instance (docker + traefik reverse proxy). I mostly use the android audiobookshelf app for playback. Re-logins occur about once a week. I use audiobookshelf mainl on a daily basis.

This sounds like what has been happening to me too. Says "Failed to refresh token" and I need to relogin on my android about once a week (docker + nginx proxy manager).

@jneidel commented on GitHub (Jan 19, 2026): > JFYI: I observe exactly this behaviour on my instance (docker + traefik reverse proxy). I mostly use the android audiobookshelf app for playback. Re-logins occur about once a week. I use audiobookshelf mainl on a daily basis. This sounds like what has been happening to me too. Says "Failed to refresh token" and I need to relogin on my android about once a week (docker + nginx proxy manager).
Author
Owner

@meerumschlungen commented on GitHub (Jan 19, 2026):

Same here, experienced in Prologue and plappa (both iOS) and pocket-id as native OIDC IDP for ABS.

@meerumschlungen commented on GitHub (Jan 19, 2026): Same here, experienced in Prologue and plappa (both iOS) and pocket-id as native OIDC IDP for ABS.
Author
Owner

@Crononaut commented on GitHub (Jan 19, 2026):

Same issue since updating to v2.32.1

Funny thing is, I have one more user on my server. He uses the android app too, but he says that it doesn't happen to him.

It seems that I have to re-authenticate about every hour or something. Sometimes it even keeps playing in the background but prompting me to login again if trying to access the app.

Also, keep getting an "error synchronizing, restart playback to fix" or something error after update.

(Docker + nginx proxy manager + cloudflare reverse proxy tunnel)

[2026-01-19 16:00:51.813] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:00:51.813] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:00:51.824] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:01:53.773] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19267
[2026-01-19 16:01:53.793] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:01:53.793] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:01:53.801] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:03:08.806] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19341
[2026-01-19 16:03:08.820] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:03:08.820] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:03:08.830] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:03:41.634] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19373
[2026-01-19 16:03:41.653] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:03:41.653] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:03:41.666] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:04:17.626] DEBUG: [SessionController] Serving audio track 1 for session "ce9e626e-1c97-414d-901c-e7efaa0f79c7" belonging to user "Username"
[2026-01-19 16:04:17.865] INFO: [SocketAuthority] Socket Connected to /socket.io 2PvQptvQw2a6KiaZAAJS
[2026-01-19 16:04:18.011] DEBUG: [SocketAuthority] Authenticating socket to user "Username"
[2026-01-19 16:05:17.570] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19433
[2026-01-19 16:05:17.584] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:05:17.594] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:05:32.534] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19508
[2026-01-19 16:05:32.556] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:05:32.566] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:05:47.526] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19598
[2026-01-19 16:05:47.544] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:05:47.553] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:05:52.936] DEBUG: [SocketAuthority] User Offline Username
[2026-01-19 16:05:52.937] INFO: [SocketAuthority] Socket 2PvQptvQw2a6KiaZAAJS disconnected from client "Username" after 95072ms (Reason: ping timeout)
[2026-01-19 16:05:52.938] DEBUG: [SocketAuthority] Socket 2PvQptvQw2a6KiaZAAJS disconnected, any active searches will timeout
[2026-01-19 16:06:02.515] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19703
[2026-01-19 16:06:02.536] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:06:02.536] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:06:02.544] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:07:17.649] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19768
[2026-01-19 16:07:17.669] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:07:17.669] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:07:17.678] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:08:32.552] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19842
[2026-01-19 16:08:32.568] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:08:32.569] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:08:32.580] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:09:47.550] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19916
[2026-01-19 16:09:47.569] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache
[2026-01-19 16:09:47.569] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8
[2026-01-19 16:09:47.578] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
[2026-01-19 16:10:02.654] DEBUG: [Auth] refreshing token. shouldReturnRefreshToken: true
[2026-01-19 16:10:02.664] DEBUG: [ApiCacheManager] session.afterUpdate: Clearing cache
[2026-01-19 16:10:17.669] DEBUG: [Auth] refreshing token. shouldReturnRefreshToken: true
[2026-01-19 16:10:17.672] ERROR: [TokenManager] Failed to refresh token. Session not found for refresh token: ------
[2026-01-19 16:30:39.584] INFO: Received ping
[2026-01-19 16:30:39.888] DEBUG: [Auth] refreshing token. shouldReturnRefreshToken: true
[2026-01-19 16:30:39.891] ERROR: [TokenManager] Failed to refresh token. Session not found for refresh token: ------
026-01-19 16:30:48.312] INFO: [LocalAuth] User "Username" logged in from ip xxx.xxx.xxx.xxx
[2026-01-19 16:30:48.323] DEBUG: [ApiCacheManager] session.afterCreate: Clearing cache
[2026-01-19 16:30:48.324] DEBUG: [Auth] handleLoginSuccess: returnTokens: true, isRefreshTokenInResponse: true
[2026-01-19 16:30:48.554] DEBUG: [ApiCacheManager] count: 0 size: 0
[2026-01-19 16:30:48.607] DEBUG: Loaded 5 of 5 items for "Continue Listening/Reading" in 0.05s
[2026-01-19 16:30:48.644] DEBUG: Loaded 1 of 1 items for "Continue Series" in 0.04s
[2026-01-19 16:30:48.675] DEBUG: Loaded 10 of 11 items for "Recently Added" in 0.03s
[2026-01-19 16:30:48.696] DEBUG: Loaded 2 of 2 series for "Recent Series" in 0.02s
[2026-01-19 16:30:48.714] INFO: [SocketAuthority] Socket Connected to /socket.io MdoWTq8UN17dpqR5AAJU
[2026-01-19 16:30:48.730] DEBUG: [ApiCacheManager] count: 0 size: 0
[2026-01-19 16:30:48.736] DEBUG: Loaded 10 of 14 items for "Discover" in 0.04s
[2026-01-19 16:30:48.740] DEBUG: [ApiCacheManager] Cache miss: {"user":"Username","url":"/libraries"}
[2026-01-19 16:30:48.758] DEBUG: Loaded 10 of 29 items for "Listen/Read Again" in 0.02s
[2026-01-19 16:30:48.763] DEBUG: Loaded 4 of 4 authors for "Newest Authors" in 0.00s
[2026-01-19 16:30:48.764] DEBUG: Loaded 7 personalized shelves in 0.21s
[2026-01-19 16:30:48.764] DEBUG: [ApiCacheManager] Cache miss: {"user":"Username","url":"/libraries/f9420db2-2522-40c9-8f60-5758717496c3/personalized?minified=1&include=rssfeed,numEpisodesIncomplete"}
[2026-01-19 16:30:48.764] DEBUG: [ApiCacheManager] Caching with 1800000 ms TTL
[2026-01-19 16:30:48.773] DEBUG: [SocketAuthority] Authenticating socket to user "Username"
[2026-01-19 16:30:48.826] DEBUG: [ApiCacheManager] count: 2 size: 74868
[2026-01-19 16:30:48.833] DEBUG: Filter data for f9420db2-2522-40c9-8f60-5758717496c3 has not changed, returning cached data and updating cache time after 0.01s
[2026-01-19 16:30:48.834] DEBUG: [ApiCacheManager] Cache miss: {"user":"Username","url":"/libraries/f9420db2-2522-40c9-8f60-5758717496c3?include=filterdata"}
[2026-01-19 16:30:49.136] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache

@Crononaut commented on GitHub (Jan 19, 2026): Same issue since updating to v2.32.1 Funny thing is, I have one more user on my server. He uses the android app too, but he says that it doesn't happen to him. It seems that I have to re-authenticate about every hour or something. Sometimes it even keeps playing in the background but prompting me to login again if trying to access the app. Also, keep getting an "error synchronizing, restart playback to fix" or something error after update. (Docker + nginx proxy manager + cloudflare reverse proxy tunnel) [2026-01-19 16:00:51.813] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:00:51.813] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:00:51.824] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:01:53.773] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19267 [2026-01-19 16:01:53.793] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:01:53.793] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:01:53.801] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:03:08.806] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19341 [2026-01-19 16:03:08.820] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:03:08.820] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:03:08.830] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:03:41.634] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19373 [2026-01-19 16:03:41.653] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:03:41.653] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:03:41.666] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:04:17.626] DEBUG: [SessionController] Serving audio track 1 for session "ce9e626e-1c97-414d-901c-e7efaa0f79c7" belonging to user "Username" [2026-01-19 16:04:17.865] INFO: [SocketAuthority] Socket Connected to /socket.io 2PvQptvQw2a6KiaZAAJS [2026-01-19 16:04:18.011] DEBUG: [SocketAuthority] Authenticating socket to user "Username" [2026-01-19 16:05:17.570] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19433 [2026-01-19 16:05:17.584] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:05:17.594] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:05:32.534] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19508 [2026-01-19 16:05:32.556] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:05:32.566] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:05:47.526] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19598 [2026-01-19 16:05:47.544] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:05:47.553] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:05:52.936] DEBUG: [SocketAuthority] User Offline Username [2026-01-19 16:05:52.937] INFO: [SocketAuthority] Socket 2PvQptvQw2a6KiaZAAJS disconnected from client "Username" after 95072ms (Reason: ping timeout) [2026-01-19 16:05:52.938] DEBUG: [SocketAuthority] Socket 2PvQptvQw2a6KiaZAAJS disconnected, any active searches will timeout [2026-01-19 16:06:02.515] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19703 [2026-01-19 16:06:02.536] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:06:02.536] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:06:02.544] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:07:17.649] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19768 [2026-01-19 16:07:17.669] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:07:17.669] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:07:17.678] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:08:32.552] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19842 [2026-01-19 16:08:32.568] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:08:32.569] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:08:32.580] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:09:47.550] DEBUG: [PlaybackSessionManager] syncSession "ce9e626e-1c97-414d-901c-e7efaa0f79c7" (Device: CPH2581 SDK 36 / v0.10.1-beta) | Total Time Listened: 19916 [2026-01-19 16:09:47.569] DEBUG: [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache [2026-01-19 16:09:47.569] DEBUG: [SocketAuthority] clientEmitter - no clients found for user 21e4f038-3f09-445b-bfe0-88acae0c34a8 [2026-01-19 16:09:47.578] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache [2026-01-19 16:10:02.654] DEBUG: [Auth] refreshing token. shouldReturnRefreshToken: true [2026-01-19 16:10:02.664] DEBUG: [ApiCacheManager] session.afterUpdate: Clearing cache [2026-01-19 16:10:17.669] DEBUG: [Auth] refreshing token. shouldReturnRefreshToken: true [2026-01-19 16:10:17.672] ERROR: [TokenManager] Failed to refresh token. Session not found for refresh token: ------ [2026-01-19 16:30:39.584] INFO: Received ping [2026-01-19 16:30:39.888] DEBUG: [Auth] refreshing token. shouldReturnRefreshToken: true [2026-01-19 16:30:39.891] ERROR: [TokenManager] Failed to refresh token. Session not found for refresh token: ------ 026-01-19 16:30:48.312] INFO: [LocalAuth] User "Username" logged in from ip xxx.xxx.xxx.xxx [2026-01-19 16:30:48.323] DEBUG: [ApiCacheManager] session.afterCreate: Clearing cache [2026-01-19 16:30:48.324] DEBUG: [Auth] handleLoginSuccess: returnTokens: true, isRefreshTokenInResponse: true [2026-01-19 16:30:48.554] DEBUG: [ApiCacheManager] count: 0 size: 0 [2026-01-19 16:30:48.607] DEBUG: Loaded 5 of 5 items for "Continue Listening/Reading" in 0.05s [2026-01-19 16:30:48.644] DEBUG: Loaded 1 of 1 items for "Continue Series" in 0.04s [2026-01-19 16:30:48.675] DEBUG: Loaded 10 of 11 items for "Recently Added" in 0.03s [2026-01-19 16:30:48.696] DEBUG: Loaded 2 of 2 series for "Recent Series" in 0.02s [2026-01-19 16:30:48.714] INFO: [SocketAuthority] Socket Connected to /socket.io MdoWTq8UN17dpqR5AAJU [2026-01-19 16:30:48.730] DEBUG: [ApiCacheManager] count: 0 size: 0 [2026-01-19 16:30:48.736] DEBUG: Loaded 10 of 14 items for "Discover" in 0.04s [2026-01-19 16:30:48.740] DEBUG: [ApiCacheManager] Cache miss: {"user":"Username","url":"/libraries"} [2026-01-19 16:30:48.758] DEBUG: Loaded 10 of 29 items for "Listen/Read Again" in 0.02s [2026-01-19 16:30:48.763] DEBUG: Loaded 4 of 4 authors for "Newest Authors" in 0.00s [2026-01-19 16:30:48.764] DEBUG: Loaded 7 personalized shelves in 0.21s [2026-01-19 16:30:48.764] DEBUG: [ApiCacheManager] Cache miss: {"user":"Username","url":"/libraries/f9420db2-2522-40c9-8f60-5758717496c3/personalized?minified=1&include=rssfeed,numEpisodesIncomplete"} [2026-01-19 16:30:48.764] DEBUG: [ApiCacheManager] Caching with 1800000 ms TTL [2026-01-19 16:30:48.773] DEBUG: [SocketAuthority] Authenticating socket to user "Username" [2026-01-19 16:30:48.826] DEBUG: [ApiCacheManager] count: 2 size: 74868 [2026-01-19 16:30:48.833] DEBUG: Filter data for f9420db2-2522-40c9-8f60-5758717496c3 has not changed, returning cached data and updating cache time after 0.01s [2026-01-19 16:30:48.834] DEBUG: [ApiCacheManager] Cache miss: {"user":"Username","url":"/libraries/f9420db2-2522-40c9-8f60-5758717496c3?include=filterdata"} [2026-01-19 16:30:49.136] DEBUG: [ApiCacheManager] Object.afterBulkUpdate: Clearing cache
Author
Owner

@meerumschlungen commented on GitHub (Jan 20, 2026):

I tried around a bit and I can't reproduce the problem by forcefully recreating the ABS container nor by restarting the docker engine, so from my understanding (limited, as I don't know about the ABS code) the refresh token should get correctly persisted permanently in the application layer but for some reason ABS does not refresh the session in time.

@meerumschlungen commented on GitHub (Jan 20, 2026): I tried around a bit and I can't reproduce the problem by forcefully recreating the ABS container nor by restarting the docker engine, so from my understanding (limited, as I don't know about the ABS code) the refresh token should get correctly persisted permanently in the application layer but for some reason ABS does not refresh the session in time.
Author
Owner

@tburnsed commented on GitHub (Feb 3, 2026):

I was having this issue, using Nginx Proxy Manger. It would log me out if did not use the app for more then a few minutes.

I have added the following to my my Ngnix proxy manager config as well as making sure websocks is on, Cache Assets and Block Common Exploits are off:

proxy_connect_timeout 86400s;
proxy_send_timeout 86400s;
proxy_read_timeout 86400s;
send_timeout 86400s;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;

After a week of testing It has not asked me to login once, up to 2 days between uses.

@tburnsed commented on GitHub (Feb 3, 2026): I was having this issue, using Nginx Proxy Manger. It would log me out if did not use the app for more then a few minutes. I have added the following to my my Ngnix proxy manager config as well as making sure websocks is on, Cache Assets and Block Common Exploits are off: proxy_connect_timeout 86400s; proxy_send_timeout 86400s; proxy_read_timeout 86400s; send_timeout 86400s; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; After a week of testing It has not asked me to login once, up to 2 days between uses.
Author
Owner

@KotMountain commented on GitHub (Feb 8, 2026):

I’m seeing this issue with multiple mobile clients on one of my devices. I don’t experience it as often if I’m playing from a downloaded book. Running the latest docker version with Zoraxy reverse proxy providing SSL. Clients exhibiting the issue have been ABS, Prologue, Tonspur, and AudioBooth.

@KotMountain commented on GitHub (Feb 8, 2026): I’m seeing this issue with multiple mobile clients on one of my devices. I don’t experience it as often if I’m playing from a downloaded book. Running the latest docker version with Zoraxy reverse proxy providing SSL. Clients exhibiting the issue have been ABS, Prologue, Tonspur, and AudioBooth.
Author
Owner

@PraetorAugustus commented on GitHub (Feb 10, 2026):

Same problem here, ALMOST.

My wife has to re-authenticate about once a week. I don't.

We're both using the same ABS server, same network, same player (AudioBooth on iOS).

She's a User and I'm an Admin. That's the only difference in our setup. I don't think that's the reason, but correct me if I'm wrong.

Server setup:
ABS 2.32.1
Docker on Synology DSM 7.3.2
64 GB RAM (which is overkill, I know... RAM was cheap back then)

I'll keep an eye on the logs, I guess.

@PraetorAugustus commented on GitHub (Feb 10, 2026): Same problem here, ALMOST. My wife has to re-authenticate about once a week. I don't. We're both using the same ABS server, same network, same player (AudioBooth on iOS). She's a User and I'm an Admin. That's the only difference in our setup. I don't _think_ that's the reason, but correct me if I'm wrong. Server setup: ABS 2.32.1 Docker on Synology DSM 7.3.2 64 GB RAM (which is overkill, I know... RAM was cheap back then) I'll keep an eye on the logs, I guess.
Author
Owner

@cookie-monster1649 commented on GitHub (Feb 17, 2026):

Same issue here. I'm running
iOS Version 1.6 (1768540294)
Docker version 2.32.1

I'm connecting via Tailscale with username/pw auth and get logged out multiple times a day.

It's just me, one app one docker instance. No other apps or instances are connected except for the one iOS app.

@cookie-monster1649 commented on GitHub (Feb 17, 2026): Same issue here. I'm running iOS Version 1.6 (1768540294) Docker version 2.32.1 I'm connecting via Tailscale with username/pw auth and get logged out multiple times a day. It's just me, one app one docker instance. No other apps or instances are connected except for the one iOS app.
Author
Owner

@jneidel commented on GitHub (Feb 17, 2026):

The Nginx proxy manager configuration of @tburnsed worked for me. Have not had any log-outs for two weeks.
To me this confirms it as a proxy misconfiguration, not an application issue. Should probably still be added to the docs.

Image
@jneidel commented on GitHub (Feb 17, 2026): The Nginx proxy manager configuration of @tburnsed worked for me. Have not had any log-outs for two weeks. To me this confirms it as a proxy misconfiguration, not an application issue. Should probably still be added to the docs. <img width="400" alt="Image" src="https://github.com/user-attachments/assets/a37f045c-e8bd-4293-bb7e-a21837bc550f" />
Author
Owner

@nichwall commented on GitHub (Feb 17, 2026):

The Nginx proxy manager configuration of tburnsed worked for me. Have not had any log-outs for two weeks.
To me this confirms it as a proxy misconfiguration, not an application issue. Should probably still be added to the docs.

This does not make sense for fixing the logout problem. You are:

  • Setting effectively no timeouts for any connection. This does not affect token refresh, unless the request is timing out due to spotty connection (but even then, 24 hours for the server to respond to a request is overkill)
  • Enabling websockets (which you should already have enabled)
  • Setting the forward logic (which is used to make sure RSS feeds and non standard ports work). If this was the problem, you wouldn't ever be able to use the server for more than an hour and other things would be breaking

I could see the issue being related to the request timeout and a race condition found in the server, but I personally have not had this happen to me (my wife has, so I know it can happen with my current configuration but I haven't ever experienced). An attempt to fix it is here https://github.com/advplyr/audiobookshelf/pull/5004, but needs review.

@nichwall commented on GitHub (Feb 17, 2026): > The Nginx proxy manager configuration of tburnsed worked for me. Have not had any log-outs for two weeks. > To me this confirms it as a proxy misconfiguration, not an application issue. Should probably still be added to the docs. This does not make sense for fixing the logout problem. You are: - Setting effectively no timeouts for any connection. This does not affect token refresh, unless the request is timing out due to spotty connection (but even then, 24 hours for the server to respond to a request is overkill) - Enabling websockets (which you should already have enabled) - Setting the forward logic (which is used to make sure RSS feeds and non standard ports work). If this was the problem, you wouldn't ever be able to use the server for more than an hour and other things would be breaking I could see the issue being related to the request timeout and a race condition found in the server, but I personally have not had this happen to me (my wife has, so I know it can happen with my current configuration but I haven't ever experienced). An attempt to fix it is here https://github.com/advplyr/audiobookshelf/pull/5004, but needs review.
Author
Owner

@dojoca commented on GitHub (Feb 19, 2026):

Experiencing the same issue here on 2.32.1 with Prologue on iOS 26.

@dojoca commented on GitHub (Feb 19, 2026): Experiencing the same issue here on 2.32.1 with Prologue on iOS 26.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/audiobookshelf-advplyr#2975
No description provided.