[Bug]: Crash when searching for a cover without an author #1436

Closed
opened 2026-04-24 23:45:23 +02:00 by adam · 1 comment
Owner

Originally created by @imcdona on GitHub (Oct 2, 2023).

Describe the issue

Audiobookshelf crashes when trying to locate book cover without an author.

Here is the debug output:

[2023-10-02 15:51:56] DEBUG: [Audible] Search url: https://api.audible.com/1.0/catalog/products?num_results=10&products_sort_by=Relevance&title=Bimbos+of+the+Death+Sun (Audible.js:105) /server/finders/BookFinder.js:237 author = author.trim().toLowerCase() ^ TypeError: Cannot read properties of null (reading 'trim') at BookFinder.search (/server/finders/BookFinder.js:237:23) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async BookFinder.findCovers (/server/finders/BookFinder.js:339:23) at async ApiRouter.findCovers (/server/controllers/SearchController.js:29:20)

Steps to reproduce the issue

  1. Click on a book without a cover image from the library page.
  2. Click the pencil icon located on default book cover to change the cover image,
  3. Select Audible.com as the provider
  4. Remove the author from the search box and select Search
  5. Note that the websocket is disconnected upon hitting the Search button

Audiobookshelf version

v2.4.4

How are you running audiobookshelf?

Docker

Originally created by @imcdona on GitHub (Oct 2, 2023). ### Describe the issue Audiobookshelf crashes when trying to locate book cover without an author. **Here is the debug output:** `[2023-10-02 15:51:56] DEBUG: [Audible] Search url: https://api.audible.com/1.0/catalog/products?num_results=10&products_sort_by=Relevance&title=Bimbos+of+the+Death+Sun (Audible.js:105) /server/finders/BookFinder.js:237 author = author.trim().toLowerCase() ^ TypeError: Cannot read properties of null (reading 'trim') at BookFinder.search (/server/finders/BookFinder.js:237:23) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async BookFinder.findCovers (/server/finders/BookFinder.js:339:23) at async ApiRouter.findCovers (/server/controllers/SearchController.js:29:20)` ### Steps to reproduce the issue 1. Click on a book without a cover image from the _library_ page. 2. Click the pencil icon located on default book cover to change the cover image, 3. Select _Audible.com_ as the provider 4. Remove the author from the search box and select _Search_ 5. Note that the websocket is disconnected upon hitting the _Search_ button ### Audiobookshelf version v2.4.4 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:45:23 +02:00
adam closed this issue 2026-04-24 23:45:24 +02:00
Author
Owner

@advplyr commented on GitHub (Oct 29, 2023):

Fixed in v2.5.0

@advplyr commented on GitHub (Oct 29, 2023): Fixed in [v2.5.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.5.0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1436