JosefNemec/Playnite · error · Exception
Failed to download file from all mirrors.
Error message
Failed to download file from all mirrors.
What it means
Thrown by the async Downloader.DownloadFileAsync-over-mirrors path when every mirror's DownloadFileAsync call raised an exception (each caught and logged). It is a bare Exception; per-mirror errors are only in the log, not aggregated.
Source
Thrown at source/Playnite/Common/Web/Downloader.cs:248
}
public async Task DownloadFileAsync(IEnumerable<string> mirrors, string path, Action<DownloadProgressChangedEventArgs> progressHandler)
{
logger.Debug($"Downloading data async from multiple mirrors.");
foreach (var mirror in mirrors)
{
try
{
await DownloadFileAsync(mirror, path, progressHandler);
return;
}
catch (Exception e)
{
logger.Error(e, $"Failed to download {mirror} file.");
}
}
throw new Exception("Failed to download file from all mirrors.");
}
public void DownloadFile(IEnumerable<string> mirrors, string path)
{
logger.Debug($"Downloading data from multiple mirrors.");
foreach (var mirror in mirrors)
{
try
{
DownloadFile(mirror, path);
return;
}
catch (Exception e)
{
logger.Error(e, $"Failed to download {mirror} file.");
}
}
View on GitHub (pinned to 5911f4e964)
Solutions
- Inspect the per-mirror logger.Error entries for the real failure per URL.
- Confirm the destination directory exists and is writable before downloading.
- Verify at least one mirror is reachable and the list is non-empty.
- Retry when network/proxy/cert issues are resolved.
Example fix
// before
await downloader.DownloadFileAsync(mirrors, path, progress);
// after — guard dest dir and aggregate per-mirror failures
Directory.CreateDirectory(Path.GetDirectoryName(path));
List<Exception> failures = new List<Exception>();
foreach (var m in mirrors ?? Enumerable.Empty<string>())
{
try { await downloader.DownloadFileAsync(m, path, progress); return; }
catch (Exception e) { failures.Add(e); }
}
throw new AggregateException("All mirrors failed", failures); Defensive patterns
Strategy: retry
Validate before calling
if (mirrors == null || !mirrors.Any()) throw new InvalidOperationException("No mirrors configured.");
Directory.CreateDirectory(Path.GetDirectoryName(path)); Type guard
static bool HasMirrors(IEnumerable<string> m) => m != null && m.Any(s => !s.IsNullOrWhiteSpace());
Try / catch
try { await downloader.DownloadFileAsync(mirrors, path, progress); }
catch (Exception ex) { logger.Error(ex, "download file failed"); /* retry on transient network recovery */ } Prevention
- Ensure the destination directory exists and is writable.
- Confirm at least one mirror is reachable.
- Inspect per-mirror log errors to localize the failure.
When it happens
Trigger: All mirrors fail (network down, 4xx/5xx, TLS, timeout, write failure to the destination path); empty mirrors list throws without attempting any download; destination directory missing or unwritable for every mirror.
Common situations: Downloading game covers/metadata during a network outage; mirrors misconfigured; AV or proxy blocking the hosts; destination folder deleted between calls.
Related errors
- Failed to download string from all mirrors.
- Failed to download update file.
- result.Error
- result.Error
- Failed to download update manifest.
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/d0feae2e36bae868.
Report an issue: GitHub.