Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: API Get All Collections will cause server crash #3372

Closed
shanyan-wcx opened this issue Sep 3, 2024 · 1 comment
Closed

[Bug]: API Get All Collections will cause server crash #3372

shanyan-wcx opened this issue Sep 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@shanyan-wcx
Copy link

What happened?

API Get All Collections will cause server crash.

What did you expect to happen?

The server does not crash.

Steps to reproduce the issue

  1. Call "Get All Collections" api
  2. Server crash

Audiobookshelf version

v2.13.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-09-03 15:33:11.759","source":"Server.js:185","message":"[Server] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'includes'), promise: Promise {\n  <rejected> TypeError: Cannot read properties of undefined (reading 'includes')\n      at collection.getOldCollectionsJsonExpanded (/server/models/Collection.js:41:17)\n      at ApiRouter.findAll (/server/controllers/CollectionController.js:68:64)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at next (/node_modules/express/lib/router/route.js:144:13)\n      at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at /node_modules/express/lib/router/index.js:284:15\n      at Function.process_params (/node_modules/express/lib/router/index.js:346:12)\n      at next (/node_modules/express/lib/router/index.js:280:10)\n      at expressInit (/node_modules/express/lib/middleware/init.js:40:5)\n}","levelName":"FATAL","level":5}
{"timestamp":"2024-09-03 15:34:29.641","source":"Server.js:185","message":"[Server] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'includes'), promise: Promise {\n  <rejected> TypeError: Cannot read properties of undefined (reading 'includes')\n      at collection.getOldCollectionsJsonExpanded (/server/models/Collection.js:41:17)\n      at ApiRouter.findAll (/server/controllers/CollectionController.js:68:64)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at next (/node_modules/express/lib/router/route.js:144:13)\n      at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at /node_modules/express/lib/router/index.js:284:15\n      at Function.process_params (/node_modules/express/lib/router/index.js:346:12)\n      at next (/node_modules/express/lib/router/index.js:280:10)\n      at expressInit (/node_modules/express/lib/middleware/init.js:40:5)\n}","levelName":"FATAL","level":5}
{"timestamp":"2024-09-03 15:36:48.591","source":"Server.js:185","message":"[Server] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'includes'), promise: Promise {\n  <rejected> TypeError: Cannot read properties of undefined (reading 'includes')\n      at collection.getOldCollectionsJsonExpanded (/server/models/Collection.js:41:17)\n      at ApiRouter.findAll (/server/controllers/CollectionController.js:68:64)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at next (/node_modules/express/lib/router/route.js:144:13)\n      at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at /node_modules/express/lib/router/index.js:284:15\n      at Function.process_params (/node_modules/express/lib/router/index.js:346:12)\n      at next (/node_modules/express/lib/router/index.js:280:10)\n      at expressInit (/node_modules/express/lib/middleware/init.js:40:5)\n}","levelName":"FATAL","level":5}
{"timestamp":"2024-09-03 15:37:44.452","source":"Server.js:185","message":"[Server] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'includes'), promise: Promise {\n  <rejected> TypeError: Cannot read properties of undefined (reading 'includes')\n      at collection.getOldCollectionsJsonExpanded (/server/models/Collection.js:41:17)\n      at ApiRouter.findAll (/server/controllers/CollectionController.js:68:64)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at next (/node_modules/express/lib/router/route.js:144:13)\n      at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at /node_modules/express/lib/router/index.js:284:15\n      at Function.process_params (/node_modules/express/lib/router/index.js:346:12)\n      at next (/node_modules/express/lib/router/index.js:280:10)\n      at expressInit (/node_modules/express/lib/middleware/init.js:40:5)\n}","levelName":"FATAL","level":5}
{"timestamp":"2024-09-03 15:41:24.747","source":"Server.js:185","message":"[Server] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'includes'), promise: Promise {\n  <rejected> TypeError: Cannot read properties of undefined (reading 'includes')\n      at collection.getOldCollectionsJsonExpanded (/server/models/Collection.js:41:17)\n      at ApiRouter.findAll (/server/controllers/CollectionController.js:68:64)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at next (/node_modules/express/lib/router/route.js:144:13)\n      at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)\n      at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)\n      at /node_modules/express/lib/router/index.js:284:15\n      at Function.process_params (/node_modules/express/lib/router/index.js:346:12)\n      at next (/node_modules/express/lib/router/index.js:280:10)\n      at expressInit (/node_modules/express/lib/middleware/init.js:40:5)\n}","levelName":"FATAL","level":5}

Additional Notes

No response

@shanyan-wcx shanyan-wcx added the bug Something isn't working label Sep 3, 2024
@advplyr advplyr added the awaiting release Issue is resolved and will be in the next release label Sep 5, 2024
Copy link

github-actions bot commented Sep 9, 2024

Fixed in v2.13.4.

@github-actions github-actions bot closed this as completed Sep 9, 2024
@github-actions github-actions bot removed the awaiting release Issue is resolved and will be in the next release label Sep 9, 2024
nichwall pushed a commit to nichwall/audiobookshelf that referenced this issue Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants