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

Open
opened 2026-02-20 03:07:53 -05:00 by deekerman · 2 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
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
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/audiobookshelf#3414
No description provided.