zeroclaw-labs/zeroclaw · error

Failed to create ArduinoApps dir on Uno Q

Error message

Failed to create ArduinoApps dir on Uno Q

What it means

deploy_remote's first step runs `ssh -- <user@host> mkdir -p ~/ArduinoApps` and bails when ssh exits non-zero. The ssh command itself failed before any copying: host unreachable, key or password authentication failure, missing ssh client, or an unaccepted host key. The target comes from validated_ssh_target, which defaults the user to 'arduino' when no user@ is given.

Source

Thrown at crates/zeroclaw-hardware/src/peripherals/uno_q_setup.rs:43

        deploy_local(if bridge_dir.exists() {
            Some(&bridge_dir)
        } else {
            None
        })?;
    }
    Ok(())
}

fn deploy_remote(host: &str, bridge_dir: &std::path::Path) -> Result<()> {
    let ssh_target = validated_ssh_target(host)?;

    println!("Copying Bridge app to {}...", host);
    let status = Command::new("ssh")
        .args(["--", &ssh_target, "mkdir", "-p", "~/ArduinoApps"])
        .status()
        .context("ssh mkdir failed")?;
    if !status.success() {
        anyhow::bail!("Failed to create ArduinoApps dir on Uno Q");
    }

    let status = Command::new("scp")
        .args([
            "-r",
            "--",
            bridge_dir.to_str().unwrap(),
            &format!("{}:~/ArduinoApps/", ssh_target),
        ])
        .status()
        .context("scp failed")?;
    if !status.success() {
        anyhow::bail!("Failed to copy Bridge app");
    }

    println!("Starting Bridge app on Uno Q...");
    let status = Command::new("ssh")
        .args([

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Run `ssh arduino@<host> true` manually — whatever it asks or reports is the real problem; fix that first
  2. Install key auth so the non-interactive call succeeds: `ssh-copy-id arduino@<host>`
  3. Verify the board is reachable (ping / mDNS) and pass an explicit user@host if the SSH user is not 'arduino'
  4. Connect once interactively to accept the host key before automating
Defensive patterns

Strategy: validation

Validate before calling

let status = std::process::Command::new("ssh")
    .args(["-o", "BatchMode=yes", "--", &format!("arduino@{host}"), "true"])
    .status()?;
if !status.success() {
    anyhow::bail!("ssh to {host} not working; fix keys/reachability before deploy");
}
setup_uno_q_bridge(Some(host))?;

Prevention

When it happens

Trigger: setup_uno_q_bridge(Some(host)) with the board offline or the hostname wrong; no SSH key installed for the remote user so the non-interactive call cannot authenticate; host key not yet trusted; no ssh binary installed.

Common situations: Uno Q not on the network or uno-q.local mDNS name not resolving; first connection before ssh-copy-id; containers without an ssh client or with a read-only known_hosts.

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/7f14dde0329799ba. Report an issue: GitHub.