{"record":{"id":"c9189b264e950daa","repo":"jdx/mise","slug":"dock-application-is-unavailable","errorCode":null,"errorMessage":"Dock application is unavailable: {}","messagePattern":"Dock application is unavailable: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/defaults/dock.rs","lineNumber":94,"sourceCode":"\npub(super) fn matches(value: &DefaultsValue, current: &plist::Value) -> Result<bool> {\n    Ok(paths(value)?\n        .iter()\n        .map(|path| crate::file::canonicalize_or_self(path))\n        .eq(tiles(Some(current))?\n            .iter()\n            .filter_map(app_path)\n            .map(|path| crate::file::canonicalize_or_self(&path))))\n}\n\n#[cfg(any(target_os = \"macos\", test))]\npub(super) fn reconcile(\n    value: &DefaultsValue,\n    current: Option<&plist::Value>,\n) -> Result<plist::Value> {\n    let desired = paths(value)?;\n    for path in &desired {\n        eyre::ensure!(\n            path.is_dir(),\n            \"Dock application is unavailable: {}\",\n            path.display()\n        );\n    }\n    arrange(&desired, tiles(current)?)\n}\n\n#[cfg(any(target_os = \"macos\", test))]\nfn new_tile(path: &Path, guid: u64) -> Result<plist::Value> {\n    let url = url::Url::from_directory_path(path)\n        .map_err(|_| eyre::eyre!(\"invalid Dock application path: {}\", path.display()))?;\n    let mut file = plist::Dictionary::new();\n    file.insert(\"_CFURLString\".into(), url.to_string().into());\n    file.insert(\"_CFURLStringType\".into(), 15u64.into());\n    let mut data = plist::Dictionary::new();\n    data.insert(\"file-data\".into(), file.into());\n    data.insert(","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/defaults/dock.rs#L76-L112","documentation":"The Dock reconciliation in `src/system/defaults/dock.rs` refuses to rearrange macOS Dock tiles when any application path declared in the desired layout does not exist on disk or is not a directory. This is a safety precondition: arranging the Dock around an app that is missing would silently drop or mis-place its tile. mise throws it via `eyre::ensure!` before touching the Dock.","triggerScenarios":"Call `reconcile(value, current)` (directly or via `match_symlinked_apps_and_preserve_declared_paths` / `refuse_unreadable_layout_and_missing_apps`) with a `[settings.dock]`-style DefaultsValue whose `paths(value)` list contains a path where `path.is_dir()` is false — missing app, deleted app, typo'd path, or a symlink pointing at a non-existent target.","commonSituations":"A mise config references an app like `/Applications/Firefox.app` that was uninstalled or renamed; an app is inside a user-specific folder not present on a new machine; a symlinked .app has a dangling target after a migration; macOS version upgrade moved an app.","solutions":["Install the missing application or restore it at the declared path (verify with `ls <path>`).","Remove or correct the stale path in the dock defaults configuration so every listed path exists.","If the app lives elsewhere, point the config at the actual `.app` bundle location instead of the old path."],"exampleFix":"// before (config)\n[[dock.entries]]\npath = \"/Applications/OldApp.app\"\n\n// after\n[[dock.entries]]\npath = \"/Applications/RenamedApp.app\"","handlingStrategy":"validation","validationCode":"for path in dock_paths {\n    if !std::path::Path::new(path).is_dir() {\n        eprintln!(\"dock app missing: {path}\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify every configured Dock path exists before applying defaults.","Re-check the dock config after uninstalling or renaming apps.","Prefer referencing apps by stable installed locations."],"tags":["macos","dock","config","path-not-found"],"backgroundTag":"file-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}