[Bug]: The search finds nothing #431

Closed
opened 2026-04-24 23:08:48 +02:00 by adam · 7 comments
Owner

Originally created by @stefanop1 on GitHub (Jun 5, 2022).

Describe the issue

If you search in web or Android, the search does respond 'no result' although I certainly have titles / series / authors. Even with only the first two or three letters.
I think that this is the error:

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at /server/objects/metadata/BookMetadata.js:341:45
at Array.filter ()
at BookMetadata.searchSeries (/server/objects/metadata/BookMetadata.js:341:24)
at Book.searchQuery (/server/objects/mediaTypes/Book.js:307:29)
at LibraryItem.searchQuery (/server/objects/LibraryItem.js:455:23)
at /server/controllers/LibraryController.js:372:28
at Array.forEach ()
at ApiRouter.search (/server/controllers/LibraryController.js:371:18)
at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
at next (/node_modules/express/lib/router/route.js:144:13)

Steps to reproduce the issue

  1. Make a search pressing the icon

Audiobookshelf version

2.0.20

How are you running audiobookshelf?

Docker

Originally created by @stefanop1 on GitHub (Jun 5, 2022). ### Describe the issue If you search in web or Android, the search does respond 'no result' although I certainly have titles / series / authors. Even with only the first two or three letters. I think that this is the error: TypeError: Cannot read properties of undefined (reading 'toLowerCase') at /server/objects/metadata/BookMetadata.js:341:45 at Array.filter (<anonymous>) at BookMetadata.searchSeries (/server/objects/metadata/BookMetadata.js:341:24) at Book.searchQuery (/server/objects/mediaTypes/Book.js:307:29) at LibraryItem.searchQuery (/server/objects/LibraryItem.js:455:23) at /server/controllers/LibraryController.js:372:28 at Array.forEach (<anonymous>) at ApiRouter.search (/server/controllers/LibraryController.js:371:18) at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5) at next (/node_modules/express/lib/router/route.js:144:13) ### Steps to reproduce the issue 1. Make a search pressing the icon ### Audiobookshelf version 2.0.20 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:08:48 +02:00
adam closed this issue 2026-04-24 23:08:50 +02:00
Author
Owner

@advplyr commented on GitHub (Jun 5, 2022):

Somehow one of your books has an invalid series saved on it. Maybe you can try to find that bad series?

@advplyr commented on GitHub (Jun 5, 2022): Somehow one of your books has an invalid series saved on it. Maybe you can try to find that bad series?
Author
Owner

@stefanop1 commented on GitHub (Jun 5, 2022):

Thank you for your help. I try to find the culprit. Perhaps in a future version it might be useful to use a trap

@stefanop1 commented on GitHub (Jun 5, 2022): Thank you for your help. I try to find the culprit. Perhaps in a future version it might be useful to use a trap
Author
Owner

@stefanop1 commented on GitHub (Jun 5, 2022):

Found!
Schermata 2022-06-05 alle 19 22 27

@stefanop1 commented on GitHub (Jun 5, 2022): Found! <img width="157" alt="Schermata 2022-06-05 alle 19 22 27" src="https://user-images.githubusercontent.com/8995697/172062558-f2714be3-93ba-425d-85e2-70199f287557.png">
Author
Owner

@advplyr commented on GitHub (Jun 5, 2022):

Any idea how that happened? It shouldn't be possible to happen.

@advplyr commented on GitHub (Jun 5, 2022): Any idea how that happened? It shouldn't be possible to happen.
Author
Owner

@stefanop1 commented on GitHub (Jun 5, 2022):

Could be happen, I think. Just add a bunch of new audiobooks. Maybe there are one that has embedded a wrong serie

@stefanop1 commented on GitHub (Jun 5, 2022): Could be happen, I think. Just add a bunch of new audiobooks. Maybe there are one that has embedded a wrong serie
Author
Owner

@stefanop1 commented on GitHub (Jun 5, 2022):

The audiobook has the title in the tags with underscores instead of spaces. Oddly enough, the scanner still found the match

@stefanop1 commented on GitHub (Jun 5, 2022): The audiobook has the title in the tags with underscores instead of spaces. Oddly enough, the scanner still found the match
Author
Owner

@advplyr commented on GitHub (Jun 5, 2022):

No idea how it could happen. If you find out any more info let me know!

@advplyr commented on GitHub (Jun 5, 2022): No idea how it could happen. If you find out any more info let me know!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#431