zed-industries/zed · error
failed to copy app
Error message
failed to copy app: {:?} What it means
install_release_macos rsyncs the mounted app bundle over the running .app and then awaits the unmount; if the rsync child process failed to even run (its output is wrapped with 'failed to rsync'), the error 'failed to copy app' reports the non-zero outcome, meaning the update payload could not be synced onto the installed app bundle.
Solutions
- Ensure rsync is installed (macOS updates depend on it) and retry the update
- Check that the running .app path is writable and not quarantined by Gatekeeper mid-copy
- Free disk space and retry if the bundle copy was partial
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/auto_update/src/auto_update.rs:1233 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20).
Data as JSON: /api/errors/c40f2bb7af2ce26f.
Report an issue: GitHub.
Appendix: source
Thrown at crates/auto_update/src/auto_update.rs:1244
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.
unmounter.unmount().await;
let output = rsync_output.with_context(|| "failed to rsync: {cmd}")?;
anyhow::ensure!(
output.status.success(),
"failed to copy app: {:?}",
String::from_utf8_lossy(&output.stderr)
);
Ok(None)
}
/// Removes stale installer dirs from the system temp dir. Older Zed versions
/// leaked one per update by deleting the dir while the downloaded disk image
/// was still mounted inside it, which made the deletion fail silently.
#[cfg(any(rust_analyzer, all(not(target_os = "windows"), not(test))))]
async fn cleanup_stale_installer_dirs() {
const STALE_INSTALLER_DIR_AGE: Duration = Duration::from_secs(24 * 60 * 60);
let temp_dir = std::env::temp_dir();
let Ok(mut entries) = fs::read_dir(&temp_dir).await else {
log::warn!("failed to read temp dir {temp_dir:?} while cleaning up installer dirs");View on GitHub (pinned to 916fc2b8cb)