[Bug]: Bad URL when downloading podcast causes server crash #3106

Open
opened 2026-04-25 00:13:42 +02:00 by adam · 0 comments
Owner

Originally created by @JakePi3 on GitHub (Nov 20, 2025).

What happened?

When a scheduled download or manually executed download occurs against a bad URL, the entire server crashes.

I'm using v2.30.0 running on Docker within Unraid.

The URL in question was:
https://pdst.fm/e/prfx.byspotify.com/e/pscrb.fm/rss/p/s.gum.fm/s-65a84022ad283b3c6fda9305/mgln.ai/e/p63400/mgln.ai/e/137/verifi.podscribe.com/pxl?advertiser=wildalaskancompany&client=985110e8-60fb-43a7-8be9-19091bde4db0&clname=us_wildalaskancompany_519161&dt=%25%DElivery_time%25%25&eid=%25%25episodeid%25%25&event_type=imp&ip=%25%25ip%25%25&ord=%25%CAchebuster%25%25&pid=%25%25podcastid%25%25&plt=megaphone&pub=biglittle&ua=%25%25ua%25%25&updated=1763578323&v=1%2Ftraffic.megaphone.fm%2FAALT2894432841.mp3

The RSS feed in question was:
https://feeds.megaphone.fm/AALT9618167458

The logs contain a FATAL message:

[2025-11-20 15:45:59.135] FATAL: [Server] Unhandled rejection: URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9)
    at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15)
    at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:144:13)
    at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5) 
promise: Promise {
  <rejected> URIError: URI malformed
      at decodeURIComponent (<anonymous>)
      at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9)
      at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15)
      at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25)
      at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
      at next (/app/node_modules/express/lib/router/route.js:144:13)
      at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5)
}

Note that within browser, the URL just evaluates to an ad tracker, not the actual MP3 file as expected. So it's likely the URL is in fact malformed, but the issue is that this crashes the audiobookshelf service.

What did you expect to happen?

Server should NOT crash.

Maybe skip that podcast and try again next cycle, or blacklist the download until the URL is modified within the feed.

Steps to reproduce the issue

  1. Add the RSS feed to ABS.
  2. Try to download the latest episode (published 19th Nov, 2025)

Audiobookshelf version

v2.30.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Other (list in "Additional Notes" box)

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

[2025-11-20 15:45:59.135] FATAL: [Server] Unhandled rejection: URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9)
    at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15)
    at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:144:13)
    at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5) 
promise: Promise {
  <rejected> URIError: URI malformed
      at decodeURIComponent (<anonymous>)
      at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9)
      at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15)
      at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25)
      at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
      at next (/app/node_modules/express/lib/router/route.js:144:13)
      at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5)

Additional Notes

This is on Unraid, 7.2.0

Originally created by @JakePi3 on GitHub (Nov 20, 2025). ### What happened? When a scheduled download or manually executed download occurs against a bad URL, the entire server crashes. I'm using v2.30.0 running on Docker within Unraid. The URL in question was: https://pdst.fm/e/prfx.byspotify.com/e/pscrb.fm/rss/p/s.gum.fm/s-65a84022ad283b3c6fda9305/mgln.ai/e/p63400/mgln.ai/e/137/verifi.podscribe.com/pxl?advertiser=wildalaskancompany&client=985110e8-60fb-43a7-8be9-19091bde4db0&clname=us_wildalaskancompany_519161&dt=%25%DElivery_time%25%25&eid=%25%25episodeid%25%25&event_type=imp&ip=%25%25ip%25%25&ord=%25%CAchebuster%25%25&pid=%25%25podcastid%25%25&plt=megaphone&pub=biglittle&ua=%25%25ua%25%25&updated=1763578323&v=1%2Ftraffic.megaphone.fm%2FAALT2894432841.mp3 The RSS feed in question was: https://feeds.megaphone.fm/AALT9618167458 The logs contain a FATAL message: ``` [2025-11-20 15:45:59.135] FATAL: [Server] Unhandled rejection: URIError: URI malformed at decodeURIComponent (<anonymous>) at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9) at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15) at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25) at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) at next (/app/node_modules/express/lib/router/route.js:144:13) at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5) promise: Promise { <rejected> URIError: URI malformed at decodeURIComponent (<anonymous>) at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9) at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15) at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25) at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) at next (/app/node_modules/express/lib/router/route.js:144:13) at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5) } ``` Note that within browser, the URL just evaluates to an ad tracker, not the actual MP3 file as expected. So it's likely the URL is in fact malformed, but the issue is that this crashes the audiobookshelf service. ### What did you expect to happen? Server should NOT crash. Maybe skip that podcast and try again next cycle, or blacklist the download until the URL is modified within the feed. ### Steps to reproduce the issue 1. Add the RSS feed to ABS. 2. Try to download the latest episode (published 19th Nov, 2025) ### Audiobookshelf version v2.30.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Other (list in "Additional Notes" box) ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell [2025-11-20 15:45:59.135] FATAL: [Server] Unhandled rejection: URIError: URI malformed at decodeURIComponent (<anonymous>) at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9) at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15) at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25) at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) at next (/app/node_modules/express/lib/router/route.js:144:13) at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5) promise: Promise { <rejected> URIError: URI malformed at decodeURIComponent (<anonymous>) at PodcastEpisodeDownload.setData (/app/server/objects/PodcastEpisodeDownload.js:112:9) at PodcastManager.downloadPodcastEpisodes (/app/server/managers/PodcastManager.js:63:15) at ApiRouter.downloadEpisodes (/app/server/controllers/PodcastController.js:362:25) at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) at next (/app/node_modules/express/lib/router/route.js:144:13) at ApiRouter.middleware (/app/server/controllers/PodcastController.js:549:5) ``` ### Additional Notes This is on Unraid, 7.2.0
adam added the bug label 2026-04-25 00:13:42 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3106