fix(updater): wrap Update instance in markRaw to unblock install#48
Merged
Nic-dorman merged 1 commit intomainfrom Apr 22, 2026
Merged
fix(updater): wrap Update instance in markRaw to unblock install#48Nic-dorman merged 1 commit intomainfrom
Nic-dorman merged 1 commit intomainfrom
Conversation
The Update class returned by @tauri-apps/plugin-updater uses private class fields, which break when Pinia wraps the instance in its reactive Proxy. `_update.downloadAndInstall()` silently no-ops — the dialog looks stuck and nothing downloads. Confirmed end-to-end on a local 0.6.2 build pointed at the production latest.json: before the fix the Update & Restart button did nothing. After wrapping with markRaw, the installer runs, v0.6.6 lands in Program Files, and the auto-relaunch hand-off succeeds (for MSI installs — portable-exe relaunch still fails, but that's a non-issue for real users). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
stores/updater.tsstored theUpdateinstance returned by@tauri-apps/plugin-updaterinto Pinia state. Pinia's reactive Proxy wrapping breaks the class's private fields, so_update.downloadAndInstall()silently no-ops — the dialog opens, user clicks Update & Restart, and nothing happens.markRaw(update)opts the object out of the Proxy wrapping so the class methods execute against the real instance.How this was found
Built a local 0.6.2 binary pointed at the production
latest.jsonon GitHub (on throwaway branchtest/updater-older-version). Banner and dialog both showed v0.6.6 as available. Clicking Update & Restart did nothing. No stderr output, no network activity. Applied themarkRawfix, rebuilt, relaunched 0.6.2 — installer downloaded, v0.6.6 landed inC:\Program Files\Autonomi\.Test plan
Known limitation (not in scope)
If a user launches a portable
.exedirectly (not installed via MSI/NSIS), the updater downloads and runs the installer but can't find the right relaunch target. Real users install the MSI/NSIS so this doesn't affect them. Documented only for internal testing.🤖 Generated with Claude Code