tonhowtf/omniget · error
binario sumiu apos instalar
Error message
binario sumiu apos instalar
What it means
After swapping the staging directory into place, install() calls locate() to confirm the Real-ESRGAN binary is discoverable. If locate() returns None even though installation just completed, it throws 'binario sumiu apos instalar' — an internal invariant: the binary disappeared or is not where expected after install.
Solutions
- Re-run install and then locate() manually to see where the binary landed
- Check antivirus/quarantine logs — the binary may be deleted right after extraction
- Verify swap_dir moved the staging dir to the path locate() searches
- Clear any cached path index used by locate() so it re-scans the managed dir
Defensive patterns
Strategy: retry
Validate before calling
fn verify_installed() -> bool {
locate().is_some()
}
if !verify_installed() {
upscale::install(&progress).await?;
} Try / catch
match upscale::install(&progress).await {
Err(e) if e.to_string().contains("binario sumiu") => {
// likely antivirus/quarantine; alert user and retry
warn_user("Binário removido após instalação — verifique o antivírus");
}
other => other,
} Prevention
- Whitelist the managed tools directory in antivirus software
- Keep locate()'s search path in sync with swap_dir's target
- Re-scan the managed dir (no caching) right after install
When it happens
Trigger: swap_dir succeeded but locate() cannot find the binary: permissions stripped, PATH/cache used by locate() not refreshed, or the swap moved files to an unexpected location.
Common situations: Antivirus or quarantine removing the executable immediately after write; locate() checking a different (stale) directory; filesystem sync issues on network mounts; macOS Gatekeeper deletion of unsigned binaries.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Could not determine data directory
- pasta de origem não encontrada
- Failed to move into place
- Could not determine data directory
- Failed to open archive
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/6d899036c7697757.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/upscale.rs:101
let asset = github::asset(&client, REPO, None, asset_pick).await?;
// Release de 2022: a API não tem digest para esses assets.
let data = github::download(&client, &asset, true, &progress, BIN).await?;
let staging = dir.with_extension("new");
let _ = std::fs::remove_dir_all(&staging);
let (s2, n2) = (staging.clone(), asset.name.clone());
tokio::task::spawn_blocking(move || github::unpack(&data, &n2, &s2))
.await
.map_err(|e| anyhow!("Spawn blocking failed: {}", e))??;
let Some(exe) = github::find_file(&staging, &bin_name(BIN)) else {
let _ = std::fs::remove_dir_all(&staging);
return Err(anyhow!("o pacote nao contem o {}", BIN));
};
github::make_executable(&exe);
github::swap_dir(&staging, &dir)?;
github::strip_quarantine(&dir).await;
locate()
.map(|p| p.to_string_lossy().to_string())
.ok_or_else(|| anyhow!("binario sumiu apos instalar"))
}
#[derive(Debug, Clone, Deserialize)]
pub struct UpscaleOptions {
pub inputs: Vec<String>,
#[serde(default = "default_model")]
pub model: String,
#[serde(default = "default_scale")]
pub scale: u32,
/// "png" | "jpg" | "webp"
#[serde(default = "default_fmt")]
pub format: String,
#[serde(default)]
pub output_dir: String,
#[serde(default)]
pub tile_size: u32,
}
View on GitHub (pinned to 8600b91f42)