-
Notifications
You must be signed in to change notification settings - Fork 46
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
incompatible with DSM 7: errors with "Invalid parameter" #166
Comments
Thanks for the bug report! It looks like the root cause is actually the site you're trying to download from, though admittedly the extension doesn't handle this case very well. I gather this from the logs, specifically,
and
so it looks like the particular download you're trying isn't working properly (the server could be loaded, your connection could be spotty, or the server might intentionally not respond to these types of requests). From this, it seems likely that your observed behavior -- that it works when you copy the link in manually, rather than using right-click -- is caused by random chance, such as server load. Do you have other downloads you could try to see if there's a pattern? If there's no pattern, I'm going to chalk this up to random chance combined with poor error handling, improvements to which are tracked by #64. |
Hi Sean, When it didn't work, nothing happened on the extension (no error message) but a click and download torrent file was ok (so the server were ok). And to be clear, the link manually copied didn't work too, I was speaking about magnet link rather than http download links. So to be sure what is happening, i will try again to download with the "right click" and will let you know. Thanks again for the amazing work 👍 |
You got good timing and caught me while I was already around! So here's what I currently understand:
Is that correct? |
I think add a torrent link from popup page is also broken.
the requests from network:
and the response is:
|
Thank you so much @Rhilip! I wasn't aware they had demo DSMs available. That allowed me to do some debugging and I have determined that this is almost certainly a bug on Synology's end. I have filed a bug with their support system and am waiting for a response. The rest of this comment is just details for those interested and my own record-keeping. I'll update this ticket when I know more. To reproduce without access to DSM 7, I went to https://demo.synology.com/en-global/dsm and spun up a new machine. It automatically logs you in as an admin with an unknown password, so I created a new user account with Download Station permissions. I confirmed that the new user works with the extension:
What does not work is uploading a I wrote the following script to mimic the requests the extension uses. It requires a host, username and password to function. #!/bin/bash
# please note that this script was written on macOS, so it might not be 100%
# portable as written (in particular, echo -n may not work on other systems)
# this script also requires `curl` and `jq`
set -euxo pipefail
HOST='???'
USERNAME='???'
PASSWORD='???'
# get sid token
SID=$(curl "https://$HOST:5001/webapi/auth.cgi?account=$USERNAME&api=SYNO.API.Auth&format=sid&method=login&passwd=$PASSWORD&session=DownloadStation&version=4" | jq -r .data.sid)
# dump the request into a file as it's the easiest way to build up a complex curl form in pieces
request_file=$(mktemp)
echo -n $'-----------------------------116640802018974929061761783305' >> "$request_file"
echo -n $'\r\nContent-Disposition: form-data; name="api"\r\n\r\nSYNO.DownloadStation.Task\r\n-----------------------------116640802018974929061761783305' >> "$request_file"
echo -n $'\r\nContent-Disposition: form-data; name="version"\r\n\r\n1\r\n-----------------------------116640802018974929061761783305' >> "$request_file"
echo -n $'\r\nContent-Disposition: form-data; name="method"\r\n\r\ncreate\r\n-----------------------------116640802018974929061761783305' >> "$request_file"
echo -n $'\r\nContent-Disposition: form-data; name="_sid"\r\n\r\n' >> "$request_file"
echo -n "$SID" >> "$request_file"
echo -n $'\r\n-----------------------------116640802018974929061761783305' >> "$request_file"
echo -n $'\r\nContent-Disposition: form-data; name="file"; filename="somefilename.torrent"\r\nContent-Type: application/x-bittorrent\r\n\r\n' >> "$request_file"
echo -n $'torrent file content does not actually matter for this bug\r\n' >> "$request_file"
echo -n $'-----------------------------116640802018974929061761783305\r\n' >> "$request_file"
# try to add the task
curl "https://$HOST:5001/webapi/DownloadStation/task.cgi" -H 'Content-Type: multipart/form-data; boundary=---------------------------116640802018974929061761783305' --data-binary "@$request_file" On DSM 6, a task is added and I get the response On DSM 7, no task is added and I get the response I did some guesswork based on past experience and other projects' issues with DSM 7 I found on the internet, but no changes resolved the issue. Things like: changing the |
I received a response from Synology support:
Until they update their documentation, my hands are tied. I'll be updating the descriptions of the extensions and pinning this issue until I know more. |
This is likely the same root cause as #177, given that Synology's response also mentioned DSM 7.0 support. |
Hi, i wrote an issue probably related with the 0.10.0 update , i'm on DSM 7.0 |
Alright, 0.10.1 should work with DSM 7 now. Synology silently broke the authentication API (again). It's up for Firefox now. Chrome usually takes a couple days for approval. |
current status (maintainer edit)
Synology confirmed they are changing how this extension will have to talk to Download Station in DSM 7, but they have declined to specify how or when DSM 7 will leave beta. Until Synology provides more information and/or releases DSM 7, I cannot make appropriate changes and the extension will continue to be incompatible.
original issue follows
Description
I updated my DS215j on DSM 7 Beta, and since this moment, some features, like the "right clik => Download with Synology Download Manager" doesn't work anymore.
Yet, the "magnet link copy paste" on the extension still work.
I know that DSM is still in beta, but it means that it may not work in the future, and If I knew that the extension didn't fully work, I would have not updated DSM.
Thanks a lot
Steps to Reproduce the Issue
Failure Logs
Versions
Extension version: 0.9.0
Browser version: 84.0.1
DSM version: DSM 7.0-41222
The text was updated successfully, but these errors were encountered: