Skip to content

[Bug]: Cover stays blank / "Invalid Cover" after the server cover is fixed or replaced #1962

Description

@mscurtescu

I have verified that the bug is not already awaiting release

Yes

What was the Problem?

The Android app caches a failed (or old) cover and does not show the new image after the server is corrected.

In my case the server had coverPath set but the file was missing, so /api/items/<id>/cover returned 404. The app showed a blank tile or “Invalid Cover”. After the file was restored (same coverPath, HTTP 200), the official app still showed no cover. Closing the app and opening it again did not help. Force stop + Clear cache did.

The web UI showed the correct covers the whole time (or after a refresh).

This is not the same as #820 (downloaded/offline cover file never updated). This happens on the streaming library grid.

Steps to Reproduce the Issue

  1. On the server, pick a book that has media.coverPath set.
  2. Make /api/items/<id>/cover fail (temporarily remove or rename the cover file). Confirm the endpoint returns 404.
  3. Open the official Android app, connected to that server, and open the library. The book shows no cover or “Invalid Cover”.
  4. Restore the cover file on the server (same coverPath). Confirm the same URL now returns 200. Optionally bump libraryItem.updatedAt so ?ts= changes (the web UI does this when you replace a cover).
  5. In the app, leave the library and come back, or swipe the app away and reopen it.
  6. The tile is still blank / “Invalid Cover”.
  7. Settings → Apps → Audiobookshelf → Force stop → Storage & cache → Clear cache, then open the app again. The cover appears.

What was Expected?

After the server cover is valid again (or replaced in the web UI), the next library load should request the new ?ts= URL and show the image. A previous 404 or old bitmap should not stick until the user clears app cache.

Phone Model

Pixel 9 Pro

Phone OS

Android 17

Audiobookshelf App Version

Android App - 0.13.0

Installation Source

Google Play Store

Additional Notes

Server: Audiobookshelf 2.36.0 (Docker)

Cover URLs are built in store/globals.js as:

/api/items/<id>/cover?ts=<libraryItem.updatedAt>

In components/covers/BookCover.vue, @error sets imageFailed = true (red “Invalid Cover”). The watcher that clears imageFailed only watches cover, which is media.coverPath. If the path stays the same and only the file or updatedAt changes, the error state is never reset. Swiping the app away also leaves the WebView alive, so the cached 404 / error tile remains.

Related: #820 (offline/downloaded covers). Different path; mention only as related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions