{"record":{"id":"c34fa63cb9a5b5e7","repo":"unicity-aos/aos-ce","slug":"bundled-label-executable-not-found-at","errorCode":null,"errorMessage":"bundled {label} executable not found at {}","messagePattern":"bundled (.+?) executable not found at (.+?)","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/unicity-aos-bootstrap/src/lib.rs","lineNumber":520,"sourceCode":"    /// Returns an error when the bundled executable is absent or cannot start.\n    pub fn run_runtime_with_args<I, S>(&self, args: I) -> io::Result<ExitStatus>\n    where\n        I: IntoIterator<Item = S>,\n        S: AsRef<OsStr>,\n    {\n        self.spawn_runtime_with_args(args)?.wait()\n    }\n\n    fn ensure_runtime_available(&self) -> io::Result<()> {\n        let binary = self.runtime_binary();\n        self.ensure_runtime_executable(&binary, \"runtime\")?;\n        self.ensure_unicity_ce_manifest().map(drop)\n    }\n\n    fn ensure_runtime_executable(&self, binary: &Path, label: &str) -> io::Result<()> {\n        let metadata = fs::metadata(binary).map_err(|error| {\n            if error.kind() == io::ErrorKind::NotFound {\n                io::Error::new(\n                    io::ErrorKind::NotFound,\n                    format!(\n                        \"bundled {label} executable not found at {}\",\n                        binary.display()\n                    ),\n                )\n            } else {\n                error\n            }\n        })?;\n        if !metadata.is_file() {\n            return Err(io::Error::new(\n                io::ErrorKind::NotFound,\n                format!(\n                    \"bundled {label} executable not found at {}\",\n                    binary.display()\n                ),\n            ));","sourceCodeStart":502,"sourceCodeEnd":538,"githubUrl":"https://github.com/unicity-aos/aos-ce/blob/f6f22024fb1e8d122f28a1b4a9f75aee448ae839/crates/unicity-aos-bootstrap/src/lib.rs#L502-L538","documentation":"ensure_runtime_executable calls fs::metadata on the bundled executable; if metadata fails with io::ErrorKind::NotFound it re-raises a NotFound error formatted \"bundled {label} executable not found at {path}\". This gives callers of foreground_daemon_command and ensure_runtime_available a clear, labeled message when a required bundled binary is missing.","triggerScenarios":"Calling ensure_runtime_executable (via foreground_daemon_command or ensure_runtime_available) with a binary Path that does not exist on disk (fs::metadata returns NotFound).","commonSituations":"The runtime bundle was never installed or was partially deleted; a custom absolute package override points at a nonexistent directory; wrong version root after an upgrade; PATH/override typo in configuration.","solutions":["Verify the binary exists at the reported path (`ls <path>`); if missing, reinstall or repair the runtime bundle.","Check any absolute package override configuration points at a complete, existing bundle directory.","Run the bootstrap's ensure_runtime_available first so missing bundles are materialized before spawning.","Confirm you are using the expected installation root env variable (see validated_environment_root) and not a stale one."],"exampleFix":"// before\nlet bin = PathBuf::from(\"/opt/unicity/old-version/bin/unicityd\"); // deleted after upgrade\n// after\nlet bin = runtime.unicity_executable_path()?; // ask the layout, don't hardcode\nruntime.ensure_runtime_available()?; // materializes the bundle first","handlingStrategy":"fallback","validationCode":"fn binary_exists(bin: &Path) -> Result<(), String> {\n    if !bin.exists() {\n        return Err(format!(\"bundled executable missing at {}; run the bootstrap/installer first\", bin.display()));\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.kind() == io::ErrorKind::NotFound && e.to_string().contains(\"executable not found\") => {\n        eprintln!(\"run `bootstrap ensure-runtime` (or reinstall the bundle) to restore the missing binary\");\n    }\n    other => other?,\n}","preventionTips":["Always call ensure_runtime_available before foreground_daemon_command so bundles are materialized on demand.","Don't hardcode versioned bundle paths; ask the runtime layout for executable paths.","After upgrades, verify old roots weren't pruned while config still points at them."],"tags":["file-not-found","filesystem","process-spawn","rust"],"backgroundTag":"file-not-found","analyzedSha":"f6f22024fb1e8d122f28a1b4a9f75aee448ae839","analyzedAt":"2026-09-13T03:04:44.565Z","contentChangedAt":"2026-09-13T03:04:44.565Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}