bogenpirat / remote-torrent-adder

A handy Chrome extension to add torrent files to torrent clients
237 stars 80 forks source link

Error 'Failed to fetch' when accessing ruTorrent #320

Closed vmurcia closed 2 years ago

vmurcia commented 2 years ago

For several days I always get this error when trying to download something. I haven’t changed anything in the configuration and RTA had been working without problems for a long time.

Also, there is this error in the log console for the extension:

Access to fetch at 'https://myseedbox.com/webui/php/addtorrent.php?dir_edit=ebooks&label=Book' from origin 'chrome-extension://oabphaconndgibllomdcjbfdghcmenci' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

bogenpirat commented 2 years ago

i'm a bit stumped here - your error message implies that the request to add the torrent fails due to CORB, however CORB does not apply to the section of code in the extension that fires off that request (background page).

are you running RTA in chrome or another browser?

would you be willing to share your server's response headers to one of RTA's requests? they can be found by going to chrome://extensions/?id=oabphaconndgibllomdcjbfdghcmenci, enabling developer mode in the top right, then under inspect views clicking on background page, then the network tab, trying to add a torrent, and then clicking on the request that failed with a similar URL as in your post. might look kinda like this: image feel free to redact any private header values.

vmurcia commented 2 years ago

Hi,

I’m running RTA in Opera, in the latest version available (82.0.4227.43). It has worked for me at least for a couple of years.

I’m going to try what you mention and I will post the Response Headers here, once redacted.

Also, I’ll try to run it in Google Chrome and also in a new Opera profile with no other extensions installed to check if it keeps throwing the same error.

vmurcia commented 2 years ago

Hi again,

I’ve just found why RTA was not working for me. In my everyday Opera profile I had Site access configured as 'On specific sites' instead of 'On all sites'. I don’t remember having configured this option, but it does not work even if the right domain — the one I am downloading torrents from — is whitelisted. The option has to be set as 'On all sites' for RTA to work.

bogenpirat commented 2 years ago

Interesting. I suppose this overwrites the Chrome setting of allowing cross origin requests made by extensions that have the necessary rights. Thanks for posting back your results!