Skip to content

fix: use autoUpdater.quitAndInstall() on macOS to apply updates - #62

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-updates
Mar 23, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-updates

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

  • Bug: Clicking "Restart Now" after an update download on macOS restarts the app but doesn't actually install the update — the old version keeps running
  • Root cause: Commit c17a985 replaced autoUpdater.quitAndInstall() with app.relaunch() + app.quit() on macOS to avoid a crash dialog, but this creates a race condition where the app relaunches before electron-updater's installer script replaces the .app bundle
  • Fix: Use autoUpdater.quitAndInstall() on all platforms, with proper cleanup beforehand (kill PTY processes, flush persistence store, destroy all windows) to ensure a clean exit without crash dialogs

Test plan

  • Build a macOS release with a lower version number, install it, then publish a new release and verify "Restart Now" applies the update
  • Verify no "quit unexpectedly" crash dialog appears after restart
  • Verify Windows update flow still works

🤖 Generated with Claude Code

The previous approach used app.relaunch() + app.quit() to avoid a crash
dialog, but this created a race condition where the app relaunches the
old version before electron-updater's installer replaces the .app bundle.

Instead, use autoUpdater.quitAndInstall() on all platforms with proper
cleanup beforehand (kill PTY processes, flush store, destroy windows) to
ensure a clean exit without crash dialogs.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@nwparker
nwparker force-pushed the nwparker/fix-updates branch from 1c2f053 to 7ed735c Compare March 23, 2026 23:39
@nwparker
nwparker merged commit 90d1da8 into main Mar 23, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…tes (stablyai#62)

The previous approach used app.relaunch() + app.quit() to avoid a crash
dialog, but this created a race condition where the app relaunches the
old version before electron-updater's installer replaces the .app bundle.

Instead, use autoUpdater.quitAndInstall() on all platforms with proper
cleanup beforehand (kill PTY processes, flush store, destroy windows) to
ensure a clean exit without crash dialogs.

Co-authored-by: Claude Opus 4.6 <[email protected]>
cmungall added a commit to normalform-ai/orca that referenced this pull request Nov 29, 2026
Replace the interim CLAUZ3_DOT_DECISION_TOKEN pty-env route with clauz3's host
handoff (normalform-ai/clauz3#62). Main makes a private FIFO, opens its read end,
and launches `clauz3 start claude --no-browser --approver-key-fd 3 ... 3>'<fifo>'`.
clauz3 picks its own port, writes {origin, key, login_url} to fd 3 once ready and
closes it before the agent starts; main reads the line, removes the FIFO, and only
then registers the session. The key is never in env, argv, the pty or on disk, and
an undelivered key registers nothing (fail closed). ORCA_CLAUZ3_COMMAND can point
Orca at a clauz3 build with stablyai#62 until it merges.

Normalform-Patch: fork-clauz3-approval-panel

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cmungall added a commit to normalform-ai/orca that referenced this pull request Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant