{"record":{"id":"74a249c002e06ab0","repo":"tonhowtf/omniget","slug":"tarefa-de-extra-o-falhou-e","errorCode":null,"errorMessage":"tarefa de extração falhou: {e}","messagePattern":"tarefa de extração falhou: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/onnxrt.rs","lineNumber":503,"sourceCode":"            return Err(anyhow!(\n                \"o pacote do ONNX Runtime baixado não confere: esperava sha256 {expected}, veio {got}\"\n            ));\n        }\n        crate::core::tools::report(\n            &p,\n            \"onnxruntime\",\n            \"extract\",\n            0,\n            None,\n            Some(\"extraindo\".into()),\n        );\n        let extracted = extract_libs(&tmp_for_task, is_zip, &dir_for_task)?;\n        let canonical = make_canonical(&dir_for_task, &extracted)?;\n        let _ = std::fs::remove_file(&tmp_for_task);\n        Ok(canonical)\n    })\n    .await\n    .map_err(|e| anyhow!(\"tarefa de extração falhou: {e}\"))??;\n\n    if let Some(marker) = version_marker_path() {\n        let _ = std::fs::write(&marker, format!(\"{} ({})\", RUNTIME_VERSION, asset.file));\n    }\n    strip_quarantine(&out).await;\n    crate::core::tools::report(progress, \"onnxruntime\", \"done\", 1, Some(1), None);\n    Ok(out)\n}\n\n/// Instala a partir de um arquivo que o usuário já tem no disco.\npub fn install_from_path(source: &Path) -> anyhow::Result<PathBuf> {\n    if !source.is_file() {\n        return Err(anyhow!(\"{} não é um arquivo\", source.display()));\n    }\n    let name = source\n        .file_name()\n        .and_then(|s| s.to_str())\n        .unwrap_or_default();","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/onnxrt.rs#L485-L521","documentation":"Raised by install_runtime() when the blocking extraction task spawned with spawn_blocking (extract_libs + make_canonical) returns an Err; the JoinError/inner error is wrapped as 'tarefa de extração falhou: {e}'. It is a wrapper — the real cause is the inner error message.","triggerScenarios":"install_runtime()'s spawn_blocking closure fails: extract_libs hits an IO error (disk full, permissions) or the empty-library error, or make_canonical fails; the panic/join error is then re-wrapped by anyhow!.","commonSituations":"Disk full in the data dir during extraction; permission denied writing into the target directory; inner archive errors (bad zip/tgz); task panicked inside extract_libs on unexpected archive layout.","solutions":["Read the {e} suffix for the underlying cause and fix that (permissions, disk space, archive)","Free disk space in the app data partition and retry installation","Ensure the target directory is writable by the current user","Re-download the package if the archive itself is corrupt"],"exampleFix":"// before\n.map_err(|e| anyhow!(\"tarefa de extração falhou: {e}\"))??; // opaque\n// after\n.map_err(|e| anyhow!(\"tarefa de extração falhou: {e:#}\")/* chain includes inner cause */)?;","handlingStrategy":"try-catch","validationCode":"if free_space(data_dir)? < 500_000_000 { return Err(anyhow!(\"insufficient disk space\")); }","typeGuard":null,"tryCatchPattern":"match install_runtime(None, &progress).await { Err(e) => { eprintln!(\"{e:#}\"); /* walk the anyhow chain for the real cause */ } }","preventionTips":["Check disk space and directory writability before install","Print the full error chain ({e:#} / {e:?}) to expose the inner cause","Retry installation once on transient IO failures"],"tags":["onnx","rust","extraction","io"],"backgroundTag":"file-write-failed","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}