[Bug]: unable to start the application "Cannot set properties of null" #958

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

Originally created by @eskiiom on GitHub (Feb 16, 2023).

Describe the issue

Hello,

I have rebooted my docker host a few minutes ago, and now when I start ABS I have this error message and the application is not working.
I have recreated it by pulling the latest image but I still have the same error message.

I tried to have a look on issues opened and closed, but it looks like most of the tickets with similar error message have been fixed in v2.2.15, which I am running (and I didn't have the issue before the reboot)
Can it be a corrupted file ?

Thanks a lot

`> audiobookshelf@2.2.15 start

node index.js
Config /config /metadata
[2023-02-16 22:22:11] INFO: === Starting Server ===
[2023-02-16 22:22:11] INFO: [Server] Init v2.2.15
[2023-02-16 22:22:11] INFO: [DB] 0 Collections Loaded
[2023-02-16 22:22:11] INFO: [DB] 0 Playlists Loaded
[2023-02-16 22:22:11] INFO: [DB] 0 Series Loaded
[2023-02-16 22:22:11] INFO: [DB] 2 Users Loaded
[2023-02-16 22:22:11] INFO: [DB] 2 Libraries Loaded
[2023-02-16 22:22:11] INFO: [DB] 6 Authors Loaded
/server/libs/njodb/index.js:103
throw error;

^
TypeError: Cannot set properties of null (setting 'libraryItemId')
at LibraryItem.construct (/server/objects/LibraryItem.js:79:30)
at new LibraryItem (/server/objects/LibraryItem.js:43:12)
at /server/Db.js:151:49
at Array.map ()
at /server/Db.js:151:40
at async Promise.all (index 0)
at async Db.load (/server/Db.js:210:5)
at async Db.init (/server/Db.js:133:5)
at async Server.init (/server/Server.js:110:7)
at async Server.start (/server/Server.js:141:5)`

Steps to reproduce the issue

  1. hard to tell

Audiobookshelf version

2.2.25

How are you running audiobookshelf?

Docker

Originally created by @eskiiom on GitHub (Feb 16, 2023). ### Describe the issue Hello, I have rebooted my docker host a few minutes ago, and now when I start ABS I have this error message and the application is not working. I have recreated it by pulling the latest image but I still have the same error message. I tried to have a look on issues opened and closed, but it looks like most of the tickets with similar error message have been fixed in v2.2.15, which I am running (and I didn't have the issue before the reboot) Can it be a corrupted file ? Thanks a lot `> audiobookshelf@2.2.15 start > node index.js Config /config /metadata [2023-02-16 22:22:11] INFO: === Starting Server === [2023-02-16 22:22:11] INFO: [Server] Init v2.2.15 [2023-02-16 22:22:11] INFO: [DB] 0 Collections Loaded [2023-02-16 22:22:11] INFO: [DB] 0 Playlists Loaded [2023-02-16 22:22:11] INFO: [DB] 0 Series Loaded [2023-02-16 22:22:11] INFO: [DB] 2 Users Loaded [2023-02-16 22:22:11] INFO: [DB] 2 Libraries Loaded [2023-02-16 22:22:11] INFO: [DB] 6 Authors Loaded /server/libs/njodb/index.js:103 throw error;  ^ TypeError: Cannot set properties of null (setting 'libraryItemId') at LibraryItem.construct (/server/objects/LibraryItem.js:79:30) at new LibraryItem (/server/objects/LibraryItem.js:43:12) at /server/Db.js:151:49 at Array.map (<anonymous>) at /server/Db.js:151:40 at async Promise.all (index 0) at async Db.load (/server/Db.js:210:5) at async Db.init (/server/Db.js:133:5) at async Server.init (/server/Server.js:110:7) at async Server.start (/server/Server.js:141:5)` ### Steps to reproduce the issue 1. hard to tell ### Audiobookshelf version 2.2.25 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:27:40 +02:00
adam closed this issue 2026-04-24 23:27:40 +02:00
Author
Owner

@advplyr commented on GitHub (Feb 17, 2023):

I'm not sure how it happened, but something got corrupted with one or more of your library items in the database.

You can either delete the database entirely and start over or try to find the bad library item. Those data files are very specific and shouldn't be edited normally. Each line should be a valid JSON object.

@advplyr commented on GitHub (Feb 17, 2023): I'm not sure how it happened, but something got corrupted with one or more of your library items in the database. You can either delete the database entirely and start over or try to find the bad library item. Those data files are very specific and shouldn't be edited normally. Each line should be a valid JSON object.
Author
Owner

@eskiiom commented on GitHub (Feb 17, 2023):

Hello,

so it looks like one of the files were indeed corrupted.
I have removed the files in folder LibraryItems and the application could start again.
The only downside is that I would have to populate again all the RSS feeds for each podcast in the library. The scan and quick match worked well for all metadata, except the feed which is unfortunate.
Also the issue now is that is I do a search and click add the already existing item in the library, it says "invalid podcast - no feed"
Can there be an other file corrupted ? How can I troubleshoot or fix this ? there is no error on the container logs

Thanks

@eskiiom commented on GitHub (Feb 17, 2023): Hello, so it looks like one of the files were indeed corrupted. I have removed the files in folder LibraryItems and the application could start again. The only downside is that I would have to populate again all the RSS feeds for each podcast in the library. The scan and quick match worked well for all metadata, except the feed which is unfortunate. Also the issue now is that is I do a search and click add the already existing item in the library, it says "invalid podcast - no feed" Can there be an other file corrupted ? How can I troubleshoot or fix this ? there is no error on the container logs Thanks
Author
Owner

@advplyr commented on GitHub (Feb 17, 2023):

I'm not really sure what you mean. If you have scanned in your podcasts then you must make sure each one has an RSS feed.

image

@advplyr commented on GitHub (Feb 17, 2023): I'm not really sure what you mean. If you have scanned in your podcasts then you must make sure each one has an RSS feed. ![image](https://user-images.githubusercontent.com/67830747/219712591-f5a65d54-c96e-40c0-858c-a347bedeff7b.png)
Author
Owner

@eskiiom commented on GitHub (Feb 17, 2023):

sorry if it's unclear.
I did have all these fields correctly setup when I added all the podcasts.
After wiping library database, everything was empty, so I did a scan, it found everything, but no cover and no description.
After than I went on each one by one to use the "match" action
It worked well, for example
image
But still the rss feed url is not populated
image

@eskiiom commented on GitHub (Feb 17, 2023): sorry if it's unclear. I did have all these fields correctly setup when I added all the podcasts. After wiping library database, everything was empty, so I did a scan, it found everything, but no cover and no description. After than I went on each one by one to use the "match" action It worked well, for example ![image](https://user-images.githubusercontent.com/26815164/219723600-d15d3502-aa0f-4e39-ae33-e781bd02629e.png) But still the rss feed url is not populated ![image](https://user-images.githubusercontent.com/26815164/219723764-54cd26f3-1fc7-47b6-8325-832d3d8d085e.png)
Author
Owner

@advplyr commented on GitHub (Feb 17, 2023):

I just checked that podcast and iTunes is not returning the RSS feed url. I didn't know that was something that could happen so we will have to filter out these podcasts that don't return a feed url or add some sort of alert.

I looked it up and it is the podcast author who chose not to expose their RSS feed url.

Apple Podcasts Connect now offers podcasters the ability to hide their RSS feed from the catalog API. If you don't see the feedUrl field then the podcaster has unchecked the option in the Availability tab in Apple Podcasts Connect.

Ref: https://stackoverflow.com/questions/65843154/itunes-search-podcast-json-api-repository-sometimes-does-not-return-feedurl

Unfortunately there is nothing we can do about that. I have never seen this before so I doubt there are many podcasters who are doing that.

@advplyr commented on GitHub (Feb 17, 2023): I just checked that podcast and iTunes is not returning the RSS feed url. I didn't know that was something that could happen so we will have to filter out these podcasts that don't return a feed url or add some sort of alert. I looked it up and it is the podcast author who chose not to expose their RSS feed url. > Apple Podcasts Connect now offers podcasters the ability to hide their RSS feed from the catalog API. If you don't see the feedUrl field then the podcaster has unchecked the option in the Availability tab in Apple Podcasts Connect. Ref: https://stackoverflow.com/questions/65843154/itunes-search-podcast-json-api-repository-sometimes-does-not-return-feedurl Unfortunately there is nothing we can do about that. I have never seen this before so I doubt there are many podcasters who are doing that.
Author
Owner

@eskiiom commented on GitHub (Feb 17, 2023):

ahhhh I see.
That also would explain why I sometimes have the issue when trying to add podcasts. Maybe the error message could mention this is not due to audiobookshelf, but from the the host/author who is not sharing the rss feed through the podcast.

I suppose this is the bottom of it, I found some other items in the library that were properly populated
image

I finally manage to restore most of the config with no big hassle because I had a valid automatic backup from the day before it crashed !

Thank you very much for your assistance and quick response.
I let you close this ticket off

@eskiiom commented on GitHub (Feb 17, 2023): ahhhh I see. That also would explain why I sometimes have the issue when trying to add podcasts. Maybe the error message could mention this is not due to audiobookshelf, but from the the host/author who is not sharing the rss feed through the podcast. I suppose this is the bottom of it, I found some other items in the library that were properly populated ![image](https://user-images.githubusercontent.com/26815164/219732247-574f749b-1221-4dfa-94a3-263d58c1c3e3.png) I finally manage to restore most of the config with no big hassle because I had a valid automatic backup from the day before it crashed ! Thank you very much for your assistance and quick response. I let you close this ticket off
Author
Owner

@advplyr commented on GitHub (Feb 17, 2023):

Great! Glad it is up and running again for you.

@advplyr commented on GitHub (Feb 17, 2023): Great! Glad it is up and running again for you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#958