bogenpirat / remote-torrent-adder

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

Failure since upgrade to 1.3.4 #290

Closed sstrang closed 4 years ago

sstrang commented 4 years ago

About half the time I try to add a torrent file to a Transmission instance on a remote server, I'm getting the following error in a notification:

Failure 
Could not download torrent file.
Error: Maximum call stack size exceeded

This seems to have started as of a couple of days ago, which coincides with version 1.3.4. I'm running build 85.0.4183.83 of Chrome on Mac OS 10.14.6.

Please let me know if there's anything I can do to help with debugging.

sstrang commented 4 years ago

I'm not completely sure if this is right, but I think the error is triggered by .torrent files greater than around 100KB. I guess it must have something to do with the move from XHR to fetch? I loaded version 1.3.2 and am not encountering the error anymore.

bogenpirat commented 4 years ago

i believe your hunch about torrent file size was correct - dc38a29 should circumvent the size constraint for String.fromCharCode.apply. in tests, i managed to upload a 1.2MiB file.

mind trying out this bad boy: https://github.com/bogenpirat/remote-torrent-adder/archive/dc38a29a33208cb122900da110369570a7599efb.zip instructions: https://github.com/bogenpirat/remote-torrent-adder/wiki/Try-new-code

adamwinn commented 4 years ago

i believe your hunch about torrent file size was correct - dc38a29 should circumvent the size constraint for String.fromCharCode.apply. in tests, i managed to upload a 1.2MiB file.

mind trying out this bad boy: https://github.com/bogenpirat/remote-torrent-adder/archive/dc38a29a33208cb122900da110369570a7599efb.zip instructions: https://github.com/bogenpirat/remote-torrent-adder/wiki/Try-new-code

That build worked for me!

bogenpirat commented 4 years ago

great, thanks. i'll upload an update with the fix later on. should hit the store within the coming day

sstrang commented 4 years ago

Thanks for the quick fix on this one! I find this extension super useful and really appreciate all your work on it!