Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Episode fails in Brave web browser #1270

Open
mitchdowney opened this issue Apr 10, 2024 · 4 comments
Open

Download Episode fails in Brave web browser #1270

mitchdowney opened this issue Apr 10, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mitchdowney
Copy link
Member

Related to PR: #1247 cc @jj-style

Using the "Download Episode" feature in the Brave web browser, I downloaded a few episodes for different podcasts successfully, but the Linux Unplugged episode errors immediately. When I inspect the dev console, I see the following error:

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
chtbl.com/track/392D9/aphid.fireside.fm/d/1437767933/f31a453c-fa15-491f-8618-3f71f1d565e5/503da869-566b-4983-87d3-2073a1c085a3.mp3:1

When I inspect the Network tab for the error, I see:

image

In the UI, the errors display as:

image

It seems like there is something about the Linux Unplugged's file server configuration that is not allowing the episode to be downloaded. Can this be fixed on our side? Or is there a change we should recommend to the podcaster?

chtbl.com is a download stats tracking prefix url service, so I imagine there is at least one redirect happening. Does chtbl disallow CORS file download requests?

@mitchdowney mitchdowney added the bug Something isn't working label Apr 10, 2024
@jj-style
Copy link
Contributor

I have been able to replicate this, and have a found a few things.

I have been able to get it closer via setting mode: 'no-cors in the request.

In addition chtbl.com then redirects to another site where the mp3 is actually hosted and I think that is the URL we want to download.

I set redirect: 'follow' in the request and it got closer but may need to manually fetch the response.redirect if it exists on the response as it did not do it by itself.

Another thing to note is chtbl.com was being blocked by the default install of uBlock origin but unfortunately I don't think there is much we can do about that.

I think I nearly have something working so will try and get a fix out soon though may not be until the weekend

@jj-style
Copy link
Contributor

Okay I'm not sure this is possible to solve from the browser. I think to solve this the file will need to be downloaded from the server so would require some work in the backend.

Happy if you need to revert #1247 as perhaps the implementation was not quite right there

@mitchdowney
Copy link
Member Author

mitchdowney commented Apr 10, 2024

@jj-style ok thanks so much for investigating. I'll leave the feature up for now as it did seem to work in most of my tests. If it becomes a pain point for listeners we can revert or revise it.

I don't think we want to proxy download requests through our own servers to bypass a CORS (?) issue like this. It would incur network transfer costs on our side, and if podcasters want browsers to be able to download episode files without issue, maybe they should talk to Chartable.

@jj-style
Copy link
Contributor

Yeah that makes complete sense, sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants