atuinsh/atuin · error

Server not reporting its version: it is either too old or…

Error message

Server not reporting its version: it is either too old or unhealthy

What it means

When a server response carries no version header at all, `ensure_version` cannot verify compatibility and bails. The message indicates the server predates version reporting or is unhealthy — syncing cannot be validated.

Solutions

  1. Verify `sync_address` points at a real Atuin sync server
  2. Check for a reverse proxy stripping `x-atuin-*` headers and allowlist them
  3. Upgrade a self-hosted server that is too old to report versions
  4. Test with `curl -sD - <sync-address>` to see whether the header is present

Example fix

// before (proxy strips headers)
proxy_set_header X-Atuin-Version "";
// after
proxy_pass_header X-Atuin-Version;
Defensive patterns

Strategy: validation

Validate before calling

// verify the endpoint is an Atuin server before calling register/login/record_status
let resp = reqwest::get(sync_address).await?;
if resp.headers().get("x-atuin-version").is_none() {
    eprintln!("endpoint does not report an Atuin version — check sync_address and proxy");
    return Ok(());
}

Type guard

fn server_reports_version(headers: &reqwest::header::HeaderMap) -> bool {
    headers.contains_key("x-atuin-version")
}

Try / catch

match client.record_status().await {
    Err(e) if e.to_string().contains("not reporting its version") => {
        eprintln!("check sync_address / proxy headers / server version");
        Err(e)
    }
    other => other,
}

Prevention

When it happens

Trigger: register, login, or record_status against a server that omits the `x-atuin-version` header in its response.

Common situations: `sync_address` accidentally pointed at the wrong host/port (another web app answering), a very old Atuin server (<v0.6 era), or a proxy stripping custom headers.

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/46c119b55a75aa4f. Report an issue: GitHub.

Appendix: source

Thrown at crates/atuin-client/src/api_client.rs:212

    let index = resp.json::<IndexResponse>().await?;
    let version = Version::parse(index.version.as_str())?;

    Ok(version)
}

pub fn ensure_version(response: &Response) -> Result<bool> {
    let version = response.headers().get(ATUIN_HEADER_VERSION);

    let version = if let Some(version) = version {
        match version.to_str() {
            Ok(v) => Version::parse(v),
            Err(e) => {
                bail!("failed to parse server version: {:?}", e);
            }
        }
    } else {
        bail!("Server not reporting its version: it is either too old or unhealthy");
    }?;

    // If the client is newer than the server
    if version.major < ATUIN_VERSION.major {
        println!(
            "Atuin version mismatch! In order to successfully sync, the server needs to run a \
             newer version of Atuin"
        );
        println!("Client: {ATUIN_CARGO_VERSION}");
        println!("Server: {version}");

        return Ok(false);
    }

    Ok(true)
}

#[instrument(level = "trace", skip_all, err)]

View on GitHub (pinned to 900007c480)