{"record":{"id":"7f14dde0329799ba","repo":"zeroclaw-labs/zeroclaw","slug":"failed-to-create-arduinoapps-dir-on-uno-q","errorCode":null,"errorMessage":"Failed to create ArduinoApps dir on Uno Q","messagePattern":"Failed to create ArduinoApps dir on Uno Q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-hardware/src/peripherals/uno_q_setup.rs","lineNumber":43,"sourceCode":"        deploy_local(if bridge_dir.exists() {\n            Some(&bridge_dir)\n        } else {\n            None\n        })?;\n    }\n    Ok(())\n}\n\nfn deploy_remote(host: &str, bridge_dir: &std::path::Path) -> Result<()> {\n    let ssh_target = validated_ssh_target(host)?;\n\n    println!(\"Copying Bridge app to {}...\", host);\n    let status = Command::new(\"ssh\")\n        .args([\"--\", &ssh_target, \"mkdir\", \"-p\", \"~/ArduinoApps\"])\n        .status()\n        .context(\"ssh mkdir failed\")?;\n    if !status.success() {\n        anyhow::bail!(\"Failed to create ArduinoApps dir on Uno Q\");\n    }\n\n    let status = Command::new(\"scp\")\n        .args([\n            \"-r\",\n            \"--\",\n            bridge_dir.to_str().unwrap(),\n            &format!(\"{}:~/ArduinoApps/\", ssh_target),\n        ])\n        .status()\n        .context(\"scp failed\")?;\n    if !status.success() {\n        anyhow::bail!(\"Failed to copy Bridge app\");\n    }\n\n    println!(\"Starting Bridge app on Uno Q...\");\n    let status = Command::new(\"ssh\")\n        .args([","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-hardware/src/peripherals/uno_q_setup.rs#L25-L61","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Run `ssh arduino@<host> true` manually — whatever it asks or reports is the real problem; fix that first","Install key auth so the non-interactive call succeeds: `ssh-copy-id arduino@<host>`","Verify the board is reachable (ping / mDNS) and pass an explicit user@host if the SSH user is not 'arduino'","Connect once interactively to accept the host key before automating"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let status = std::process::Command::new(\"ssh\")\n    .args([\"-o\", \"BatchMode=yes\", \"--\", &format!(\"arduino@{host}\"), \"true\"])\n    .status()?;\nif !status.success() {\n    anyhow::bail!(\"ssh to {host} not working; fix keys/reachability before deploy\");\n}\nsetup_uno_q_bridge(Some(host))?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set up key auth (ssh-copy-id) and accept host keys interactively before automating","Pre-flight the connection with `ssh -o BatchMode=yes arduino@host true`","Verify mDNS/DNS resolution of the board hostname on your network"],"tags":["ssh","uno-q","remote-deploy","authentication"],"backgroundTag":"ssh-connection-failed","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}