zed-industries/zed · critical

Job rollback failed, the app might be left in an inconsisten

Error message

Job rollback failed, the app might be left in an inconsistent state: ({:?})

What it means

After a job failure, the helper rolls completed jobs back in reverse order; if any job's rollback closure itself errors, it bails with this message. The app directory may now be a mix of old and new files - this is the one state where the install can be left inconsistent.

Source

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

                        break 'outer;
                    }
                },
            }
        }
    }

    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 _ = std::process::Command::new(app_dir.join("Zed.exe")).spawn();
    }
    log::info!("Update completed successfully");
    Ok(())
}

#[cfg(test)]

View on GitHub (pinned to bc538def45)

Solutions

  1. Repair the install: download the current release from zed.dev and install over the broken copy.
  2. Check for and remove leftover install/old staging directories in the app dir after repairing.
  3. Add antivirus exclusions for the Zed app directory before retrying updates.
  4. Preserve the helper log and report the incident to Zed.
Defensive patterns

Strategy: fallback

Try / catch

this is the dangerous case: detect it and immediately offer a repair path - reinstall the current release over the inconsistent directory; never continue running the mixed install or attempt further updates on top of it.

Prevention

When it happens

Trigger: Job N fails, then rolling back job M <= last_successful_job hits an error - typically a file locked by antivirus or Explorer mid-restore, permission denied, or a partially deleted file.

Common situations: Endpoint protection interfering during rollback; the old binary restarted while rollback was in flight; disk errors.

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/9b65cecd6aa16e63. Report an issue: GitHub.