[Bug]: Update failed: prepare update: a pending update already exists
Version line
v2 — Go rewrite (1.x), main-v2 (active development)
Exact version
v.1.18.0
What happened?
I am using the desktop version of reasonix on windows. usually when it shows an update, I click download and install, it is quite handy to update a new version. but for the past days, when there's update, I click "install and restart", it shows a message "Update failed: prepare update: a pending update already exists", I am guessing there's a corrupt installation. how to fix it?
Steps to reproduce
- start reasonix by click the icon on the desktop
- on top panel of the screen it displays a message of new update, and I click "install and restart"
OS / platform
windows 11
Relevant logs or output
- click "install and download"
Update failed: prepare update: a pending update already exists
- click Retry:
Update v1.20.0 has been downloaded.
I was able to uninstall 1.18.0, but when I install 1.20.0, it could not proceed. as there's a reasonix is still running. what I did is I restart computer, and I was able to install v1.20.0. But it is still better to address those problems in the handy "install and download" feature.
Fixed and released in v1.21.1.
Fixing PR: #7431 (merge commit f966dc37f9f5)
What changed:
After the install layout moved to versions/<version>/, a stale pending-update.json could permanently block every later update (pending update target is outside the current Guard installation, a pending update already exists, or an unrecoverable reconcile dead-end).
Unusable pending-update markers are now quarantined automatically (renamed to pending-update.json.unusable-*). Rollback material is left untouched, so later updates can proceed without manually deleting the marker.
Verified:
go test ./internal/repair/(includes layout-migration quarantine coverage)
Release availability:
- CLI: https://github.com/esengine/DeepSeek-Reasonix/releases/tag/v1.21.1
- Desktop: https://github.com/esengine/DeepSeek-Reasonix/releases/tag/desktop-v1.21.1
- Changelog: https://reasonix.io/changelog/v1.21.1/
Please upgrade to v1.21.1 and retry the in-app update. If it still fails, reply with the new version and logs.
Still failed to update:prepare update: a pending update already exists. v1.21.2