[Bug]: Cannot read properties of undefined (reading 'getAllLibraryFolderPaths') #1356

Closed
opened 2026-04-24 23:41:01 +02:00 by adam · 4 comments
Owner

Originally created by @brandonweidner on GitHub (Sep 9, 2023).

Describe the issue

On a fresh docker container browser folders fails when adding a library.

[2023-09-09 03:42:27] INFO: [SocketAuthority] Socket Connected qX2ElDNBia25L3YEAAAB [2023-09-09 03:42:27] INFO: [SocketAuthority] Socket Connected _yeEYuiylcViWuqjAAAD [2023-09-09 03:42:58] INFO: [SocketAuthority] Socket qX2ElDNBia25L3YEAAAB disconnected from client "bweidner" after 30543ms (Reason: transport close) /server/controllers/FileSystemController.js:20 const libraryFoldersPaths = await Database.libraryModelFolder.getAllLibraryFolderPaths() ^ TypeError: Cannot read properties of undefined (reading 'getAllLibraryFolderPaths') at ApiRouter.getPaths (/server/controllers/FileSystemController.js:20:67) 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) at Route.dispatch (/node_modules/express/lib/router/route.js:114:3) at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5) at /node_modules/express/lib/router/index.js:284:15 at Function.process_params (/node_modules/express/lib/router/index.js:346:12) at next (/node_modules/express/lib/router/index.js:280:10) at expressInit (/node_modules/express/lib/middleware/init.js:40:5) at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5) Config /config /metadata

2023-09-08_21-42-50

Steps to reproduce the issue

  1. Fresh docker container
  2. Add a library

Audiobookshelf version

v2.4.0

How are you running audiobookshelf?

Docker

Originally created by @brandonweidner on GitHub (Sep 9, 2023). ### Describe the issue On a fresh docker container browser folders fails when adding a library. `[2023-09-09 03:42:27] INFO: [SocketAuthority] Socket Connected qX2ElDNBia25L3YEAAAB [2023-09-09 03:42:27] INFO: [SocketAuthority] Socket Connected _yeEYuiylcViWuqjAAAD [2023-09-09 03:42:58] INFO: [SocketAuthority] Socket qX2ElDNBia25L3YEAAAB disconnected from client "bweidner" after 30543ms (Reason: transport close) /server/controllers/FileSystemController.js:20 const libraryFoldersPaths = await Database.libraryModelFolder.getAllLibraryFolderPaths() ^ TypeError: Cannot read properties of undefined (reading 'getAllLibraryFolderPaths') at ApiRouter.getPaths (/server/controllers/FileSystemController.js:20:67) 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) at Route.dispatch (/node_modules/express/lib/router/route.js:114:3) at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5) at /node_modules/express/lib/router/index.js:284:15 at Function.process_params (/node_modules/express/lib/router/index.js:346:12) at next (/node_modules/express/lib/router/index.js:280:10) at expressInit (/node_modules/express/lib/middleware/init.js:40:5) at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5) Config /config /metadata` ![2023-09-08_21-42-50](https://github.com/advplyr/audiobookshelf/assets/119901172/0f789cb2-b3c5-43b2-812f-06da8b5105e9) ### Steps to reproduce the issue 1. Fresh docker container 2. Add a library ### Audiobookshelf version v2.4.0 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:41:01 +02:00
adam closed this issue 2026-04-24 23:41:01 +02:00
Author
Owner

@GOvEy1nw commented on GitHub (Sep 9, 2023):

First time installer here!

Yes I'm getting this too, I tried installing v2.4.0 on Synology DSM 6.2.4, and I got the above error. So I did rolled back to 2.3.4 and that still didn't work. However, 2.3.3 works fine.

Just to experiment, since it was a first time install, I tried then updating from 2.3.3 to 2.3.4 to see if it might have just been a fluke, but 2.3.4 still gives the same error.

So currently, 2.3.3 is the latest version that doesn't give this error. I wonder @brandonweidner are you trying to run on DSM 6 too?

@GOvEy1nw commented on GitHub (Sep 9, 2023): First time installer here! Yes I'm getting this too, I tried installing v2.4.0 on Synology DSM 6.2.4, and I got the above error. So I did rolled back to 2.3.4 and that still didn't work. However, 2.3.3 works fine. Just to experiment, since it was a first time install, I tried then updating from 2.3.3 to 2.3.4 to see if it might have just been a fluke, but 2.3.4 still gives the same error. So currently, 2.3.3 is the latest version that doesn't give this error. I wonder @brandonweidner are you trying to run on DSM 6 too?
Author
Owner

@advplyr commented on GitHub (Sep 9, 2023):

Thanks, I just reproduced this. I'll probably get a patch out later today

@advplyr commented on GitHub (Sep 9, 2023): Thanks, I just reproduced this. I'll probably get a patch out later today
Author
Owner

@TaoRone commented on GitHub (Sep 9, 2023):

是的,我也遇到了这个问题
Yes, I also encountered this problem

@TaoRone commented on GitHub (Sep 9, 2023): 是的,我也遇到了这个问题 Yes, I also encountered this problem
Author
Owner

@advplyr commented on GitHub (Sep 10, 2023):

Fixed in v2.4.1

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

No dependencies set.

Reference: starred/audiobookshelf#1356