[Bug]: ABS recognises every 10 letter title as a valid ASIN while matching #2198

Closed
opened 2026-04-25 00:04:52 +02:00 by adam · 1 comment
Owner

Originally created by @WeisseTeetasse on GitHub (Aug 20, 2024).

What happened?

Given a 10 letter book title, ABS searches for ASIN instead of the book title when matching.

What did you expect to happen?

ABS should search for title instead of ASIN

Steps to reproduce the issue

  1. match a book with a 10 letter title, like Yellowface by R.F. Kuang
  2. nothing is found

Audiobookshelf version

v2.12.3

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?

None

Logs

{"timestamp":"2024-08-20 14:10:19.297","source":"Audible.js:110","message":"[Audible] ASIN search error AxiosError: Request failed with status code 400","levelName":"ERROR","level":4}

Additional Notes

Error is in https://github.com/advplyr/audiobookshelf/blob/master/server/utils/index.js
Replacing the regexp with return /^A-Z(?=.*\d)[A-Z0-9]{9}$/.test(str) works for me.
There are still some exceptions like https://www.audible.com/pd/The-Fellowship-of-the-Ring-Audiobook/0008487278

Originally created by @WeisseTeetasse on GitHub (Aug 20, 2024). ### What happened? Given a 10 letter book title, ABS searches for ASIN instead of the book title when matching. ### What did you expect to happen? ABS should search for title instead of ASIN ### Steps to reproduce the issue 1. match a book with a 10 letter title, like Yellowface by R.F. Kuang 2. nothing is found ### Audiobookshelf version v2.12.3 ### 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? None ### Logs ```shell {"timestamp":"2024-08-20 14:10:19.297","source":"Audible.js:110","message":"[Audible] ASIN search error AxiosError: Request failed with status code 400","levelName":"ERROR","level":4} ``` ### Additional Notes Error is in https://github.com/advplyr/audiobookshelf/blob/master/server/utils/index.js Replacing the regexp with return /^[A-Z](?=.*[A-Z])(?=.*\d)[A-Z0-9]{9}$/.test(str) works for me. There are still some exceptions like https://www.audible.com/pd/The-Fellowship-of-the-Ring-Audiobook/0008487278
adam added the bug label 2026-04-25 00:04:52 +02:00
adam closed this issue 2026-04-25 00:04:53 +02:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 31, 2024):

Fixed in v2.13.0.

@github-actions[bot] commented on GitHub (Aug 31, 2024): Fixed in [v2.13.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.13.0).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2198