Synology DownloadStation seems to be broken
What version are you using? 2.0.97.0
What OS are you running? DSM synology
Are you using Docker or as a service? Docker
Which debrid provider are you using? AllDebrid
Which downloader are you using? Synology DownloadStation
Please attach a log file here with the log setting set to debug
2025-02-25 19:18:48.734 +01:00 [DBG] RdtClient.Service.Services.Downloaders.DownloadStationDownloader: Instantiated new DownloadStation Downloader for URI https://34.download.real-debrid.com/speedtest/testDefault.rar to filePath /data/downloads/testDefault.rar/testDefault.rar and downloadPath testDefault.rar/testDefault.rar and GID
2025-02-25 19:18:48.734 +01:00 [DBG] RdtClient.Service.Services.Downloaders.DownloadStationDownloader: Starting download of https://34.download.real-debrid.com/speedtest/testDefault.rar, writing to path: /Videos/Unsort/testDefault.rar
2025-02-25 19:18:48.809 +01:00 [ERR] Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware: An unhandled exception has occurred while executing the request.
System.Exception: An unexpected error occurred preparing download https://34.download.real-debrid.com/speedtest/testDefault.rar for torrent testDefault.rar: The JSON value could not be converted to System.String. Path: $.data.task[36].status_extra.error_detail | LineNumber: 0 | BytePositionInLine: 27371.
at RdtClient.Service.Services.DownloadClient.Start() in /appserver/server/RdtClient.Service/Services/DownloadClient.cs:line 108
at RdtClient.Web.Controllers.SettingsController.TestDownloadSpeed(CancellationToken cancellationToken) in /appserver/server/RdtClient.Web/Controllers/SettingsController.cs:line 100
at lambda_method1109(Closure, Object)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at RdtClient.Service.Middleware.RequestLoggingMiddleware.Invoke(HttpContext context) in /appserver/server/RdtClient.Service/Middleware/RequestLoggingMiddleware.cs:line 15
at Program.<>c.<<<Main>$>b__0_13>d.MoveNext() in /appserver/server/RdtClient.Web/Program.cs:line 155
--- End of stack trace from previous location ---
at RdtClient.Service.Middleware.AuthorizeMiddleware.Invoke(HttpContext context) in /appserver/server/RdtClient.Service/Middleware/AuthorizeMiddleware.cs:line 15
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
Are you using Docker or as a service? Yes
Whilst I appreciate the inclusive or joke, it would be helpful to know if you’re using docker.
The URL looks to me like you’re doing a speed test, is that right? If so, is this the first speed test you ran, and did the first (or any) speed test execute successfully?
Have you had a working setup on any previous versions?
@YvesPa as our resident Download Station expert, are you able to take a look at this?
Sorry, I just stopped at "Are you using Docker ...?" 🤦
Yes, it was working previously, and it also works with the internal downloader. I'll fall back on that option for now.
The issue first appeared on a regular download, so I ran the speed test to ensure that the issue was not coming from the debrid service.
The problem seems to be with the deserialisation of the response from GetInfoAsync model source code.
What's really weird is that their api docs say it should be a string.
Are you able to paste some api responses? I'll give examples with curl, but since these are get requests, you can just paste them into your browser's address bar.
This will give you a sid, you'll need to include it in future requests.
curl "<synology_url_and_port>/webapi/auth.cgi?
api=SYNO.API.Auth&version=2&method=login&account=<your_username>&passwd=<your_password>&session=
DownloadStation&format=sid"
Now we can list all the tasks:
curl "<synology_url_and_port>/webapi/DownloadStation/task.cgi?
api=SYNO.DownloadStation.Task&version=1&method=list&additional=detail,file&sid=<sid>"
Pick an id you like and then
curl "<synology_url_and_port>/webapi/DownloadStation/task.cgi?
api=SYNO.DownloadStation.Task&version=1&method=getinfo&id=<id>
&additional=detail&sid=<sid>"
And can you also try with an idthat isn't present (just change the number on the id to one not in the list response).
I'm pretty sure the error is coming from a list response.
Thanks for your answer, here is mine.
First of all about the login I was not able to get a success the version 2 of the auth api return so I follow the latest login documentation to make it works:
<synology_url>/webapi/entry.cgi?api=SYNO.API.Auth&passwd=<passwd>&version=7&account=<username>&method=login&enable_syno_token=false
About the version I tried with 6 and 7 is ok
About the task list I don't know if it's important but the content-type is text/plain; charset="UTF-8"
About the task:
<synology_url>/webapi/DownloadStation/task.cgi?api=SYNO.DownloadStation.Task&version=1&method=getinfo&id=dbid_46&additional=detail&sid=<sid>
The output is a plain text (content-type text/plain; charset="UTF-8")
{"data":{"tasks":[{"additional":{"detail":{"completed_time":0,"connected_leechers":0,"connected_peers":0,"connected_seeders":0,"create_time":1740500447,"destination":"Videos/Unsort/testDefault.rar","seedelapsed":0,"started_time":0,"total_peers":0,"total_pieces":0,"unzip_password":"","uri":"https://34.download.real-debrid.com/speedtest/testDefault.rar","waiting_seconds":0}},"id":"dbid_46","size":0,"status":"error","status_extra":{"error_detail":"file_not_exist"},"title":"testDefault.rar","type":"https","username":"<username>"}]},"success":true}
The tasks list output is the same a oneliner json file with an blank line
~~Yep, this seems to be an issue with the synology api client we use. We’ll need to file an issue in their repo.~~ Which version of DSM are you running?
I'm running DSM 7.2.2
Sorry I was mistaken in my last reply. The API client’s models are correct.
I’m not entirely sure what’s going on, because that API response does have data.tasks[i].status_extra.error_detail as a string.
Can you post the full task list response?
It’s weird that it was working previously, considering there’s only two versions of rdt-client with Download Station support, and the second version shoudn’t have changed the behaviour of Download Station downloader at all. Just to confirm this, can you test with version 2.0.96?
Could you try stopping the container, deleting the db and restarting the container? This will delete all the settings and torrents, so don’t forget to redo your settings.
I don’t know what amount of resetting/reinstalling can be done to Download Station, but it might be worth looking into it.
@yumiki, Does this issue happend on every download or on the real-debird test ?
Recently I had discover something on Synology Download Station, you have a max number of download Task (active or completed). And if you want to add new download you need to remove them.
On my own It look like the real-debrid test don't do anything without any logs, I will try to debug that.
I'm having the problem as well. Running latest DSM version: DSM 7.2.2-72806 Update 3 Using RdtClient v2.0.108 from a docker container. Here's the logs: [16:15:40 ERR] Unable to start download: An unexpected error occurred preparing download https://22-4.download.real-debrid.com/d/REDACTED/Big%20Buck%20Bunny.rar for torrent Big Buck Bunny: The JSON value could not be converted to System.Collections.Generic.IEnumerable`1[Synology.Api.Client.Shared.Models.Errors]. Path: $.error.errors | LineNumber: 0 | BytePositionInLine: 31. for download Big Buck Bunny.rar. Completed: 0%, avg speed: 0bytes/s (REDACTED) remoteID: for torrent Big Buck Bunny (REDACTED - downloaded 100%) (REDACTED) Feel free to ask if you need anything else @YvesPa
@realAbitbol I will check this this weekend.
The error is that the true error is not correctly parse, so it's a dependencies error not rdt-cient. But I also did update the dependencies to use Synology V2 routes and It look like some errors are not in the same format.
Possible error I did had, there is a limit at how much download task you could have on DownloadStation, tried to purge your download station task list, especially if you use a non admin user in rdt-client.
Possible error I did had, there is a limit at how much download task you could have on DownloadStation, tried to purge your download station task list, especially if you use a non admin user in rdt-client.
Every time I tried I had an empty list on downloadstation
I've just tried enabling Download Station and am getting the same error. It doesn't look like there is a fix mentioned in this thread, is there a way to get this working?
Hello, yes me to synlogy downloader seem broken, i got API KEY error so i downgrade to previous version and everything work again, i'm waiting update
I've just tried enabling Download Station and am getting the same error. It doesn't look like there is a fix mentioned in this thread, is there a way to get this working?
Just downgrade version on docker image: rogerfar/rdtclient:2.0.111 working fine
Just downgrade version on docker image: rogerfar/rdtclient:2.0.111 working fine
When the user you’re replying to made that comment, v2.0.111 was the latest version.
Considering Synology DownloadStation doesn’t use API keys (it uses user/pass authentication), your issue was likely something else. If you can reproduce it, a bug report made with the bug report issue template (like this Issue) would be awesome!
Just downgrade version on docker image: rogerfar/rdtclient:2.0.111 working fine
When the user you’re replying to made that comment, v2.0.111 was the latest version.
Considering Synology DownloadStation doesn’t use API keys (it uses user/pass authentication), your issue was likely something else. If you can reproduce it, a bug report made with the bug report issue template (like this Issue) would be awesome!
yes sorry, done i create one