{"record":{"id":"9a4e730d91cfe7b0","repo":"zeroclaw-labs/zeroclaw","slug":"failed-to-start-bridge-app-ensure-arduino-app-cli","errorCode":null,"errorMessage":"Failed to start Bridge app. Ensure arduino-app-cli is installed on Uno Q.","messagePattern":"Failed to start Bridge app\\. Ensure arduino-app-cli is installed on Uno Q\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-hardware/src/peripherals/uno_q_setup.rs","lineNumber":72,"sourceCode":"        .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([\n            \"--\",\n            &ssh_target,\n            \"arduino-app-cli\",\n            \"app\",\n            \"start\",\n            \"~/ArduinoApps/uno-q-bridge\",\n        ])\n        .status()\n        .context(\"arduino-app-cli start failed\")?;\n    if !status.success() {\n        anyhow::bail!(\"Failed to start Bridge app. Ensure arduino-app-cli is installed on Uno Q.\");\n    }\n\n    println!(\"ZeroClaw Bridge app started. Add to config.toml:\");\n    println!(\"  [[peripherals.boards]]\");\n    println!(\"  board = \\\"arduino-uno-q\\\"\");\n    println!(\"  transport = \\\"bridge\\\"\");\n    Ok(())\n}\n\nfn validated_ssh_target(value: &str) -> Result<String> {\n    let mut parts = value.split('@');\n    let first = parts.next().unwrap_or_default();\n    let second = parts.next();\n    if parts.next().is_some() {\n        anyhow::bail!(\"Uno Q host must contain at most one '@'\");\n    }\n\n    let (user, host) = match second {","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-hardware/src/peripherals/uno_q_setup.rs#L54-L90","documentation":"deploy_remote finishes by running `arduino-app-cli app start ~/ArduinoApps/uno-q-bridge` over ssh and bails when it exits non-zero. The copy succeeded; starting the app on the board failed — most often because the arduino-app-cli runtime is not installed on the Uno Q, which the message calls out.","triggerScenarios":"setup_uno_q_bridge(Some(host)) onto a board without arduino-app-cli; the copied app directory incomplete or invalid (missing app.yaml); the app starting then exiting immediately with its own error, surfaced through the ssh exit code.","commonSituations":"New Uno Q boards shipped without the app runtime; an interrupted earlier deploy leaving a half-written app directory; app.yaml referencing missing sketch/python files.","solutions":["Run it by hand to see the real output: `ssh arduino@<host> 'arduino-app-cli app start ~/ArduinoApps/uno-q-bridge'`","If the command is not found, install arduino-app-cli on the Uno Q","If the CLI exists, rerun the setup to re-copy a complete app directory over the corrupt partial copy"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"let probe = std::process::Command::new(\"ssh\")\n    .args([\"--\", &format!(\"arduino@{host}\"), \"command\", \"-v\", \"arduino-app-cli\"])\n    .output()?;\nif !probe.status.success() {\n    anyhow::bail!(\"arduino-app-cli missing on {host}; install it before deploy\");\n}","typeGuard":null,"tryCatchPattern":"match setup_uno_q_bridge(Some(host)) {\n    Err(e) if format!(\"{e}\").contains(\"Failed to start Bridge app\") => {\n        // ssh in and run `arduino-app-cli app start ~/ArduinoApps/uno-q-bridge`\n        // manually to see the real error, then re-deploy a clean copy\n    }\n    rest => rest,\n}","preventionTips":["Install arduino-app-cli on the Uno Q before first deploy","Pre-check `command -v arduino-app-cli` over ssh as part of your deploy script","Re-run the full setup after failures so the app directory is complete"],"tags":["uno-q","arduino-app-cli","remote-deploy","service-start"],"backgroundTag":"service-start-failed","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}