[Bug]: Unable to create library correctly #766

Closed
opened 2026-04-24 23:20:38 +02:00 by adam · 18 comments
Owner

Originally created by @eeezae on GitHub (Nov 19, 2022).

Describe the issue

the path to the library folder listing content is unmatched, seems it cached outdated folder tree data

Steps to reproduce the issue

  1. . after I refreshed the web page, cleaned cached data, and re-login in Chrome, it still shows the wrong folder data, only when I switched to a new browser with Safari login and it finally works well, how can I fix this?

Audiobookshelf version

v2.2.4

How are you running audiobookshelf?

Docker

Originally created by @eeezae on GitHub (Nov 19, 2022). ### Describe the issue the path to the library folder listing content is unmatched, seems it cached outdated folder tree data ### Steps to reproduce the issue 1. . after I refreshed the web page, cleaned cached data, and re-login in Chrome, it still shows the wrong folder data, only when I switched to a new browser with Safari login and it finally works well, how can I fix this? ### Audiobookshelf version v2.2.4 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:20:38 +02:00
adam closed this issue 2026-04-24 23:20:39 +02:00
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

I don't know what you mean. Can you provide screenshots?
There is no caching happening with the folder picker.

@advplyr commented on GitHub (Nov 19, 2022): I don't know what you mean. Can you provide screenshots? There is no caching happening with the folder picker.
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

Folder struct in system:
image

Safari is ok:
image

Chrome shows wrong:
image

@eeezae commented on GitHub (Nov 19, 2022): Folder struct in system: <img width="280" alt="image" src="https://user-images.githubusercontent.com/34007837/202853299-5fbf8072-e230-4284-8d9f-53e1d8417448.png"> Safari is ok: <img width="743" alt="image" src="https://user-images.githubusercontent.com/34007837/202853314-12919623-ab70-40a7-a117-3d4f264c601f.png"> Chrome shows wrong: <img width="742" alt="image" src="https://user-images.githubusercontent.com/34007837/202853347-3e4b15fd-3dcc-4eed-89c5-472c7e25a84e.png">
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

and I cannot delete listening sessions, tips Not found
image

@eeezae commented on GitHub (Nov 19, 2022): and I cannot delete listening sessions, tips Not found <img width="1452" alt="image" src="https://user-images.githubusercontent.com/34007837/202853947-a4e07e56-6653-4cd0-a335-f371d35fb0e8.png">
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

I decide to delete the docker container and try again.

@eeezae commented on GitHub (Nov 19, 2022): I decide to delete the docker container and try again.
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

Too weird, I cleaned all cached data and launched a new docker container, but this issue occurred again. Really wonder why the folder path will be cached in browser...

@eeezae commented on GitHub (Nov 19, 2022): Too weird, I cleaned all cached data and launched a new docker container, but this issue occurred again. Really wonder why the folder path will be cached in browser...
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

Here is the log data

