seansfkelley / nas-download-manager

An open source browser extension for adding/managing download tasks to your Synology DiskStation.
255 stars 46 forks source link

Impossible to add new download on DSM 5.2 #189

Closed n31luj closed 2 years ago

n31luj commented 3 years ago

Description

With version 0.10.1, when adding a new download on an old Synology DS110J (using the latest DSM version available 5.2-5967 Update 9), it fails with an error notification "Failed to add download The requested version does not support this functionality.".

When forcing the browser to use the version 0.9.3, everything works correctly (download is added in DownloadStation and the download is performed).

Steps to Reproduce the Issue

  1. Use version 0.10.1 (also 0.10.0) installed on Firefox 88.0 (Ubuntu 20.04.2) and configured (https + port 5001, or http + port 5000) to access an old Synology DS110J with latest DSM (5.2-5967 Update 9)
  2. Right-click on a link (a torrent file in my case) and choose "Download with DownloadStation"
  3. The download is not added on DownloadStation and a notification error appears ""Failed to add download The requested version does not support this functionality."

Failure Logs

There is no "Debugging Output" section at the bottom of the extension's setting page.

Versions

Extension version: 0.10.1 and also 0.10.0

Browser version: Firefox 88.0 on Ubuntu 20.04.2

DSM version: 5.2-5967 Update 9 (latest for DS110J)

seansfkelley commented 3 years ago

Oh, that's frustrating. But before I can work on a fix, I need to know what exactly what step is failing. I just released a new version, 0.10.2, that improves some of the debugging information.

If you don't mind, could you install 0.10.2 and then follow the steps below to grab the debugging information?

  1. Set up the extension with your username and all that so you can add tasks.
  2. Try to add your task, and confirm that you get the failure message.
  3. In a new tab, navigate to about:debugging, then on the left sidebar choose This Firefox, and then find Synology Download Manager in the list.
  4. Click the Inspect button, which will open a new tab with a bunch of debugging information.
  5. Near the top, choose the Console tab.
  6. In the main view, look for the last line that begins with task add result. Pop open the Object and meta carets (like folders) so you can see the hidden information, then either copy/paste it or screenshot it and post it here.

You'll end up with something that looks sort of like this (excuse the dark mode):

image

Thanks!

n31luj commented 3 years ago

Here is a screenshot of the debugging information from 0.10.2 version: 2021-05-10_11-51-28

Fano58 commented 2 years ago

Hello,

I have the exact same problem, since I installed version 0.11.1 on chrome

Nikolab8 commented 2 years ago

same problem, both FF and Chrome, but i am positive it's for torrents links only, as http::/.iso was accepted ok

bertrand-benoit commented 2 years ago

Same issue with FF 93.0 (64 bits), and version 0.11.1 of this extension, when trying to add task for anything.

When checking debug information, this is what I see:

