zed-industries/zed · error · anyhow::Error

Autoupdate failed, rollback successful

Error message

Autoupdate failed, rollback successful

What it means

The update failed partway, but the rollback of every applied job succeeded — the previous version has been restored. This bail is the updater's terminal report: nothing is broken, but the new version is not installed. The launch step is skipped, so the app is not relaunched by the updater.

Solutions

  1. Close all Zed windows/processes and retry the update — the rollback proves the previous install is intact.
  2. Check the updater log for the apply error that triggered rollback and address it (locks, disk space).
  3. Retry later or use the manual full installer if auto-update keeps failing at the same job.
Defensive patterns

Strategy: retry

Try / catch

match run_update(jobs, app_dir).await {
    Err(err) if err.to_string().contains("rollback successful") => {
        notify_user("update failed; previous version restored. retry later");
        Ok(())
    }
    result => result,
}

Prevention

When it happens

Trigger: Any apply failure after at least one successful, non-delete-critical job, where all rollbacks succeed. E.g., a copy/replace job failed on a locked file but earlier jobs were cleanly reversed.

Common situations: A file was locked by a running process mid-update (old version restored); transient disk-full during copy; update downloaded for the wrong architecture/channel and a validation job failed.

Related errors


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/89c73aed8b1ded35. Report an issue: GitHub.

Appendix: source

Thrown at crates/auto_update_helper/src/updater.rs:438

    if last_successful_job
        .map(|job| job != JOBS.len() - 1)
        .unwrap_or(true)
    {
        let Some(last_successful_job) = last_successful_job else {
            anyhow::bail!("Autoupdate failed, nothing to rollback");
        };

        for job in (0..=last_successful_job).rev() {
            let job = &JOBS[job];
            if let Err(e) = (job.rollback)(app_dir) {
                anyhow::bail!(
                    "Job rollback failed, the app might be left in an inconsistent state: ({:?})",
                    e
                );
            }
        }

        anyhow::bail!("Autoupdate failed, rollback successful");
    }

    if launch {
        #[allow(clippy::disallowed_methods, reason = "doesn't run in the main binary")]
        let _child = zed_launch_command(app_dir, launch_arguments)
            .spawn()
            .context("Failed to launch Zed after update")?;
    }
    log::info!("Update completed successfully");
    Ok(())
}

#[cfg(test)]
mod test {
    use std::{ffi::OsString, path::Path};

    use super::{perform_update, zed_launch_command};

View on GitHub (pinned to f4178619ac)