{"timestamp":"2022-11-19 13:57:36","message":"=== Starting Server ===","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[Server] Init v2.2.4","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Library Items Loaded","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Users Loaded","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Libraries Loaded","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Collections Loaded","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Authors Loaded","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Series Loaded","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[BackupManager] 0 Backups Found","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[BackupManager] Auto Backups are disabled","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"[LogManager] Init current daily log filename: 2022-11-19.txt","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:36","message":"Listening on http://0.0.0.0:80","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:41","message":"[Server] Socket Connected wTtEuh8-txHFP4-YAAAB","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 13:57:41","message":"JWT Verify Token Failed JsonWebTokenError: invalid signature","levelName":"ERROR","level":4}
{"timestamp":"2022-11-19 13:57:41","message":"Cannot validate socket - invalid token","levelName":"ERROR","level":4}
{"timestamp":"2022-11-19 13:59:09","message":"[Server] Initializing new server","levelName":"INFO","level":2}
{"timestamp":"2022-11-19 14:00:54","message":"JWT Verify Token Failed JsonWebTokenError: invalid signature","levelName":"ERROR","level":4}
{"timestamp":"2022-11-19 14:00:54","message":"Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJlZWV6YWUiLCJpYXQiOjE2Njg4NDU0NzN9.Enu0_EkwNdlElSjGhHJyG8DNjdlcJYdoBmApGzSg1TQ","levelName":"ERROR","level":4}
@eeezae commented on GitHub (Nov 19, 2022): Here is the log data ```log {"timestamp":"2022-11-19 13:57:36","message":"=== Starting Server ===","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[Server] Init v2.2.4","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Library Items Loaded","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Users Loaded","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Libraries Loaded","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Collections Loaded","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Authors Loaded","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[DB] 0 Series Loaded","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[BackupManager] 0 Backups Found","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[BackupManager] Auto Backups are disabled","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"[LogManager] Init current daily log filename: 2022-11-19.txt","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:36","message":"Listening on http://0.0.0.0:80","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:41","message":"[Server] Socket Connected wTtEuh8-txHFP4-YAAAB","levelName":"INFO","level":2} {"timestamp":"2022-11-19 13:57:41","message":"JWT Verify Token Failed JsonWebTokenError: invalid signature","levelName":"ERROR","level":4} {"timestamp":"2022-11-19 13:57:41","message":"Cannot validate socket - invalid token","levelName":"ERROR","level":4} {"timestamp":"2022-11-19 13:59:09","message":"[Server] Initializing new server","levelName":"INFO","level":2} {"timestamp":"2022-11-19 14:00:54","message":"JWT Verify Token Failed JsonWebTokenError: invalid signature","levelName":"ERROR","level":4} {"timestamp":"2022-11-19 14:00:54","message":"Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJlZWV6YWUiLCJpYXQiOjE2Njg4NDU0NzN9.Enu0_EkwNdlElSjGhHJyG8DNjdlcJYdoBmApGzSg1TQ","levelName":"ERROR","level":4} ```
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

after I make a new directory, docker container ps shows it was created, but it was not been updated in the web page.
image

image
@eeezae commented on GitHub (Nov 19, 2022): after I make a new directory, docker container ps shows it was created, but it was not been updated in the web page. <img width="1211" alt="image" src="https://user-images.githubusercontent.com/34007837/202855584-a51e3bb7-4346-4af8-86cb-4448181bc1af.png"> <img width="794" alt="image" src="https://user-images.githubusercontent.com/34007837/202855598-8ce82c83-984f-40ff-a825-eb8abfdc959a.png">
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

I think there must be something cached in the browser, I changed to a new browser is OK for now. But after initing a new folder, it failed again, and the front host URL is localhost with port, no Nginx proxy. Besides, I reproduced this issue on another computer in LAN.

@eeezae commented on GitHub (Nov 19, 2022): I think there must be something cached in the browser, I changed to a new browser is OK for now. But after initing a new folder, it failed again, and the front host URL is localhost with port, no Nginx proxy. Besides, I reproduced this issue on another computer in LAN.
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

There is something wrong with your /config mapping. When you are starting the server I can see from the logs that there are zero libraries being loaded.
What is your docker command?

@advplyr commented on GitHub (Nov 19, 2022): There is something wrong with your /config mapping. When you are starting the server I can see from the logs that there are zero libraries being loaded. What is your docker command?
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

Chrome -> Settings -> History -> Clean all browsing data works for me, but I don't wanna do this every time when I create a new library.

@eeezae commented on GitHub (Nov 19, 2022): `Chrome -> Settings -> History -> Clean all browsing data` works for me, but I don't wanna do this every time when I create a new library.
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

There is something wrong with your /config mapping. When you are starting the server I can see from the logs that there are zero libraries being loaded. What is your docker command?

image just the volume mapping modified, and port mapping from 80 to xxxxx
@eeezae commented on GitHub (Nov 19, 2022): > There is something wrong with your /config mapping. When you are starting the server I can see from the logs that there are zero libraries being loaded. What is your docker command? <img width="522" alt="image" src="https://user-images.githubusercontent.com/34007837/202856624-837e5169-be2f-4fa2-b3ee-ac2f90950cb4.png"> just the volume mapping modified, and port mapping from 80 to xxxxx
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

Does this path exist docker/audiobook/config?
When you restart the docker container does it say 0 libraries found everytime?

@advplyr commented on GitHub (Nov 19, 2022): Does this path exist `docker/audiobook/config`? When you restart the docker container does it say 0 libraries found everytime?
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

It doesn't make sense that clearing browsing data would do anything. There is no browsing data stored for the folder picker so something else is going on with your setup.

@advplyr commented on GitHub (Nov 19, 2022): It doesn't make sense that clearing browsing data would do anything. There is no browsing data stored for the folder picker so something else is going on with your setup.
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

Does this path exist docker/audiobook/config? When you restart the docker container does it say 0 libraries found everytime?

config:

image

Yes, when restarting the docker container there is no library at first.

@eeezae commented on GitHub (Nov 19, 2022): > Does this path exist `docker/audiobook/config`? When you restart the docker container does it say 0 libraries found everytime? config: <img width="814" alt="image" src="https://user-images.githubusercontent.com/34007837/202856821-e0171180-edbd-4a48-b582-adb18eb8c03d.png"> Yes, when restarting the docker container there is no library at first.
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

That is the problem then. There is something wrong with how you are mapping that /config file to where Abs is creating all new database files every time.
I don't know what you need to update but this is the problem.

@advplyr commented on GitHub (Nov 19, 2022): That is the problem then. There is something wrong with how you are mapping that /config file to where Abs is creating all new database files every time. I don't know what you need to update but this is the problem.
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

It doesn't make sense that clearing browsing data would do anything. There is no browsing data stored for the folder picker so something else is going on with your setup.

If there is a possibility that something is wrong with JWT or the session or cached something about user else? and when I cleaned all browser data the wrong session was reset? Because I see this kind of error logs offen occurs.

image
@eeezae commented on GitHub (Nov 19, 2022): > It doesn't make sense that clearing browsing data would do anything. There is no browsing data stored for the folder picker so something else is going on with your setup. If there is a possibility that something is wrong with JWT or the session or cached something about user else? and when I cleaned all browser data the wrong session was reset? Because I see this kind of error logs offen occurs. <img width="1186" alt="image" src="https://user-images.githubusercontent.com/34007837/202857024-c8e61c8c-0870-4dfc-846e-e1df6ef4e188.png">
Author
Owner

@eeezae commented on GitHub (Nov 19, 2022):

That is the problem then. There is something wrong with how you are mapping that /config file to where Abs is creating all new database files every time. I don't know what you need to update but this is the problem.

But I have tried to rm the container, all the config file content, metadata file content, and start a completely new container, still same issue

@eeezae commented on GitHub (Nov 19, 2022): > That is the problem then. There is something wrong with how you are mapping that /config file to where Abs is creating all new database files every time. I don't know what you need to update but this is the problem. But I have tried to rm the container, all the config file content, metadata file content, and start a completely new container, still same issue
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

You are seeing the JWT error because the database is getting deleted and re-created everytime. So the JWT is no longer valid.

The /config and /metadata folder you are mapping to the container is not correct. I don't know why, maybe it is permissions, maybe you're mapping symlinks, or maybe the paths are wrong, but this is not a problem with Abs.

If you need troubleshooting help with docker you can join the Discord server it is very active.

@advplyr commented on GitHub (Nov 19, 2022): You are seeing the JWT error because the database is getting deleted and re-created everytime. So the JWT is no longer valid. The `/config` and `/metadata` folder you are mapping to the container is not correct. I don't know why, maybe it is permissions, maybe you're mapping symlinks, or maybe the paths are wrong, but this is not a problem with Abs. If you need troubleshooting help with docker you can join the Discord server it is very active.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#766