Sonarr/Sonarr · error · DownloadClientException
Failed to add NZB task to Download Station
Error message
Failed to add NZB task to Download Station
What it means
Thrown by UsenetDownloadStation.AddFromNzbFile after DsTaskProxy.AddTaskFromData returned, but GetTasks().Where(t => Additional.Detail["uri"] == filename).SingleOrDefault() found no matching NZB task. The NZB upload completed without API error, yet no matching task is visible to Sonarr.
Source
Thrown at src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs:195
protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent)
{
var hashedSerialNumber = _serialNumberProvider.GetSerialNumber(Settings);
DsTaskProxy.AddTaskFromData(fileContent, filename, GetDownloadDirectory(), Settings);
var items = GetTasks().Where(t => t.Additional.Detail["uri"] == filename);
var item = items.SingleOrDefault();
if (item != null)
{
_logger.Debug("{0} added correctly", remoteEpisode);
return CreateDownloadId(item.Id, hashedSerialNumber);
}
_logger.Debug("No such task {0} in Download Station", filename);
throw new DownloadClientException("Failed to add NZB task to Download Station");
}
protected override void Test(List<ValidationFailure> failures)
{
failures.AddIfNotNull(TestConnection());
if (failures.HasErrors())
{
return;
}
failures.AddIfNotNull(TestOutputPath());
failures.AddIfNotNull(TestGetNZB());
}
protected ValidationFailure TestOutputPath()
{
try
{View on GitHub (pinned to da2284d7ea)
Solutions
- Open DownloadStation and check whether the NZB task exists; if yes, the uri-match logic in Sonarr cannot pair it.
- Re-grab the NZB from Sonarr and confirm the task appears in DownloadStation.
- Avoid duplicate NZB submissions with the same filename.
- Inspect DownloadStation logs for any task-creation failure on the NZB endpoint.
Defensive patterns
Strategy: retry
Try / catch
try { return AddFromNzbFileCore(remoteEpisode, filename, fileContent); }
catch (DownloadClientException ex) when (ex.Message.Contains("Failed to add NZB task"))
{
_logger.Warn(ex, "NZB task not found immediately; retrying once.");
return AddFromNzbFileCore(remoteEpisode, filename, fileContent);
} Prevention
- Confirm the NZB was added in DownloadStation before declaring failure.
- Avoid duplicate NZB filenames that break SingleOrDefault.
- Inspect DownloadStation logs for NZB parse errors that prevent task registration.
When it happens
Trigger: AddTaskFromData(fileContent, filename, ...) completes; GetTasks filtered to NZB-type tasks where uri == filename yields nothing -> SingleOrDefault returns null -> throw. Happens when DownloadStation renames the NZB task, stores the source URL, or lists it under a different uri field.
Common situations: DownloadStation stored the task under the NZB's internal subject rather than the filename; task created then immediately errored (bad NZB) and filtered; the NZB was a duplicate of an existing task; slow registration read as 'not found'.
Related errors
- Failed to add magnet task to Download Station
- Failed to add torrent task to Download Station
- Unable to connect to Diskstation, please check your settings
- Unable to connect to Diskstation, certificate validation fai
- Failed to {operation}. Reason: {responseContent.Error.GetMes
AI-assisted analysis of Sonarr/Sonarr@da2284d7ea (2026-08-13).
Data as JSON: /api/errors/8edc029fc5e57e89.
Report an issue: GitHub.