tonhowtf/omniget · error
Failed to download aria2c: HTTP
Error message
Failed to download aria2c: HTTP {} What it means
download_aria2c fetches the aria2 release ZIP from GitHub. As with gallery-dl, a non-success HTTP status on the GET response aborts with 'Failed to download aria2c: HTTP {}'. The pinned URL is a specific aria2 1.37.0 Windows 64-bit release asset.
Solutions
- Check the reported HTTP status and fetch the URL manually to confirm availability
- If 404, update the pinned aria2 release URL in dependencies.rs to a current valid release asset
- If 403/429, wait and retry, or configure a proxy via apply_global_proxy that isn't rate-limited
- Pre-provision aria2c in managed_bin_dir so ensure_aria2c skips the download entirely
- Add retry-with-backoff around the download for transient 5xx
Example fix
// before
let response = client.get(url).send().await?;
if !response.status().is_success() {
return Err(anyhow!("Failed to download aria2c: HTTP {}", response.status()));
}
// after
let response = client.get(url).send().await?;
if !response.status().is_success() {
let status = response.status();
if status.as_u16() >= 500 || status == reqwest::StatusCode::TOO_MANY_REQUESTS {
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
// retry once before failing
}
return Err(anyhow!("Failed to download aria2c: HTTP {}", status));
} Defensive patterns
Strategy: retry
Validate before calling
let url = "https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip";
if let Ok(resp) = reqwest::Client::new().head(url).send().await {
if !resp.status().is_success() {
return Err(anyhow!("aria2c release URL returned HTTP {} — update the pinned URL", resp.status()));
}
} Try / catch
match ensure_aria2c().await {
Some(p) => Some(p),
None => {
log::warn!("aria2c download failed (HTTP error); checking system PATH fallback");
which::which("aria2c").ok()
}
} Prevention
- Pin to a release URL and validate it still returns 200 in CI or at startup
- Cache the downloaded zip/binary and skip re-download when the version matches
- Configure a working proxy for restricted networks via apply_global_proxy
- Back off and retry on 429/5xx instead of failing the first attempt
When it happens
Trigger: The GET to the aria2 GitHub release URL returns non-2xx: GitHub rate limiting (403/429), the pinned release asset moved or deleted (404), proxy/firewall interception, or GitHub returning 5xx during an outage.
Common situations: Corporate proxy blocking github.com release downloads; heavy CI usage hitting GitHub's unauthenticated rate limits; the aria2 release URL breaking after an upstream release re-tag; transient GitHub 502/503 errors.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- download falhou: HTTP
- download de falhou: HTTP
- Failed to download attachment
- nao foi possivel buscar
- HTTP downloading
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/e097bca33f1a8225.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/dependencies.rs:896
}
#[cfg(target_os = "windows")]
async fn download_aria2c() -> anyhow::Result<PathBuf> {
let bin_dir = managed_bin_dir().ok_or_else(|| anyhow!("Could not determine data directory"))?;
std::fs::create_dir_all(&bin_dir)?;
let aria2c_name = bin_name("aria2c");
let aria2c_target = bin_dir.join(&aria2c_name);
let url = "https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip";
let client = crate::core::http_client::apply_global_proxy(reqwest::Client::builder())
.timeout(std::time::Duration::from_secs(120))
.build()?;
let response = client.get(url).send().await?;
if !response.status().is_success() {
return Err(anyhow!(
"Failed to download aria2c: HTTP {}",
response.status()
));
}
let bytes = response.bytes().await?;
let data = bytes.to_vec();
let bin_dir_clone = bin_dir.clone();
let aria2c_name_clone = aria2c_name.clone();
tokio::task::spawn_blocking(move || {
let cursor = std::io::Cursor::new(&data);
let mut archive = zip::ZipArchive::new(cursor)
.map_err(|e| anyhow!("Failed to open aria2c zip: {}", e))?;
for i in 0..archive.len() {
let mut file = archiveView on GitHub (pinned to 8600b91f42)