[Bug]: Library scanning on v2.0.2 causes the server to crash-out #297

Closed
opened 2026-04-24 23:03:59 +02:00 by adam · 3 comments
Owner

Originally created by @projx on GitHub (Apr 25, 2022).

Describe the issue

I've just deployed a completely clean install of v2.0, and pointed into to my Audiobook directory, when getting to scan, the server crashes out. I noticed a few odd issues where it was try to read data from old .abs files and also reader.txt etc.. I've since removed all of these, so all data should now be taken from the books ID3 meta tags, but its still generating the following error, :

[2022-04-24T22:17:48.641Z] DEBUG: [BookMetadata] Key updated description An ancient, alien technology that will change what it means to be human, a conspiracy begun before the first pyramid was built, and a world threatened by an unimaginable horror. Deep in the Indian Ocean, Dr. Selene Khan enters an underwater dome thousands of years old, one that is fully operational. She barely escapes to the surface, only to discover that her research vessel has vanished. Can she make it to shore 100 miles away? On the other side of the world, Agent Jack Elliot uncovers an impossible 900 grams of antimatter. The trail leads him to Egypt, betrayal, and a sinister brainwashing facility. There, in a desperate move, he rescues Dr. Selene Khan, fleeing with her into the desert. Together, Selene and Jack race to unravel a global conspiracy and learn the truth about an ancient, alien artifact and how civilization really began. Two people must summon the courage and extraordinary ability to stop the world's oldest plan from plunging humanity onto a twisted, evolutionary path. Artifact is a lightning-paced adventure, utterly unpredictable right up to its stunning conclusion. "
[2022-04-24T22:17:48.662Z] DEBUG: [BookMetadata] Key updated authors [
  { id: 'new-697169', name: 'Peter F. Hamilton' },
  { id: 'new-397937', name: 'John Lee' }
]
/server/njodb/index.js:103
        throw error;
        ^

TypeError: Cannot read properties of null (reading 'toLowerCase')
    at Author.checkNameEquals (/server/objects/entities/Author.js:84:22)
    at /server/scanner/Scanner.js:425:53
    at Array.find (<anonymous>)
    at /server/scanner/Scanner.js:425:39
    at Array.map (<anonymous>)
    at Scanner.createNewAuthorsAndSeries (/server/scanner/Scanner.js:424:79)
    at Scanner.rescanLibraryItemDataChunk (/server/scanner/Scanner.js:296:18)
    at async Scanner.scanLibrary (/server/scanner/Scanner.js:273:7)
    at async Scanner.scan (/server/scanner/Scanner.js:136:20)
    at async ApiRouter.scan (/server/controllers/LibraryController.js:546:5)

I noticed there was a similar issue raised in the following link, but it was closed, as from what I can tell, the assumption was it was the mobile client - Note I'm currently doing this all through the web interface:

https://github.com/advplyr/audiobookshelf/issues/470

Steps to reproduce the issue

  1. Point the scan at you audiobook library
  2. click Force Rescan
  3. Error ...

Note actually regenerating this might be require access to the relevant audiobook files!

Audiobookshelf version

v2.0.2

How are you running audiobookshelf?

Docker

Originally created by @projx on GitHub (Apr 25, 2022). ### Describe the issue I've just deployed a completely clean install of v2.0, and pointed into to my Audiobook directory, when getting to scan, the server crashes out. I noticed a few odd issues where it was try to read data from old .abs files and also reader.txt etc.. I've since removed all of these, so all data should now be taken from the books ID3 meta tags, but its still generating the following error, : ``` [2022-04-24T22:17:48.641Z] DEBUG: [BookMetadata] Key updated description An ancient, alien technology that will change what it means to be human, a conspiracy begun before the first pyramid was built, and a world threatened by an unimaginable horror. Deep in the Indian Ocean, Dr. Selene Khan enters an underwater dome thousands of years old, one that is fully operational. She barely escapes to the surface, only to discover that her research vessel has vanished. Can she make it to shore 100 miles away? On the other side of the world, Agent Jack Elliot uncovers an impossible 900 grams of antimatter. The trail leads him to Egypt, betrayal, and a sinister brainwashing facility. There, in a desperate move, he rescues Dr. Selene Khan, fleeing with her into the desert. Together, Selene and Jack race to unravel a global conspiracy and learn the truth about an ancient, alien artifact and how civilization really began. Two people must summon the courage and extraordinary ability to stop the world's oldest plan from plunging humanity onto a twisted, evolutionary path. Artifact is a lightning-paced adventure, utterly unpredictable right up to its stunning conclusion. " [2022-04-24T22:17:48.662Z] DEBUG: [BookMetadata] Key updated authors [ { id: 'new-697169', name: 'Peter F. Hamilton' }, { id: 'new-397937', name: 'John Lee' } ] /server/njodb/index.js:103 throw error; ^ TypeError: Cannot read properties of null (reading 'toLowerCase') at Author.checkNameEquals (/server/objects/entities/Author.js:84:22) at /server/scanner/Scanner.js:425:53 at Array.find (<anonymous>) at /server/scanner/Scanner.js:425:39 at Array.map (<anonymous>) at Scanner.createNewAuthorsAndSeries (/server/scanner/Scanner.js:424:79) at Scanner.rescanLibraryItemDataChunk (/server/scanner/Scanner.js:296:18) at async Scanner.scanLibrary (/server/scanner/Scanner.js:273:7) at async Scanner.scan (/server/scanner/Scanner.js:136:20) at async ApiRouter.scan (/server/controllers/LibraryController.js:546:5) ``` I noticed there was a similar issue raised in the following link, but it was closed, as from what I can tell, the assumption was it was the mobile client - Note I'm currently doing this all through the web interface: https://github.com/advplyr/audiobookshelf/issues/470 ### Steps to reproduce the issue 1. Point the scan at you audiobook library 2. click Force Rescan 3. Error ... Note actually regenerating this might be require access to the relevant audiobook files! ### Audiobookshelf version v2.0.2 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:03:59 +02:00
adam closed this issue 2026-04-24 23:04:00 +02:00
Author
Owner

@advplyr commented on GitHub (Apr 25, 2022):

I'm not exactly sure why you have authors with a null name, but I added an extra check in the latest release v2.0.3.
Let me know if that is still crashing or if you see an error in the log relating to author name is null.

@advplyr commented on GitHub (Apr 25, 2022): I'm not exactly sure why you have authors with a null name, but I added an extra check in the latest release v2.0.3. Let me know if that is still crashing or if you see an error in the log relating to author name is null.
Author
Owner

@cenjui commented on GitHub (Apr 25, 2022):

I was going to raise a bug for similar issues today (ironically again a Peter F Hamilton book - good taste @projx!) but the update to v2.0.3 seems to have fixed it for me - I've completed a full library scan for the first time since installation it and everything looks good. I am loving the series collecting feature - brilliant!

@cenjui commented on GitHub (Apr 25, 2022): I was going to raise a bug for similar issues today (ironically again a Peter F Hamilton book - good taste @projx!) but the update to v2.0.3 seems to have fixed it for me - I've completed a full library scan for the first time since installation it and everything looks good. I am *loving* the series collecting feature - brilliant!
Author
Owner

@advplyr commented on GitHub (Apr 25, 2022):

Great! Thanks for following up

@advplyr commented on GitHub (Apr 25, 2022): Great! Thanks for following up
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#297