zed-industries/zed · error
failed to mount: {:?}
Error message
failed to mount: {:?} What it means
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).
Source
Thrown at crates/auto_update/src/auto_update.rs:1182
let running_app_filename = running_app_path
.file_name()
.with_context(|| format!("invalid running app path {running_app_path:?}"))?;
let mount_path = temp_dir.path().join("Zed");
let mut mounted_app_path: OsString = mount_path.join(running_app_filename).into();
mounted_app_path.push("/");
let mut cmd = new_command("hdiutil");
cmd.args(["attach", "-nobrowse"])
.arg(&downloaded_dmg)
.arg("-mountroot")
.arg(temp_dir.path());
let output = cmd
.output()
.await
.with_context(|| "failed to mount: {cmd}")?;
anyhow::ensure!(
output.status.success(),
"failed to mount: {:?}",
String::from_utf8_lossy(&output.stderr)
);
let unmounter = MacOsUnmounter {
mount_path: mount_path.clone(),
background_executor,
};
let mut cmd = new_command("rsync");
cmd.args(["-av", "--delete", "--exclude", "Icon?"])
.arg(&mounted_app_path)
.arg(&running_app_path);
let rsync_output = cmd.output().await;
// Await the unmount (even if rsync failed) so that the installer temp dir
// can be deleted once this function returns.View on GitHub (pinned to bc538def45)
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.
Defensive patterns
Strategy: retry
Try / catch
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.
Prevention
- 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
When it happens
Trigger: hdiutil attach exits non-zero - corrupt or truncated dmg, another mount in flight, DiskArbitration denied, or a quarantine/Gatekeeper block on the downloaded image.
Common situations: Truncated downloads; security software intercepting disk mounts; macOS notarization/mount policy changes; concurrent updates racing mounts.
Related errors
- Could not auto-update because the required rsync utility was
- failed to copy app: {:?}
- Could not parse screen resolution
- failed to fetch release: {:?}
- failed to download remote server release: {:?}
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/a932c6518ed93ffb.
Report an issue: GitHub.