{"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":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/auto_update_helper/src/updater.rs","lineNumber":425,"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 _child = zed_launch_command(app_dir, launch_arguments)","sourceCodeStart":407,"sourceCodeEnd":443,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/auto_update_helper/src/updater.rs#L407-L443","documentation":"After the updater's apply loop, this fires when the update did not complete but no job ever succeeded (`last_successful_job` is `None`). The rollback branch is entered (guarded by `job != JOBS.len() - 1` / `unwrap_or(true)`), finds nothing to roll back, and reports that the very first update step already failed. The installation is typically still in its original state, just not updated.","triggerScenarios":"The first job in `JOBS` fails during apply — e.g., cannot write/move into the app directory because of permissions, disk full, or a locked file — so zero jobs succeeded when the failure path runs.","commonSituations":"Insufficient disk space for the update payload; app directory not writable (installed for another user, or permissions changed); antivirus quarantining the new files; another Zed instance mid-update holding locks.","solutions":["Check the updater log for the first job's error and fix that root cause: free disk space, repair directory permissions, close running instances.","Temporarily disable/reconfigure antivirus realtime scanning of the Zed directory and retry the update.","Retry the auto-update after a reboot (clears stale locks).","If auto-update keeps failing at step zero, install the latest full release manually over the existing app."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Free disk space and verify write permission on the app directory before accepting an update.","Close other Zed instances and exclude the install dir from antivirus before updating.","Monitor updater logs; a first-job failure is always environmental (space/permissions/locks), not model data."],"tags":["auto-update","windows","updater","first-job-failure"],"backgroundTag":"auto-update-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"}