Open mitchdowney opened 7 months ago
I should add, I'm not certain that switching to your fork is what caused the new error. It's possible that the podcast networks experiencing this issue recently increased the number of tracking prefixes / redirects they used, and we're now running into this too many redirects error.
It seems like this might be a problem that apps can fix on their own with JS logic, either by coding it themselves or with a library like follow-redirects
. I'll go ahead and try adding our own JS app implementation logic to follow redirects before loading a url into RNBD.
I'll leave this issue open in case you have ideas for how RNBD can handle an issue like this automatically, but feel free to close it if you don't feel like RNBD should handle these cases.
Hi
Wasn't aware of it but seems like on Android side DownloadManager doesn't work with redirects
https://stackoverflow.com/a/13212978
Maybe it's good idea to add logic about redirects into this lib
@kesha-antonov ok good to know. As a workaround, I ended up adding a server-side endpoint that uses the follow-redirects
library, and I am passing the hostnames that are known to cause trouble through that endpoint first, then getting the final redirected url, then sending it back to the client and loading the final url into RNBD.
Ideally this workaround wouldn't be necessary, so if you add redirect support I'd really appreciate it, but it's not a blocker for us so again not requierd.. Thanks for your quick response!
Thanks for the feedback! I'll think what can be done on lib's side
Hello! We recently deployed your fork into production in Podverse, but are running into a new error on Android. The error message is:
This appears to be happening when attempting to download podcasts with an obnoxious amount of tracking prefix redirect services...for example, this very popular show has 6 redirects:
https://pdst.fm/e/chrt.fm/track/479722/arttrk.com/p/CRMDA/claritaspod.com/measure/pscrb.fm/rss/p/stitcher.simplecastaudio.com/9aa1e238-cbed-4305-9808-c9228fc6dd4f/episodes/b0c9a72a-1cb7-4ac9-80a0-36996fc6470f/audio/128/default.mp3?aid=rss_feed&awCollectionId=9aa1e238-cbed-4305-9808-c9228fc6dd4f&awEpisodeId=b0c9a72a-1cb7-4ac9-80a0-36996fc6470f&feed=dxZsm5kX
I'm trying to scan the documentation and code for a way to increase the number of redirects allowed, but haven't found anything yet. Is this something I can configure, or could this use case potentially need a patch?