{"record":{"id":"db4f5b91b651b4e1","repo":"zed-industries/zed","slug":"autoupdate-failed-nothing-to-rollback","errorCode":null,"errorMessage":"Autoupdate failed, nothing to rollback","messagePattern":"Autoupdate failed, nothing to rollback","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/auto_update_helper/src/updater.rs","lineNumber":413,"sourceCode":"                            log::error!(\"Operation failed (retrying): {}\", err);\n                            std::thread::sleep(Duration::from_millis(50));\n                        }\n                    },\n                    None => {\n                        log::error!(\"Operation failed with unexpected error, aborting: {}\", err);\n                        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 _ = std::process::Command::new(app_dir.join(\"Zed.exe\")).spawn();","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/auto_update_helper/src/updater.rs#L395-L431","documentation":"The Windows update helper runs a fixed list of JOBS (staged copy/move operations) with per-job retries and a 2-second budget; when the run aborts and no job ever succeeded (last_successful_job is None), there is nothing to roll back and it bails with this message. The installation is unchanged - the old binary is still in place.","triggerScenarios":"The very first job in JOBS fails - a file-not-found io error aborts immediately, or retries exhaust the 2s budget because files in the app dir are locked by a still-running process or denied by permissions.","commonSituations":"The main Zed process or a lingering remote server still holds handles to files in the app dir; antivirus locking new files; the helper launched with insufficient privileges.","solutions":["Make sure every Zed process has exited (check Task Manager for Zed.exe, zed.exe, remote servers) and retry the update.","Run Zed (and thus the helper) with write access to the app directory.","Temporarily disable antivirus real-time scanning for the app dir and retry.","If it persists, reinstall from zed.dev - nothing was changed, so the old install is safe."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// before invoking the helper, ensure no Zed processes are alive\nterminate_processes([\"Zed.exe\", \"zed.exe\", \"zed-remote-server.exe\"]);","typeGuard":null,"tryCatchPattern":"treat this message as 'no changes were made': keep the current binary, notify 'update failed, will retry later', and schedule a retry once processes have exited.","preventionTips":["Exit the app fully before the helper runs","Grant write access to the app dir","Exclude the app dir from antivirus real-time scanning"],"tags":["windows","auto-update","updater","file-locks"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}