clockworklabs/SpacetimeDB · error

unknown command name for spacetimedb-update multicall binary

Error message

unknown command name for spacetimedb-update multicall binary: {}

What it means

crates/update/src/main.rs:33 implements a busybox-style multicall binary: it dispatches on argv[0] (cmd) and only recognizes `spacetimedb-update` (updater), `spacetime` (CLI proxy, with the special case that a first arg of `version` routes to the updater), and `spacetime-install` (SelfInstall). Any other executable name reaches the bail with the offending name printed.

Source

Thrown at crates/update/src/main.rs:33

    let cmd = if let Some(cmd) = &env_cmd {
        cmd
    } else {
        argv0.file_stem().context("argv0 must have a filename")?
    };
    if cmd == "spacetimedb-update" {
        spacetimedb_update_main()
    } else if cmd == "spacetime" {
        let args = args.collect::<Vec<_>>();
        if args.first().is_some_and(|s| s == "version") {
            // if the first arg is unambiguously `version`, go straight to `spacetime version`
            spacetimedb_update_main()
        } else {
            proxy::run_cli(None, Some(argv0.as_os_str()), args)
        }
    } else if cmd == "spacetime-install" {
        cli::SelfInstall::parse().exec()
    } else {
        anyhow::bail!(
            "unknown command name for spacetimedb-update multicall binary: {}",
            Path::new(cmd).display()
        )
    }
}

fn spacetimedb_update_main() -> anyhow::Result<ExitCode> {
    let args = cli::Args::parse();
    args.exec()
}

View on GitHub (pinned to 6dee26c6ef)

Solutions

  1. Invoke the binary only through a supported name: create a symlink named `spacetime` (or `spacetimedb-update` / `spacetime-install`) pointing at it.
  2. Fix the wrapper/entrypoint so argv[0] is one of the recognized names before exec.
  3. For a short alias, use a shell alias/function (`alias sdb=spacetime`) rather than renaming the executable.

Example fix

# before: binary copied under an unknown name
mv spacetime-update sdb && ./sdb update
# -> unknown command name for spacetimedb-update multicall binary: sdb
# after: expose it under a supported name
ln -s spacetime-update spacetime && spacetime update
Defensive patterns

Strategy: validation

Validate before calling

// Rust launcher: gate on argv[0] before running the multicall binary.
const KNOWN: &[&str] = &["spacetimedb-update", "spacetime", "spacetime-install"];
let argv0 = std::env::args_os().next().unwrap();
let name = std::path::Path::new(&argv0).file_name().unwrap().to_string_lossy().into_owned();
assert!(KNOWN.contains(&name.as_str()), "invoke this binary as one of {KNOWN:?}");

Prevention

When it happens

Trigger: Copying or hardlinking the binary to a different filename (e.g. `sdb`) and invoking it; a packaging/entrypoint (Docker ENTRYPOINT, wrapper script, symlink farm) that sets argv[0] to something other than the three supported names; invoking the multicall binary through `busybox <applet>`-style call conventions it does not implement.

Common situations: Linux distributions or devcontainers renaming the binary for conflict avoidance; users creating short aliases via copies instead of shell aliases; CI images with an ENTRYPOINT naming the binary differently.

Related errors


AI-assisted analysis of clockworklabs/SpacetimeDB@6dee26c6ef (2026-08-20). Data as JSON: /api/errors/1dc06896dd52db9a. Report an issue: GitHub.