tonhowtf/omniget · error · anyhow::Error
nenhuma pagina baixada; o documento pode exigir assinatura…
Error message
nenhuma pagina baixada; o documento pode exigir assinatura de URL
What it means
calameo::download loops over page numbers fetching each page asset; when the loop ends, if n == 0 not a single page was successfully downloaded. Most commonly this means the per-page URLs require a signed URL (signature/query parameters) that the tool did not produce, so all requests failed or returned non-image responses.
Solutions
- Open the document in a browser with devtools and copy a working page URL; compare with the constructed URL and add any missing signature query parameters to the URL builder
- Retry later — temporary CDN auth/token issues may resolve
- If the document fundamentally requires signed URLs, the document cannot be downloaded anonymously; use an authenticated export path instead
Example fix
// before
let url = format!("{}/page_0001.svg", prefix); // unsigned, 403
// after
let url = format!("{}/page_0001.svg?{}", prefix, signing_params(&doc_id)); Defensive patterns
Strategy: retry
Validate before calling
// verify a single page URL is fetchable before the full loop
let probe = client.get(format!("{}/page_0001.{format}", prefix)).send().await?;
if !probe.status().is_success() {
anyhow::bail!("page URLs appear to require a signature");
} Try / catch
let result = tokio::time::timeout(Duration::from_secs(60), calameo::download(url, dest, progress)).await;
match result {
Ok(Ok(res)) if res.pages > 0 => res,
_ => { eprintln!("download failed or produced 0 pages; signed URLs likely required"); Default::default() }
} Prevention
- Compare constructed page URLs against URLs captured from a working browser session (devtools) to detect missing signature parameters
- Fail fast: probe one page before iterating the whole document
- Track Calameo CDN auth requirements; do not assume unsigned assets remain available
When it happens
Trigger: download() extracted a valid page_prefix but every page request returned 403/404 or an error body — the CDN requires per-URL signature/auth that page URL construction lacks.
Common situations: Publisher's Calameo account enforces signed/protected page URLs; CDN auth tokens expired between prefix extraction and download; network/firewall blocking the CDN host.
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
- Track sem metadata pra resolver no YouTube
- download de falhou: HTTP
- nao foi possivel buscar
- Failed to open aria2c zip
- Download cancelled
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/5e34fa2ade7c3a44.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/calameo.rs:77
svg = bytes.to_vec();
}
tokio::fs::write(folder.join(format!("p{:04}.svg", page)), &svg).await?;
n = page;
continue;
}
let jpg_url = format!("{}p{}.jpg", prefix, page);
let resp = client.get(&jpg_url).send().await?;
if resp.status().is_success() {
format = "jpg".to_string();
let bytes = resp.bytes().await?;
tokio::fs::write(folder.join(format!("p{:04}.jpg", page)), &bytes).await?;
n = page;
continue;
}
break;
}
if n == 0 {
return Err(anyhow!(
"nenhuma pagina baixada; o documento pode exigir assinatura de URL"
));
}
if format == "jpg" {
// com JPEG dá para montar o PDF na hora
let mut imgs = Vec::new();
for page in 1..=n {
imgs.push(tokio::fs::read(folder.join(format!("p{:04}.jpg", page))).await?);
}
let pdf = super::jpeg_pdf::build_pdf(&imgs)?;
tokio::fs::write(folder.with_extension("pdf"), pdf).await?;
}
super::report(&progress, &id, "done", n as u64, Some(n as u64), None);
Ok(CalameoResult {
title,
pages: n,
folder: folder.to_string_lossy().to_string(),
format,View on GitHub (pinned to 8600b91f42)