tonhowtf/omniget · error

formato de pacote desconhecido: {}

Error message

formato de pacote desconhecido: {}

What it means

Fall-through guard at the end of the GitHub asset unpacker: unpack() recognizes .zip, .tar.gz/.tgz and .tar.xz extensions; if the asset file name matches none of these known package formats it bails out with this error, carrying the offending file name in {}. It fires when a release asset has an unexpected or unsupported extension (or no recognizable extension at all).

Solutions

  1. Download an asset with a supported extension (zip/tar.gz/tar.xz)
  2. Add a new suffix branch with the matching decompressor before shipping a new format
  3. Rename locally-unpacked artifacts if the server serves the same bytes under an odd name
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src-tauri/omniget-core/src/core/tools/github.rs:150 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/2ef1e7fc4fc0ca83. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/github.rs:150

            std::io::copy(&mut file, &mut w)?;
        }
        Ok(())
    } else if name.ends_with(".tar.gz") || name.ends_with(".tgz") {
        let decoder = flate2::read::GzDecoder::new(std::io::Cursor::new(data));
        let mut archive = tar::Archive::new(decoder);
        archive.set_preserve_permissions(true);
        archive
            .unpack(dest)
            .map_err(|e| anyhow!("tar.gz invalido: {}", e))
    } else if name.ends_with(".tar.xz") {
        let decoder = xz2::read::XzDecoder::new(std::io::Cursor::new(data));
        let mut archive = tar::Archive::new(decoder);
        archive.set_preserve_permissions(true);
        archive
            .unpack(dest)
            .map_err(|e| anyhow!("tar.xz invalido: {}", e))
    } else {
        Err(anyhow!("formato de pacote desconhecido: {}", name))
    }
}

/// Procura um arquivo pelo nome dentro de uma árvore (os zips do whisper.cpp
/// e do Real-ESRGAN têm subpastas diferentes por plataforma).
pub fn find_file(root: &Path, file_name: &str) -> Option<PathBuf> {
    let mut stack = vec![root.to_path_buf()];
    while let Some(dir) = stack.pop() {
        let Ok(rd) = std::fs::read_dir(&dir) else {
            continue;
        };
        for entry in rd.flatten() {
            let p = entry.path();
            if p.is_dir() {
                stack.push(p);
            } else if p.file_name().map(|n| n == file_name).unwrap_or(false) {
                return Some(p);
            }

View on GitHub (pinned to 8600b91f42)