{"record":{"id":"9b65cecd6aa16e63","repo":"zed-industries/zed","slug":"job-rollback-failed-the-app-might-be-left-in-an-i","errorCode":null,"errorMessage":"Job rollback failed, the app might be left in an inconsistent state: ({:?})","messagePattern":"Job rollback failed, the app might be left in an inconsistent state: \\((.+?)\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"crates/auto_update_helper/src/updater.rs","lineNumber":431,"sourceCode":"                        break 'outer;\n                    }\n                },\n            }\n        }\n    }\n\n    if last_successful_job\n        .map(|job| job != JOBS.len() - 1)\n        .unwrap_or(true)\n    {\n        let Some(last_successful_job) = last_successful_job else {\n            anyhow::bail!(\"Autoupdate failed, nothing to rollback\");\n        };\n\n        for job in (0..=last_successful_job).rev() {\n            let job = &JOBS[job];\n            if let Err(e) = (job.rollback)(app_dir) {\n                anyhow::bail!(\n                    \"Job rollback failed, the app might be left in an inconsistent state: ({:?})\",\n                    e\n                );\n            }\n        }\n\n        anyhow::bail!(\"Autoupdate failed, rollback successful\");\n    }\n\n    if launch {\n        #[allow(clippy::disallowed_methods, reason = \"doesn't run in the main binary\")]\n        let _child = zed_launch_command(app_dir, launch_arguments)\n            .spawn()\n            .context(\"Failed to launch Zed after update\")?;\n    }\n    log::info!(\"Update completed successfully\");\n    Ok(())\n}","sourceCodeStart":413,"sourceCodeEnd":449,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/auto_update_helper/src/updater.rs#L413-L449","documentation":"The most serious updater outcome: the update failed, and while rolling back the already-applied jobs, one of their rollback closures returned an error. The application directory is now left between two versions — the updater explicitly warns it may be inconsistent and gives up. Usually the underlying error is 144: a delete job cannot be rolled back.","triggerScenarios":"Update fails mid-apply; the rollback loop `(0..=last_successful_job).rev()` hits a job whose rollback errors — most commonly a delete job (always bails, see error 144), or a move/copy rollback failing on a locked file.","commonSituations":"Partial Windows update with files deleted then a later step failing (antivirus locks, disk full, crash), so the rollback cannot restore a consistent install.","solutions":["Download the latest full installer and install it over the broken installation — this is the reliable repair path.","If the installer refuses or the app misbehaves, uninstall Zed (keeping settings) and reinstall cleanly.","Check the updater log to see which rollback failed and whether data directories were touched (they are not part of JOBS).","Prevent recurrence: ensure disk space and AV exclusions before accepting updates."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["After this error, assume the install is inconsistent: repair with a full installer rather than retrying incremental update.","Order destructive jobs last so rollback never hits a delete (root cause of the wrapped 144 error).","Keep user data (settings) outside the app directory — JOBS only touch the install tree, so a clean reinstall is safe."],"tags":["auto-update","windows","rollback","corrupt-install","updater"],"backgroundTag":"update-rollback-failed","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}