Radarr/Radarr · error · DownloadClientException

Failed to add torrent task to Download Station

Error message

Failed to add torrent task to Download Station

What it means

Thrown by TorrentDownloadStation.AddFromTorrentFile after DsTaskProxy.AddTaskFromData succeeded but the follow-up GetTasks() query finds no task whose Additional.Detail['uri'] equals Path.GetFileNameWithoutExtension(filename). The upload returned no error, yet the task is not discoverable, so Radarr cannot produce a download id.

Source

Thrown at src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs:203

        protected override string AddFromTorrentFile(RemoteMovie remoteMovie, string hash, string filename, byte[] fileContent)
        {
            var hashedSerialNumber = _serialNumberProvider.GetSerialNumber(Settings);

            DsTaskProxy.AddTaskFromData(fileContent, filename, GetDownloadDirectory(), Settings);

            var items = GetTasks().Where(t => t.Additional.Detail["uri"] == Path.GetFileNameWithoutExtension(filename));

            var item = items.SingleOrDefault();

            if (item != null)
            {
                _logger.Debug("{0} added correctly", remoteMovie);
                return CreateDownloadId(item.Id, hashedSerialNumber);
            }

            _logger.Debug("No such task {0} in Download Station", filename);

            throw new DownloadClientException("Failed to add torrent task to Download Station");
        }

        protected override void Test(List<ValidationFailure> failures)
        {
            failures.AddIfNotNull(TestConnection());
            if (failures.HasErrors())
            {
                return;
            }

            failures.AddIfNotNull(TestOutputPath());
            failures.AddIfNotNull(TestGetTorrents());
        }

        protected bool IsFinished(DownloadStationTask torrent)
        {
            return torrent.Status == DownloadStationTaskStatus.Finished;
        }

View on GitHub (pinned to ca451608dc)

Solutions

  1. Check DownloadStation for an existing task with the same hash and remove it, or rely on the existing entry.
  2. Retry the add after a short delay to rule out a listing race.
  3. Confirm the .torrent file is valid by adding it manually in DS.
  4. Inspect DS logs for silent rejection (duplicate, invalid bencode, unsupported format).
Defensive patterns

Strategy: retry

Try / catch

try
{
    var id = AddFromTorrentFile(remoteMovie, hash, filename, fileContent);
}
catch (DownloadClientException ex) when (ex.Message == "Failed to add torrent task to Download Station")
{
    _logger.Warn(ex, "Torrent file not found in DownloadStation after add: {0}", filename);
    ScheduleRetry();
}

Prevention

When it happens

Trigger: DownloadStation silently rejected/deduplicated the .torrent (duplicate infohash); DS lists the task under a different uri key (the uploaded filename vs DS's internal name); eventual-consistency delay before the task appears in the list; the torrent file was malformed and DS dropped it without an error code.

Common situations: Re-adding a torrent already present in DS; DS renaming the source uri on import; slow DS task registration; binary torrent file with encoding issues during upload.

Related errors


AI-assisted analysis of Radarr/Radarr@ca451608dc (2026-08-13). Data as JSON: /api/errors/7061b5d7c6714a13. Report an issue: GitHub.