{"record":{"id":"a932c6518ed93ffb","repo":"zed-industries/zed","slug":"failed-to-mount","errorCode":null,"errorMessage":"failed to mount: {:?}","messagePattern":"failed to mount: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/auto_update/src/auto_update.rs","lineNumber":1182,"sourceCode":"    let running_app_filename = running_app_path\n        .file_name()\n        .with_context(|| format!(\"invalid running app path {running_app_path:?}\"))?;\n\n    let mount_path = temp_dir.path().join(\"Zed\");\n    let mut mounted_app_path: OsString = mount_path.join(running_app_filename).into();\n\n    mounted_app_path.push(\"/\");\n    let mut cmd = new_command(\"hdiutil\");\n    cmd.args([\"attach\", \"-nobrowse\"])\n        .arg(&downloaded_dmg)\n        .arg(\"-mountroot\")\n        .arg(temp_dir.path());\n    let output = cmd\n        .output()\n        .await\n        .with_context(|| \"failed to mount: {cmd}\")?;\n\n    anyhow::ensure!(\n        output.status.success(),\n        \"failed to mount: {:?}\",\n        String::from_utf8_lossy(&output.stderr)\n    );\n\n    let unmounter = MacOsUnmounter {\n        mount_path: mount_path.clone(),\n        background_executor,\n    };\n\n    let mut cmd = new_command(\"rsync\");\n    cmd.args([\"-av\", \"--delete\", \"--exclude\", \"Icon?\"])\n        .arg(&mounted_app_path)\n        .arg(&running_app_path);\n    let rsync_output = cmd.output().await;\n\n    // Await the unmount (even if rsync failed) so that the installer temp dir\n    // can be deleted once this function returns.","sourceCodeStart":1164,"sourceCodeEnd":1200,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/auto_update/src/auto_update.rs#L1164-L1200","documentation":"macOS install step: the downloaded .dmg is mounted with `hdiutil attach -nobrowse -mountroot <temp>`; failure reports hdiutil's stderr, which typically names the cause (corrupt image, resource busy, unrecognized format).","triggerScenarios":"hdiutil attach exits non-zero - corrupt or truncated dmg, another mount in flight, DiskArbitration denied, or a quarantine/Gatekeeper block on the downloaded image.","commonSituations":"Truncated downloads; security software intercepting disk mounts; macOS notarization/mount policy changes; concurrent updates racing mounts.","solutions":["Retry the update to get a clean download.","Reproduce manually: `hdiutil attach -nobrowse <cached.dmg>` and read the error.","Check security software settings for disk-image interception.","Download the .dmg from zed.dev and install by hand if mounts keep failing."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"on mount failure, discard the cached dmg and retry the full update once (a fresh download usually fixes corrupt images); report only if the second attempt fails.","preventionTips":["Do not run two updates concurrently (mount races)","Exclude Zed downloads from antivirus disk-image scanning","Keep free space for the dmg plus the extracted app"],"tags":["macos","hdiutil","dmg","mount","auto-update"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}