[Bug]: I keep getting “invalid cover”, after restarting the ABS container #3022

Closed
opened 2026-04-25 00:13:02 +02:00 by adam · 5 comments
Owner

Originally created by @derkington on GitHub (Oct 1, 2025).

What happened?

On temp server I added some files to the library, used the match function to get metadata and cover from the audible match source. Then I quick embedded the files with the metadata and cover.
Transfer files to main server. That all seemed well in the the web view and android app. I restarted the container recently, it came back but all the recently added files had “invalid cover”. I do not store metadata or cover in folders, I embed them in the file.

  • If I delete the invalid cover via the web view and do a library scan no cover is detected.
  • If I search for a cover then apply it then all is well unil I restart the container.
  • If I delete the invalid cover via the web view then rescan the specific file, the cover is detected, but later restarting the container we are back to “invalid cover”.
  • I have purged all the caches and done a full library scan, still the covers do not come back
  • If I look at the file with mp3tag the cover is present, same with MusicBrainz
  • If I extract the cover from the file they are 2400x2400, around 500kb, they open fine with no issues at all with image viewing apps.

I did not see any glaring issues in the logs, any ideas would be appreciated. Not sure where to start with this problem.

What did you expect to happen?

Covers to not have "Invalid" status.

Steps to reproduce the issue

My workflow is as follows. On my temp ABS install

  1. Add some new files to the library, use the match function to get metadata and cover from the audible match source.
  2. Then quick embedded the files with the metadata and cover.
  3. Done

On my permant server

  1. Copy files into audiobook file location and scan, files appear, all look good
  2. sudo docker compose down audiobookshelf
  3. sudo docker compose up -d audiobookshelf

When the serve comes back it has invalid covers

Audiobookshelf version

v2.29.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

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

Firefox

Logs


Additional Notes

No response

Originally created by @derkington on GitHub (Oct 1, 2025). ### What happened? On temp server I added some files to the library, used the match function to get metadata and cover from the audible match source. Then I quick embedded the files with the metadata and cover. Transfer files to main server. That all seemed well in the the web view and android app. I restarted the container recently, it came back but all the recently added files had “invalid cover”. I do not store metadata or cover in folders, I embed them in the file. - If I delete the invalid cover via the web view and do a library scan no cover is detected. - If I search for a cover then apply it then all is well unil I restart the container. - If I delete the invalid cover via the web view then rescan the specific file, the cover is detected, but later restarting the container we are back to “invalid cover”. - I have purged all the caches and done a full library scan, still the covers do not come back - If I look at the file with mp3tag the cover is present, same with MusicBrainz - If I extract the cover from the file they are 2400x2400, around 500kb, they open fine with no issues at all with image viewing apps. I did not see any glaring issues in the logs, any ideas would be appreciated. Not sure where to start with this problem. ### What did you expect to happen? Covers to not have "Invalid" status. ### Steps to reproduce the issue My workflow is as follows. On my temp ABS install 1. Add some new files to the library, use the match function to get metadata and cover from the audible match source. 2. Then quick embedded the files with the metadata and cover. 3. Done On my permant server 1. Copy files into audiobook file location and scan, files appear, all look good 2. sudo docker compose down audiobookshelf 4. sudo docker compose up -d audiobookshelf When the serve comes back it has invalid covers ### Audiobookshelf version v2.29.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Firefox ### Logs ```shell ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:13:02 +02:00
adam closed this issue 2026-04-25 00:13:02 +02:00
Author
Owner

@Vito0912 commented on GitHub (Oct 1, 2025):

Did you mount the /metadata folder?

@Vito0912 commented on GitHub (Oct 1, 2025): Did you mount the /metadata folder?
Author
Owner

@derkington commented on GitHub (Oct 1, 2025):

I believe its mounted. Everything else works, and this issue has only surfaced today. This is how its mounted

services:
audiobookshelf:
image: ghcr.io/advplyr/audiobookshelf
container_name: audiobookshelf
ports:
- "13378:80"
volumes:
- /mnt/Data/Books/Audiobooks:/mnt/media/Books/Audiobooks:ro
- ./config/audiobookshelf:/config
- /usr/share/audiobookshelf/metadata:/usr/share/audiobookshelf/metadata
environment:
PUID: "1000"
PGID: "1000"
ABS_METADATA_PATH: /usr/share/audiobookshelf/metadata
restart: unless-stopped