task add result 
Object { error: {…}, success: false, meta: {…} }
​
error: Object { code: 406 }
​​
code: 406
​​
<prototype>: Object { … }
​
meta: Object { apiGroup: "DownloadStation", apiSubgroup: "DownloadStation.Task", method: "create", … }
​​
apiGroup: "DownloadStation"
​​
apiSubgroup: "DownloadStation.Task"
​​
method: "create"
​​
version: 1
​​
<prototype>: Object { … }
​​​
__defineGetter__: function __defineGetter__()
​​​
__defineSetter__: function __defineSetter__()
​​​
__lookupGetter__: function __lookupGetter__()
​​​
__lookupSetter__: function __lookupSetter__()
​​​
__proto__: 
​​​
constructor: function Object()
​​​
hasOwnProperty: function hasOwnProperty()
​​​
isPrototypeOf: function isPrototypeOf()
​​​
propertyIsEnumerable: function propertyIsEnumerable()
​​​
toLocaleString: function toLocaleString()
​​​
toString: function toString()
​​​
valueOf: function valueOf()
​​​
<get __proto__()>: function __proto__()
​​​​
length: 0
​​​​
name: "get __proto__"
​​​​
<prototype>: function ()
​​​​​
apply: function apply()
​​​​​
arguments: 
​​​​​
bind: function bind()
​​​​​
call: function call()
​​​​​
caller: 
​​​​​
constructor: function Function()
​​​​​
length: 0
​​​​​
name: ""
​​​​​
toString: function toString()
​​​​​
Symbol(Symbol.hasInstance): function Symbol.hasInstance()
​​​​​
<get arguments()>: function arguments()
​​​​​
<set arguments()>: function arguments()
​​​​​
<get caller()>: function caller()
​​​​​
<set caller()>: function caller()
​​​​​
<prototype>: Object { … }
​​​
<set __proto__()>: function __proto__()
​
success: false
​
<prototype>: Object { … }
​​
__defineGetter__: function __defineGetter__()
​​​
length: 2
​​​
name: "__defineGetter__"
​​​
<prototype>: function ()
​​
__defineSetter__: function __defineSetter__()
​​
__lookupGetter__: function __lookupGetter__()
​​
__lookupSetter__: function __lookupSetter__()
​​
__proto__: 
​​
constructor: function Object()
​​
hasOwnProperty: function hasOwnProperty()
​​
isPrototypeOf: function isPrototypeOf()
​​
propertyIsEnumerable: function propertyIsEnumerable()
​​
toLocaleString: function toLocaleString()
​​
toString: function toString()
​​
valueOf: function valueOf()
​​
<get __proto__()>: function __proto__()
​​
<set __proto__()>: function __proto__()
​​​
length: 1
​​​
name: "set __proto__"
​​​
<prototype>: function ()
index.js:270:936

This 406 HTTP Status is very curious.

seansfkelley commented 2 years ago

@n31luj I've only now found some spare time to work on this project again. Are you still having this issue? It appears that the extension is trying to use the DSM 7.0-compatible Download Station endpoints, which almost certainly don't also exist on DSM 5 (they do on DSM 6.2.4 though). The extension is supposed to check before it tries to use it.

If you could dig around in some more logs, that would be really helpful. You can open the dev tools by opening the URL about:devtools-toolbox?id=%7Bb17c0686-033c-4d03-b526-b16c99998c98%7D&type=extension. After they're open, try to add the download. (It has to be a .torrent or .nzb file; magnet URLs and such won't use this code.) I'm looking for the network request where the extension asks the NAS what it's capable of. See the image below for how to do that (on extension version 0.10.1 or later, of course).

image
seansfkelley commented 2 years ago

@bertrand-benoit that's not HTTP 406, that's Synology-internal-error-reporting 406, which probably means you don't have a default destination set in Download Station for the account you're using. Did the extension not report that in human-readable format in the popup? (It could also be a File Station error 406, but that's unlikely.)

n31luj commented 2 years ago

@seansfkelley Here are two screenshots as requested from version 0.10.1 and 0.11.1

NAS_Download_Manager_0-10-1

NAS_Download_Manager_0-11-1

bertrand-benoit commented 2 years ago

@bertrand-benoit that's not HTTP 406, that's Synology-internal-error-reporting 406, which probably means you don't have a default destination set in Download Station for the account you're using. Did the extension not report that in human-readable format in the popup? (It could also be a File Station error 406, but that's unlikely.)

My Download Station is perfectly working when I add the links directly inside it from Nas DSM; and yes there is a default destination directory defined. I don't see any corresponding option on the extension.

try to add the download. (It has to be a .torrent or .nzb file; magnet URLs and such won't use this code.)

What about other type of download (like uptobox for instance) ?

added a commit that referenced this issue

Does it fix the issue, or only prevent the extension to request a DSM 6.x version? Atm, on my side the extension still does not work, which version do you recommend for the extension, and for the Nas DSM?

Thanks.

bertrand-benoit commented 2 years ago

I have now a new issue, I can't configure the extension to use http (only local network), instead of https; and with https, it fails because it considers the auto-signed NAS Synology certificate as insecure ... How can I unlock this situation?

seansfkelley commented 2 years ago

https://github.com/seansfkelley/nas-download-manager/blob/master/FAQ.md#why-cant-i-use-http-not-https-to-connect-to-the-nas