tonhowtf/omniget · error · anyhow::Error
corpo ilegivel de
Error message
corpo ilegivel de {}: {} What it means
Thrown by expected_from_sums_url when the response body cannot be read as UTF-8 text (response.text() fails). The HTTP request succeeded but the payload is not decodable text, so the sha256sums manifest cannot be parsed.
Solutions
- curl the sums_url and inspect the raw body for HTML or binary content.
- Check for a proxy/captive portal intercepting the request and bypass it.
- Retry after clearing any intermediary cache; if persistent, switch to a mirror URL.
- If the upstream genuinely serves non-UTF-8, fix or replace the manifest source.
Defensive patterns
Strategy: try-catch
Try / catch
// Treat body-read failure as corrupt/untrusted manifest: retry or use mirror
match expected_from_sums_url(&client, &sums_url, asset).await {
Ok(h) => h,
Err(e) if format!("{e}").starts_with("corpo ilegivel") => fetch_from_mirror().await,
Err(e) => return Err(e),
} Prevention
- Bypass intercepting proxies/captive portals for update traffic.
- Prefer HTTPS endpoints under your control or pinned mirrors.
- Log the URL and error so non-UTF-8 payloads are quickly identified.
When it happens
Trigger: The URL returned binary content (e.g. an HTML error page served with 200, a compressed body reqwest could not decode, or invalid UTF-8 bytes) causing response.text().await to return Err.
Common situations: Reverse proxy or captive portal injecting an HTML interstitial; misconfigured server sending gzip without proper content headers; corrupted CDN cache entry serving binary garbage.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- HTTP
- download de falhou: HTTP
- nao foi possivel buscar
- Size mismatch: expected
- Server returned HTML instead of media — the link may have…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/c9794b81c74b31ba.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/dependencies.rs:101
sums_url: &str,
asset: &str,
) -> anyhow::Result<String> {
let response = client
.get(sums_url)
.send()
.await
.map_err(|e| anyhow!("nao foi possivel buscar {}: {}", sums_url, e))?;
if !response.status().is_success() {
return Err(anyhow!(
"nao foi possivel buscar {}: HTTP {}",
sums_url,
response.status()
));
}
let text = response
.text()
.await
.map_err(|e| anyhow!("corpo ilegivel de {}: {}", sums_url, e))?;
parse_sha256sums(&text, asset)
.or_else(|| parse_single_sha256(&text))
.ok_or_else(|| anyhow!("{} nao esta listado em {}", asset, sums_url))
}
}
pub fn bin_name(tool: &str) -> String {
if cfg!(target_os = "windows") {
format!("{}.exe", tool)
} else {
tool.to_string()
}
}
/// Traduz o nome interno da ferramenta para o nome que a UI e o arquivo de
/// overrides usam. `find_tool` recebe "ffmpeg"; a tabela mostra "FFmpeg".
fn override_name(tool: &str) -> &str {
match tool {View on GitHub (pinned to 8600b91f42)