@derkington commented on GitHub (Oct 1, 2025): I believe its mounted. Everything else works, and this issue has only surfaced today. This is how its mounted services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf container_name: audiobookshelf ports: - "13378:80" volumes: - /mnt/Data/Books/Audiobooks:/mnt/media/Books/Audiobooks:ro - ./config/audiobookshelf:/config **- /usr/share/audiobookshelf/metadata:/usr/share/audiobookshelf/metadata** environment: PUID: "1000" PGID: "1000" **ABS_METADATA_PATH: /usr/share/audiobookshelf/metadata** restart: unless-stopped
Author
Owner

@Vito0912 commented on GitHub (Oct 1, 2025):

There is your issue:

The ENV is METADATA_PATH. Every time you recreate your container, all metadata gets deleted. While you save the metadata to the file, it is also saved to the database and the cover is saved separately. So if the metadata directory is gone, you need to rescan to trigger creating it again.

Try either moving the metadata to the default directory (it gets deleted anyway, so there is nothing to move) (recommended) or fixing the ENV.

Also, PUID and PGID are not used. If you used AI, that is a very very bad idea for configs. If this is a tutorial, can you please send it so we can contact the authors?

@Vito0912 commented on GitHub (Oct 1, 2025): There is your issue: The ENV is `METADATA_PATH`. Every time you recreate your container, all metadata gets deleted. While you save the metadata to the file, it is also saved to the database and the cover is saved separately. So if the metadata directory is gone, you need to rescan to trigger creating it again. Try either moving the metadata to the default directory (it gets deleted anyway, so there is nothing to move) (recommended) or fixing the ENV. Also, PUID and PGID are not used. If you used AI, that is a very very bad idea for configs. If this is a tutorial, can you please send it so we can contact the authors?
Author
Owner

@derkington commented on GitHub (Oct 2, 2025):

This config has been in place since at least version v2.25.1 possibly earlier. The reason for using ENV is to enable me to keep the read history when I migrated to a new host.

The Docker file is a snippet of a much longer file, AI was used to consolidate and standardise the file structure. It looks like that the AB_ was introduced there, which I did not notice, however why issues became visible now I do not understand.

I updated the variable and removed the items suggested.

A scan of the library did not address the files flagged with “invalid covers”, going to each book and removing the “invalid cover” image, then doing a rescan on each individual file does detect the cover. I also tried removing the file from the library, running a scan, then deleted the newly removed books via the web interface (flagged as missing books/issues). Then added the files back, then triggered a library scan, where they were added back with the cover correctly identified.

I have since restarted the container a few times and the issue has not so far reoccurred. Strange as the container has been restarted many times previously due to upgrades and reboots of the underlying host.

@derkington commented on GitHub (Oct 2, 2025): This config has been in place since at least version v2.25.1 possibly earlier. The reason for using ENV is to enable me to keep the read history when I migrated to a new host. The Docker file is a snippet of a much longer file, AI was used to consolidate and standardise the file structure. It looks like that the AB_ was introduced there, which I did not notice, however why issues became visible now I do not understand. I updated the variable and removed the items suggested. A scan of the library did not address the files flagged with “invalid covers”, going to each book and removing the “invalid cover” image, then doing a rescan on each individual file does detect the cover. I also tried removing the file from the library, running a scan, then deleted the newly removed books via the web interface (flagged as missing books/issues). Then added the files back, then triggered a library scan, where they were added back with the cover correctly identified. I have since restarted the container a few times and the issue has not so far reoccurred. Strange as the container has been restarted many times previously due to upgrades and reboots of the underlying host.
Author
Owner

@Vito0912 commented on GitHub (Oct 2, 2025):

Can you close this issue, if this is resolved?
If this comes up again, you can ofc open it again.

The chance that it was because of the configuration is high

@Vito0912 commented on GitHub (Oct 2, 2025): Can you close this issue, if this is resolved? If this comes up again, you can ofc open it again. The chance that it was because of the configuration is high
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3022