[Bug]: API progress crashes server if episodeId is missing #3233

Closed
opened 2026-04-25 00:14:25 +02:00 by adam · 3 comments
Owner

Originally created by @LMSSonos on GitHub (Feb 14, 2026).

What happened?

When you call the progress API with missing episodeId the server crashes

│ INFO: Listening on port :80                                                                                                                                                                                                                                                                                              │
│ INFO: [Watcher] "podcasts" Ready                                                                                                                                                                                                                                                                                         │
│ FATAL: [Server] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'id')                                                                                                                                                                                                                       │
│     at User.createUpdateMediaProgressFromPayload (/app/server/models/User.js:786:39)                                                                                                                                                                                                                                                               │
│     at async ApiRouter.createUpdateMediaProgress (/app/server/controllers/MeController.js:148:35)                                                                                                                                                                                                                                                  │
│ promise: Promise {                                                                                                                                                                                                                                                                                                                                 │
│   <rejected> TypeError: Cannot read properties of undefined (reading 'id')                                                                                                                                                                                                                                                                         │
│       at User.createUpdateMediaProgressFromPayload (/app/server/models/User.js:786:39)                                                                                                                                                                                                                                                             │
│       at async ApiRouter.createUpdateMediaProgress (/app/server/controllers/MeController.js:148:35)                                                                                                                                                                                                                                                │
│ }        

What did you expect to happen?

Should return an error ;-)

Steps to reproduce the issue

Just curl' the api with the for a podcast with a missing episodeId

curl -X PATCH "https://abs.myserver.local/api/me/progress/311e68d6-2d65-4975-856e-87e6e1e6234c" \
  -H "Authorization: Bearer KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "duration": 2400,
    "currentTime": 600,
    "progress": 0.25,
    "isFinished": false
  }'

Audiobookshelf version

2.32.1

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


Additional Notes

Maybe related to #4908

Originally created by @LMSSonos on GitHub (Feb 14, 2026). ### What happened? When you call the progress API with missing episodeId the server crashes ``` │ INFO: Listening on port :80 │ │ INFO: [Watcher] "podcasts" Ready │ │ FATAL: [Server] Unhandled rejection: TypeError: Cannot read properties of undefined (reading 'id') │ │ at User.createUpdateMediaProgressFromPayload (/app/server/models/User.js:786:39) │ │ at async ApiRouter.createUpdateMediaProgress (/app/server/controllers/MeController.js:148:35) │ │ promise: Promise { │ │ <rejected> TypeError: Cannot read properties of undefined (reading 'id') │ │ at User.createUpdateMediaProgressFromPayload (/app/server/models/User.js:786:39) │ │ at async ApiRouter.createUpdateMediaProgress (/app/server/controllers/MeController.js:148:35) │ │ } ``` ### What did you expect to happen? Should return an error ;-) ### Steps to reproduce the issue Just curl' the api with the for a podcast with a missing episodeId ``` curl -X PATCH "https://abs.myserver.local/api/me/progress/311e68d6-2d65-4975-856e-87e6e1e6234c" \ -H "Authorization: Bearer KEY" \ -H "Content-Type: application/json" \ -d '{ "duration": 2400, "currentTime": 600, "progress": 0.25, "isFinished": false }' ``` ### Audiobookshelf version 2.32.1 ### 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 ``` ### Additional Notes Maybe related to #4908
adam added the bug label 2026-04-25 00:14:25 +02:00
adam closed this issue 2026-04-25 00:14:25 +02:00
Author
Owner

@nichwall commented on GitHub (Feb 14, 2026):

Is this for a podcast library or a book library?

@nichwall commented on GitHub (Feb 14, 2026): Is this for a podcast library or a book library?
Author
Owner

@LMSSonos commented on GitHub (Feb 14, 2026):

it's a podcast library

@LMSSonos commented on GitHub (Feb 14, 2026): it's a podcast library
Author
Owner

@github-actions[bot] commented on GitHub (Mar 12, 2026):

Fixed in v2.33.0.

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

No dependencies set.

Reference: starred/audiobookshelf#3233