tonhowtf/omniget · error

o arquivo baixado nao contem o executavel do spicetify

Error message

o arquivo baixado nao contem o executavel do spicetify

What it means

After unpacking the downloaded Spicetify CLI archive into the staging dir, install looks for the platform binary at staging/bin_name("spicetify") and fails when it is absent. The downloaded release asset unpacked successfully but does not contain the expected executable at the expected path.

Solutions

  1. Check the archive layout of the current spicetify-cli release and update the expected binary path
  2. Re-run install to re-download a fresh, complete asset
  3. Verify the asset suffix from cli_asset_suffix() matches the intended platform
  4. Make install search staging recursively for the binary instead of only the top level

Example fix

// before
let exe = staging.join(bin_name("spicetify"));
// after
let exe = find_file_recursive(&staging, &bin_name("spicetify")).ok_or_else(|| anyhow!("o arquivo baixado nao contem o executavel do spicetify"))?;
Defensive patterns

Strategy: validation

Validate before calling

// after download, before trusting the asset:
let ok = matches!(asset.name, n if n.ends_with(expected_suffix)) && data.len() > MIN_CLI_SIZE;

Try / catch

if let Err(e) = install().await {
    if e.to_string().contains("executavel do spicetify") {
        prompt_user_to_report_release_layout_change();
    }
}

Prevention

When it happens

Trigger: Calling install when the latest GitHub release asset for the platform has a changed layout (binary nested in a subdirectory or renamed), or a wrong/partial asset was downloaded.

Common situations: Upstream Spicetify release restructured its archive; wrong cli_asset_suffix matched an asset for another platform; truncated/corrupted download that still unzipped partially.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/core/spicetify.rs:540

    let staging = dir.with_extension("new");
    let _ = std::fs::remove_dir_all(&staging);
    std::fs::create_dir_all(&staging)?;
    let is_zip = asset.name.ends_with(".zip");
    let staging_clone = staging.clone();
    tokio::task::spawn_blocking(move || {
        if is_zip {
            unpack_zip(&data, &staging_clone)
        } else {
            unpack_tar_gz(&data, &staging_clone)
        }
    })
    .await
    .map_err(|e| anyhow!("Spawn blocking failed: {}", e))??;

    let exe = staging.join(bin_name("spicetify"));
    if !exe.exists() {
        let _ = std::fs::remove_dir_all(&staging);
        return Err(anyhow!(
            "o arquivo baixado nao contem o executavel do spicetify"
        ));
    }
    make_executable(&exe);

    let old = dir.with_extension("old");
    let _ = std::fs::remove_dir_all(&old);
    if dir.exists() {
        std::fs::rename(&dir, &old)?;
    }
    if let Err(e) = std::fs::rename(&staging, &dir) {
        if old.exists() {
            let _ = std::fs::rename(&old, &dir);
        }
        return Err(anyhow!(
            "nao foi possivel mover a instalacao para o lugar: {}",
            e
        ));

View on GitHub (pinned to 8600b91f42)