Skip to content

[TorBox] FormatException: TorBox CDN HTTPS URL passed to MagnetLink.Parse() causing silent download failure for cached torrents #999

Description

@DrinkMonkeyy

What version are you using?
2.0.138.0
What OS are you running?
Synology DSM 7.3.2-86009 Update 3
Are you using Docker or as a service?
Docker
Which debrid provider are you using?
Torbox
Which downloader are you using?
Bezzad
Please attach a log file here with the log setting set to debug

Log file attached, but relevant section is:
[07:08:06 ERR] An unhandled exception has occurred while executing the request.
System.FormatException: Magnet links must start with 'magnet:'.
at MonoTorrent.MagnetLink.Parse(String uri) in MagnetLink.cs:line 95
at MonoTorrent.MagnetLink.FromUri(Uri uri) in MagnetLink.cs:line 129
at RdtClient.Web.Controllers.TorrentsController.CheckFilesMagnet(...) in TorrentsController.cs:line 234

[07:08:07 ERR] Same exception at:
at RdtClient.Service.Services.Torrents.AddMagnetToDebridQueue(...) in Torrents.cs:line 193 and line 199

Offending URL passed to MagnetLink.Parse():
https://store-079.wnam.tb-cdn.io/dld/bb8947d7-feed-49d2-bc28-7f0e1b3408d3?token=*****&filename=Pressure.2026.2160p.iT.WEB-DL.DV.HDR10%2B%5BBen%20The%20Men%5D.mp4


When TorBox has a requested torrent already cached on its CDN, it returns a direct HTTPS download URL (e.g. https://store-079.wnam.tb-cdn.io/dld/...) rather than a magnet link. RDTClient's TorrentsController.CheckFilesMagnet and Torrents.AddMagnetToDebridQueue both pass this URL directly into MonoTorrent.MagnetLink.Parse(), which unconditionally throws a FormatException because the string does not begin with magnet:.

The result is that the torrent silently fails — it appears on the TorBox website as successfully added and cached, but RDTClient never tracks or downloads it. No user-visible error is shown in the RDTClient UI.

Steps to reproduce:

Configure RDTClient with TorBox as the debrid provider.
Send a magnet link (via Radarr/Sonarr) for a torrent that TorBox already has cached on its CDN.
TorBox returns a CDN HTTPS URL instead of a magnet link in its API response.
RDTClient throws FormatException in both CheckFilesMagnet (line 234) and AddMagnetToDebridQueue (lines 193/199).
The torrent never appears in the RDTClient torrent list and is never downloaded locally.
Expected behaviour:
RDTClient should detect that the value returned from TorBox is an HTTPS URL (not a magnet link) and route it through the direct HTTP download path rather than the MonoTorrent.MagnetLink.Parse() path.

Actual behaviour:
FormatException thrown, download fails silently.

Additional context:
This affects all cached torrents served directly by the TorBox CDN. Non-cached torrents (fetched fresh) are unaffected because TorBox returns a normal magnet link for those. The error occurs reproducibly and consistently for the same file — this log shows it crashing three times in 5 seconds (07:08:06, 07:08:07, 07:08:11) as RDTClient retries.

Also note: an earlier download attempt (05:27) did start (reaching 6% at ~99 MB/s) before being cancelled, suggesting this is a separate retry path that succeeded briefly before failing — possibly worth investigating as a secondary issue.

rdtclient.csv

PS - this is my first bug report so I hope I did it right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions