[Bug]: Server crash while downloading new podcast episodes if podcast folder has not yet been created #663

Closed
opened 2026-04-24 23:16:26 +02:00 by adam · 2 comments
Owner

Originally created by @mbentham on GitHub (Sep 28, 2022).

Describe the issue

When trying to download a podcast episode the docker container crashes and has to be restarted, last error in the log is like this:

Error: ENOENT: no such file or directory, open '/podcasts/Transfer - The Emiliano Sala Story/8. Off the Radar.mp3'
Emitted 'error' event on WriteStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/podcasts/Transfer - The Emiliano Sala Story/8. Off the Radar.mp3'
}

If podcast folder is manually created then error no longer occurs, looks like a check to see if podcast folder exists before trying to save podcast file is missing.

Steps to reproduce the issue

Try to download an episode of a podcast where the podcast's folder has not yet been created

Audiobookshelf version

v2.1.5

How are you running audiobookshelf?

Docker

Originally created by @mbentham on GitHub (Sep 28, 2022). ### Describe the issue When trying to download a podcast episode the docker container crashes and has to be restarted, last error in the log is like this: Error: ENOENT: no such file or directory, open '/podcasts/Transfer - The Emiliano Sala Story/8. Off the Radar.mp3' Emitted 'error' event on WriteStream instance at: at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'open', path: '/podcasts/Transfer - The Emiliano Sala Story/8. Off the Radar.mp3' } If podcast folder is manually created then error no longer occurs, looks like a check to see if podcast folder exists before trying to save podcast file is missing. ### Steps to reproduce the issue Try to download an episode of a podcast where the podcast's folder has not yet been created ### Audiobookshelf version v2.1.5 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:16:26 +02:00
adam closed this issue 2026-04-24 23:16:27 +02:00
Author
Owner

@advplyr commented on GitHub (Sep 30, 2022):

When you first add the podcast it will check for the folder and create it if it does not exist. In this case the folder must have been deleted or you changed the folder paths of your library or something.

We still need to fix this but just wanted to mention the folder check does happen initially.

@advplyr commented on GitHub (Sep 30, 2022): When you first add the podcast it will check for the folder and create it if it does not exist. In this case the folder must have been deleted or you changed the folder paths of your library or something. We still need to fix this but just wanted to mention the folder check does happen initially.
Author
Owner

@advplyr commented on GitHub (Oct 2, 2022):

Fixed in v2.2.0

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

No dependencies set.

Reference: starred/audiobookshelf#663