[Bug]: Everytime I open the library, it first shows "Oops... No libraries available" #2935

Closed
opened 2026-04-25 00:11:57 +02:00 by adam · 19 comments
Owner

Originally created by @xcy7e on GitHub (Aug 8, 2025).

What happened?

Since the update with the new auth-system, everytime I open the library (either main domain or direct link to library with lib-id in the url) it shows

Oops... No libraries available

Though I can simply click on "Home" or any other area and it opens fine.
I relogged in, and it does happen on my phone as well as every computer I tried.

I waited because I thought this might be fixed in the future, but still is not, and nobody else seems to have this reported.

What did you expect to happen?

It should display the home page of the main library.

Steps to reproduce the issue

  1. Open ABS through domain or link to main library

Audiobookshelf version

v2.27.0

How are you running audiobookshelf?

Debian/PPA

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?

Firefox

Logs

# @edit: - first message that appeared
[Auth] refreshing token. shouldReturnRefreshToken: false

# @original:
[ApiCacheManager] count: 0 size: 0
{"timestamp":"2025-08-08 18:04:35.765","source":"    at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 0 size: 0","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:04:35.771","source":"    at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"andi\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:04:35.791","source":"    at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io -TfFsK1ByZlQhhFnAADz","levelName":"INFO","level":2}
{"timestamp":"2025-08-08 18:04:35.812","source":"    at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"andi\"","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:04:38.205","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline andi","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:04:38.205","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket -TfFsK1ByZlQhhFnAADz disconnected from client \"andi\" after 2414ms (Reason: transport close)","levelName":"INFO","level":2}
{"timestamp":"2025-08-08 18:09:47.418","source":"    at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 1 size: 3701","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:09:47.424","source":"    at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:09:48.073","source":"    at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io 3rWvero1SZrcLEFnAAD1","levelName":"INFO","level":2}
{"timestamp":"2025-08-08 18:09:48.103","source":"    at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"jonathan\"","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:33.640","source":"    at Logger.setLogLevel (/snapshot/audiobookshelf/server/Logger.js)","message":"Set Log Level to DEBUG","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:33.647","source":"    at ApiCacheManager.clear (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Array.afterUpsert: Clearing cache","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:37.316","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline jonathan","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:37.317","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket ZWuJ1yfLV0YRUnqVAADx disconnected from client \"jonathan\" after 758056ms (Reason: transport close)","levelName":"INFO","level":2}
{"timestamp":"2025-08-08 18:16:38.160","source":"    at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 0 size: 0","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:38.164","source":"    at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:38.278","source":"    at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io v6ZMl1AeeYiW_OFtAAD3","levelName":"INFO","level":2}
{"timestamp":"2025-08-08 18:16:38.315","source":"    at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"jonathan\"","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:39.199","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline jonathan","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:39.199","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket v6ZMl1AeeYiW_OFtAAD3 disconnected from client \"jonathan\" after 921ms (Reason: transport close)","levelName":"INFO","level":2}
{"timestamp":"2025-08-08 18:16:39.961","source":"    at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 1 size: 3701","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:39.961","source":"    at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] Cache hit: {\"user\":\"jonathan\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:40.051","source":"    at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io 5sUmDY9DRFbqwT5DAAD5","levelName":"INFO","level":2}
{"timestamp":"2025-08-08 18:16:40.086","source":"    at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"jonathan\"","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.382","source":"    at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 1 size: 3701","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.398","source":"    at Object.getFilterData (/snapshot/audiobookshelf/server/utils/queries/libraryFilters.js)","message":"Filter data for 2f9013fe-7cb8-41c9-92f6-84326f40dcd0 has not changed, returning cached data and updating cache time after 0.01s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.401","source":"    at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries/2f9013fe-7cb8-41c9-92f6-84326f40dcd0?include=filterdata\"}","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.561","source":"    at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 2 size: 165356","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.583","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 134 items for \"Continue Listening/Reading\" in 0.02s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.884","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 28 items for \"Continue Series\" in 0.30s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.912","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 236 items for \"Recently Added\" in 0.03s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:41.932","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 5 of 28 series for \"Recent Series\" in 0.02s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:42.227","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 1352 items for \"Discover\" in 0.29s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:42.245","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 436 items for \"Listen/Read Again\" in 0.02s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:42.251","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 66 authors for \"Newest Authors\" in 0.01s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:42.252","source":"    at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 7 personalized shelves in 0.69s","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:42.252","source":"    at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries/2f9013fe-7cb8-41c9-92f6-84326f40dcd0/personalized?include=rssfeed,numEpisodesIncomplete,share\"}","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:16:42.253","source":"    at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Caching with 1800000 ms TTL","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:17:51.251","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline jonathan","levelName":"DEBUG","level":1}
{"timestamp":"2025-08-08 18:17:51.251","source":"    at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket 3rWvero1SZrcLEFnAAD1 disconnected from client \"jonathan\" after 483179ms (Reason: transport close)","levelName":"INFO","level":2}

Additional Notes

If I refresh using F5 it stays at "No libraries available" - I must click on any link (abs-logo link in the top left corner, navigation link, etc.) to get my library shown.

Originally created by @xcy7e on GitHub (Aug 8, 2025). ### What happened? Since the update with the new auth-system, everytime I open the library (either main domain or direct link to library with `lib-id` in the url) it shows > **Oops... No libraries available** Though I can simply click on "Home" or any other area and it opens fine. I relogged in, and it does happen on my phone as well as every computer I tried. I waited because I thought this might be fixed in the future, but still is not, and nobody else seems to have this reported. ### What did you expect to happen? It should display the home page of the main library. ### Steps to reproduce the issue 1. Open ABS through domain or link to main library ### Audiobookshelf version v2.27.0 ### How are you running audiobookshelf? Debian/PPA ### 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? Firefox ### Logs ```shell # @edit: - first message that appeared [Auth] refreshing token. shouldReturnRefreshToken: false # @original: [ApiCacheManager] count: 0 size: 0 {"timestamp":"2025-08-08 18:04:35.765","source":" at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 0 size: 0","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:04:35.771","source":" at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"andi\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:04:35.791","source":" at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io -TfFsK1ByZlQhhFnAADz","levelName":"INFO","level":2} {"timestamp":"2025-08-08 18:04:35.812","source":" at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"andi\"","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:04:38.205","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline andi","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:04:38.205","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket -TfFsK1ByZlQhhFnAADz disconnected from client \"andi\" after 2414ms (Reason: transport close)","levelName":"INFO","level":2} {"timestamp":"2025-08-08 18:09:47.418","source":" at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 1 size: 3701","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:09:47.424","source":" at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:09:48.073","source":" at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io 3rWvero1SZrcLEFnAAD1","levelName":"INFO","level":2} {"timestamp":"2025-08-08 18:09:48.103","source":" at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"jonathan\"","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:33.640","source":" at Logger.setLogLevel (/snapshot/audiobookshelf/server/Logger.js)","message":"Set Log Level to DEBUG","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:33.647","source":" at ApiCacheManager.clear (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Array.afterUpsert: Clearing cache","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:37.316","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline jonathan","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:37.317","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket ZWuJ1yfLV0YRUnqVAADx disconnected from client \"jonathan\" after 758056ms (Reason: transport close)","levelName":"INFO","level":2} {"timestamp":"2025-08-08 18:16:38.160","source":" at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 0 size: 0","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:38.164","source":" at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:38.278","source":" at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io v6ZMl1AeeYiW_OFtAAD3","levelName":"INFO","level":2} {"timestamp":"2025-08-08 18:16:38.315","source":" at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"jonathan\"","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:39.199","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline jonathan","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:39.199","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket v6ZMl1AeeYiW_OFtAAD3 disconnected from client \"jonathan\" after 921ms (Reason: transport close)","levelName":"INFO","level":2} {"timestamp":"2025-08-08 18:16:39.961","source":" at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 1 size: 3701","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:39.961","source":" at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] Cache hit: {\"user\":\"jonathan\",\"url\":\"/libraries\"}","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:40.051","source":" at Namespace.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket Connected to /audiobookshelf/socket.io 5sUmDY9DRFbqwT5DAAD5","levelName":"INFO","level":2} {"timestamp":"2025-08-08 18:16:40.086","source":" at SocketAuthority.authenticateSocket (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Authenticating socket to user \"jonathan\"","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.382","source":" at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 1 size: 3701","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.398","source":" at Object.getFilterData (/snapshot/audiobookshelf/server/utils/queries/libraryFilters.js)","message":"Filter data for 2f9013fe-7cb8-41c9-92f6-84326f40dcd0 has not changed, returning cached data and updating cache time after 0.01s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.401","source":" at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries/2f9013fe-7cb8-41c9-92f6-84326f40dcd0?include=filterdata\"}","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.561","source":" at /snapshot/audiobookshelf/server/managers/ApiCacheManager.js","message":"[ApiCacheManager] count: 2 size: 165356","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.583","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 134 items for \"Continue Listening/Reading\" in 0.02s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.884","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 28 items for \"Continue Series\" in 0.30s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.912","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 236 items for \"Recently Added\" in 0.03s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:41.932","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 5 of 28 series for \"Recent Series\" in 0.02s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:42.227","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 1352 items for \"Discover\" in 0.29s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:42.245","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 436 items for \"Listen/Read Again\" in 0.02s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:42.251","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 10 of 66 authors for \"Newest Authors\" in 0.01s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:42.252","source":" at libraryItem.getPersonalizedShelves (/snapshot/audiobookshelf/server/models/LibraryItem.js)","message":"Loaded 7 personalized shelves in 0.69s","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:42.252","source":" at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Cache miss: {\"user\":\"jonathan\",\"url\":\"/libraries/2f9013fe-7cb8-41c9-92f6-84326f40dcd0/personalized?include=rssfeed,numEpisodesIncomplete,share\"}","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:16:42.253","source":" at ServerResponse.send (/snapshot/audiobookshelf/server/managers/ApiCacheManager.js)","message":"[ApiCacheManager] Caching with 1800000 ms TTL","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:17:51.251","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] User Offline jonathan","levelName":"DEBUG","level":1} {"timestamp":"2025-08-08 18:17:51.251","source":" at Socket.<anonymous> (/snapshot/audiobookshelf/server/SocketAuthority.js)","message":"[SocketAuthority] Socket 3rWvero1SZrcLEFnAAD1 disconnected from client \"jonathan\" after 483179ms (Reason: transport close)","levelName":"INFO","level":2} ``` ### Additional Notes If I refresh using `F5` it stays at "_No libraries available_" - I **must** click on any link (abs-logo link in the top left corner, navigation link, etc.) to get my library shown.
adam added the bug label 2026-04-25 00:11:57 +02:00
adam closed this issue 2026-04-25 00:11:58 +02:00
Author
Owner

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

How are you connecting to the server? Are you using direct IP, a reverse proxy, or something else?

@nichwall commented on GitHub (Aug 8, 2025): How are you connecting to the server? Are you using direct IP, a reverse proxy, or something else?
Author
Owner

@Vito0912 commented on GitHub (Aug 8, 2025):

Additional to nichwalls question, please check your network tab for any 4xx or 5xx requests

@Vito0912 commented on GitHub (Aug 8, 2025): Additional to nichwalls question, please check your network tab for any 4xx or 5xx requests
Author
Owner

@xcy7e commented on GitHub (Aug 9, 2025):

1. YES, I get a 401 response (see below)

/* 401 Response (only) when the error occurs **/
"response": {
  "status": 401,
  "statusText": "Unauthorized",
  "httpVersion": "HTTP/1.1",
  "headers": [
    {
      "name": "Date",
      "value": "Sat, 09 Aug 2025 08:20:36 GMT"
    },
    {
      "name": "Server",
      "value": "Apache/2.4.62 (Debian)"
    },
    {
      "name": "Content-Security-Policy",
      "value": "frame-ancestors 'self'"
    },
    {
      "name": "Content-Length",
      "value": "12"
    },
    {
      "name": "Keep-Alive",
      "value": "timeout=5, max=97"
    },
    {
      "name": "Connection",
      "value": "Keep-Alive"
    }
  ],
  "cookies": [],
  "content": {
    "mimeType": "text/xml",
    "size": 12,
    "text": "Unauthorized"
  },
  "redirectURL": "",
  "headersSize": 222,
  "bodySize": 234
},

2. YES, my apache uses a ReverseProxy

# Audiobookshelf reverse proxy
ProxyPreserveHost On
ProxyPass /.well-known !
ProxyPass / http://localhost:1337/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://localhost:1337/$1" [P,L]
@xcy7e commented on GitHub (Aug 9, 2025): ### 1. YES, I get a `401` response (see below) ```json /* 401 Response (only) when the error occurs **/ "response": { "status": 401, "statusText": "Unauthorized", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Date", "value": "Sat, 09 Aug 2025 08:20:36 GMT" }, { "name": "Server", "value": "Apache/2.4.62 (Debian)" }, { "name": "Content-Security-Policy", "value": "frame-ancestors 'self'" }, { "name": "Content-Length", "value": "12" }, { "name": "Keep-Alive", "value": "timeout=5, max=97" }, { "name": "Connection", "value": "Keep-Alive" } ], "cookies": [], "content": { "mimeType": "text/xml", "size": 12, "text": "Unauthorized" }, "redirectURL": "", "headersSize": 222, "bodySize": 234 }, ``` ### 2. YES, my apache uses a `ReverseProxy` ```apacheconf # Audiobookshelf reverse proxy ProxyPreserveHost On ProxyPass /.well-known ! ProxyPass / http://localhost:1337/ RewriteEngine on RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) "ws://localhost:1337/$1" [P,L] ```
Author
Owner

@Vito0912 commented on GitHub (Aug 9, 2025):

Can you try logout and login again and check if this still happens?

@Vito0912 commented on GitHub (Aug 9, 2025): Can you try logout and login again and check if this still happens?
Author
Owner

@xcy7e commented on GitHub (Aug 9, 2025):

Re-login doesn't fix it.

But it always takes quite some time for it to happen again, and then only the first time I open ABS again, it happens.
When I then click on a nav-item as stated, it does not happen again when I open a new tab/browser and I cant reproduce it anymore until a day/few hours has passed. It happens only on the first opening each day on every device.

As if it requires the session to expire, but this can't be, right?

I tried setting the two _TOKEN_EXPIRY-configs to 30 seconds each, to be able to reproduce it after a minute, but even after a minute the problem did not appear again, so I still may have to wait for a few hours or another day till it happens again.

Note: I don't have to login again, when it happens, I just have to click on a link/navitem to see the library again.

@xcy7e commented on GitHub (Aug 9, 2025): Re-login doesn't fix it. But it always takes quite some time for it to happen again, and then only the first time I open ABS again, it happens. When I then click on a nav-item as stated, it does not happen again when I open a new tab/browser and I cant reproduce it anymore until a day/few hours has passed. It happens only on the first opening each day on every device. As if it requires the session to expire, but this can't be, right? I tried setting the two `_TOKEN_EXPIRY`-configs to `30` seconds each, to be able to reproduce it after a minute, but even after a minute the problem did not appear again, so I still may have to wait for a few hours or another day till it happens again. Note: I don't have to login again, when it happens, I just have to click on a link/navitem to see the library again.
Author
Owner

@Vito0912 commented on GitHub (Aug 9, 2025):

@advplyr Sounds like an issue with the access token not correctly refreshed

Maybe also as an contribution: Instead of waiting until it is not valid anymore and we get a 401, why don't we check if the cookie is valid and then refresh pre request (because we know the lifetime exactly)

@Vito0912 commented on GitHub (Aug 9, 2025): @advplyr Sounds like an issue with the access token not correctly refreshed Maybe also as an contribution: Instead of waiting until it is not valid anymore and we get a 401, why don't we check if the cookie is valid and then refresh pre request (because we know the lifetime exactly)
Author
Owner

@advplyr commented on GitHub (Aug 9, 2025):

What would be most helpful is if you can share the network tab so we can see the full authentication flow of getting the 401 unauthorized, then refreshing the token, then making the original request again.

Can you try:

  1. Set the ACCESS_TOKEN_EXPIRY to 10
  2. Log out and restart the server.
  3. Login and wait 10 seconds for the token to expire.
  4. Refresh the page and share the network tab.

Network tab should look like:

Image
@advplyr commented on GitHub (Aug 9, 2025): What would be most helpful is if you can share the network tab so we can see the full authentication flow of getting the 401 unauthorized, then refreshing the token, then making the original request again. Can you try: 1. Set the `ACCESS_TOKEN_EXPIRY` to 10 2. Log out and restart the server. 3. Login and wait 10 seconds for the token to expire. 4. Refresh the page and share the network tab. Network tab should look like: <img width="746" height="605" alt="Image" src="https://github.com/user-attachments/assets/3811be2f-47b9-41df-9a18-35a5b3b744f8" />
Author
Owner

@advplyr commented on GitHub (Aug 10, 2025):

I updated my previous comment where I mistakenly put ACCESS_TOKEN_EXPIRY value in milliseconds.

The expiry env variables are in seconds.

@advplyr commented on GitHub (Aug 10, 2025): I updated my previous comment where I mistakenly put `ACCESS_TOKEN_EXPIRY` value in milliseconds. The expiry env variables are in seconds.
Author
Owner

@LeeThompson commented on GitHub (Aug 11, 2025):

I'm seeing this periodically as well but if I click on the upper left link it goes away and works normally. Next time it happens I'll try gathering the requested information and see if I can contribute anything that helps isolate this.

(In my environment I'm connecting directly to the docker instance by internal DNS name.)

UPDATE: Finally occurred again, this is Firefox's console output. I've replaced my intranet DNS entry for my instance of ABS with abs.local.

XML Parsing Error: syntax error
Location: http:/abs.local/audiobookshelf/api/authorize
Line Number 1, Column 1: authorize:1:1
Axios error 401 Unauthorized ebe5881.js:1:113298
    NuxtJS 10
	emP$/</<rfooaonResponseError

If I get this and click on the ABS icon on the upper left, it's all fine again.

@LeeThompson commented on GitHub (Aug 11, 2025): I'm seeing this periodically as well but if I click on the upper left link it goes away and works normally. Next time it happens I'll try gathering the requested information and see if I can contribute anything that helps isolate this. (In my environment I'm connecting directly to the docker instance by internal DNS name.) UPDATE: Finally occurred again, this is Firefox's console output. I've replaced my intranet DNS entry for my instance of ABS with `abs.local`. ``` XML Parsing Error: syntax error Location: http:/abs.local/audiobookshelf/api/authorize Line Number 1, Column 1: authorize:1:1 Axios error 401 Unauthorized ebe5881.js:1:113298 NuxtJS 10 emP$/</<rfooaonResponseError ``` If I get this and click on the ABS icon on the upper left, it's all fine again.
Author
Owner

@xcy7e commented on GitHub (Aug 11, 2025):

Here's my console / network output, now from vivaldi (chromium-based):

Console

Image

Network

Image

Here, I can't see the 401 in the network-list, though it's listed in the console errors.
If it works (no error appears), the two 404s are instead 200s.

Hope this helps

@xcy7e commented on GitHub (Aug 11, 2025): Here's my `console` / `network` output, now from vivaldi (chromium-based): ### Console <img width="1021" height="752" alt="Image" src="https://github.com/user-attachments/assets/4309e91a-643b-4603-a990-35abc77c3a3b" /> ### Network <img width="904" height="764" alt="Image" src="https://github.com/user-attachments/assets/135c2432-9c9c-4ecd-bb92-65cbe7489ec3" /> Here, I can't see the 401 in the network-list, though it's listed in the `console` errors. If it works (no error appears), the two `404`s are instead `200`s. Hope this helps
Author
Owner

@alexander-paterson commented on GitHub (Aug 11, 2025):

Just adding my +1 to this. I've been having this issue for the last few weeks. Probably since the auth change was made.

Happens the most when I'm connecting through Pangolin, although I think I've also seen it happen when I connect via my local IP.

@alexander-paterson commented on GitHub (Aug 11, 2025): Just adding my +1 to this. I've been having this issue for the last few weeks. Probably since the auth change was made. Happens the most when I'm connecting through Pangolin, although I think I've also seen it happen when I connect via my local IP.
Author
Owner

@advplyr commented on GitHub (Aug 12, 2025):

If anyone can reproduce this consistently and can show the network tab like I mentioned in https://github.com/advplyr/audiobookshelf/issues/4567#issuecomment-3171907488 that would help.

I haven't been able to reproduce this yet

@advplyr commented on GitHub (Aug 12, 2025): If anyone can reproduce this consistently and can show the network tab like I mentioned in https://github.com/advplyr/audiobookshelf/issues/4567#issuecomment-3171907488 that would help. I haven't been able to reproduce this yet
Author
Owner

@xcy7e commented on GitHub (Aug 12, 2025):

Now I was able to catch it:

Image

What catches my eye is that there's two autorize requests, whereas the first one (401) has a much smaller response size than the second one (200)

@xcy7e commented on GitHub (Aug 12, 2025): Now I was able to catch it: <img width="1022" height="1098" alt="Image" src="https://github.com/user-attachments/assets/089d23dd-7043-40a5-8609-3666f70edf03" /> What catches my eye is that there's two `autorize` requests, whereas the first one (401) has a much smaller response size than the second one (200)
Author
Owner

@alexander-paterson commented on GitHub (Aug 12, 2025):

It is hard for me to grab any network traffic as 95% of the time I get it I'm using Safari on my iPhone. As for some reason, I need to load the site up in Safari before the ABS iOS app will connect, but that is a different problem for a different thread.

@alexander-paterson commented on GitHub (Aug 12, 2025): It is hard for me to grab any network traffic as 95% of the time I get it I'm using Safari on my iPhone. As for some reason, I need to load the site up in Safari before the ABS iOS app will connect, but that is a different problem for a different thread.
Author
Owner

@advplyr commented on GitHub (Aug 12, 2025):

@xcy7e that's what we want to happen. If you look at my screenshot https://github.com/advplyr/audiobookshelf/issues/4567#issuecomment-3171907488 that is the correct flow.

When authorize is called and the access token is expired the server returns a 401. The client then calls refresh to get a new access token. Then calls authorize again.

Did the issue occur for you when you took the screenshot? I don't see any issues with the requests

@advplyr commented on GitHub (Aug 12, 2025): @xcy7e that's what we want to happen. If you look at my screenshot https://github.com/advplyr/audiobookshelf/issues/4567#issuecomment-3171907488 that is the correct flow. When authorize is called and the access token is expired the server returns a 401. The client then calls refresh to get a new access token. Then calls authorize again. Did the issue occur for you when you took the screenshot? I don't see any issues with the requests
Author
Owner

@xcy7e commented on GitHub (Aug 12, 2025):

Yes this was when the issue occured @advplyr 👍. (Its hard to see but it's the full request list, there's nothing else below or above)

Since you can't reproduce it,

Some more details:

  • multiple libraries (4x)
  • no openID-Auth
  • no RSS-Feeds
  • library- & metadata is mounted from a "storagebox"
  • mostly default configs (env in particular)
@xcy7e commented on GitHub (Aug 12, 2025): Yes this was when the issue occured @advplyr 👍. (Its hard to see but it's the full request list, there's nothing else below or above) Since you can't reproduce it, ### Some more details: - multiple libraries (4x) - no openID-Auth - no RSS-Feeds - library- & metadata is mounted from a "storagebox" - mostly default configs (env in particular)
Author
Owner

@xcy7e commented on GitHub (Aug 12, 2025):

There's one Log message, I was able to find. It's the first msg when the problem occured, maybe it's related:

[Auth] refreshing token. shouldReturnRefreshToken: false
@xcy7e commented on GitHub (Aug 12, 2025): There's one Log message, I was able to find. It's the first msg when the problem occured, maybe it's related: ``` [Auth] refreshing token. shouldReturnRefreshToken: false ```
Author
Owner

@LeeThompson commented on GitHub (Aug 13, 2025):

Difficult to reproduce bugs are the worst, glad this got figured out!

@LeeThompson commented on GitHub (Aug 13, 2025): Difficult to reproduce bugs are the worst, glad this got figured out!
Author
Owner

@github-actions[bot] commented on GitHub (Aug 26, 2025):

Fixed in v2.29.0.

@github-actions[bot] commented on GitHub (Aug 26, 2025): Fixed in [v2.29.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.29.0).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2935