Skip to content

fix(update): bundle app-update.yml so electron-updater can install (forge omits it)#2244

Merged
Priyanchew merged 6 commits into
AgentWrapper:mainfrom
harshitsinghbhandari:fix/app-update-yml
Jun 28, 2026
Merged

fix(update): bundle app-update.yml so electron-updater can install (forge omits it)#2244
Priyanchew merged 6 commits into
AgentWrapper:mainfrom
harshitsinghbhandari:fix/app-update-yml

Conversation

@harshitsinghbhandari

Copy link
Copy Markdown
Collaborator

What / why

Critical auto-update bug: electron-updater detects a release but crashes during download/install with ENOENT ... Contents/Resources/app-update.yml. electron-forge (unlike electron-builder) never generates app-update.yml, which electron-updater requires at runtime. The #2221 design assumed setFeedURL(...) alone was enough; a real fork build's log disproves it:

Checking for update
Found version 0.10.6 (url: Agent.Orchestrator-darwin-arm64-0.10.6.zip)
Downloading update from Agent.Orchestrator-darwin-arm64-0.10.6.zip
Error: ENOENT: no such file or directory, open '/Applications/Agent Orchestrator.app/Contents/Resources/app-update.yml'

This affects every forge build, prod included: updates are found but never install.

Fix

  • forge.config.ts: a postPackage hook writes app-update.yml (provider github + owner/repo from the existing parseReleaseRepo(AO_RELEASE_REPO) + updaterCacheDirName) into each packaged app's resources dir (mac: <App>.app/Contents/Resources, win/linux: resources/). The repo is baked at build time, so a build auto-updates from whatever repo it was published to.
  • auto-updater.ts: drop the runtime setFeedURL/repo() override (which read the absent AO_RELEASE_REPO env and wrongly defaulted to prod in installed apps). configureFeed now only sets channel + allowDowngrade; electron-updater loads the bundled app-update.yml. This also removes the need for any runtime env to point a fork build at the fork.

Verification

  • typecheck clean; update-settings vitest green.
  • The packaged-app write is CI-verifiable only (local npm run package is a no-op on the build host, pre-existing). Validated by a fresh fork build: confirm app-update.yml is in the .app and an installed older build updates to completion.

🤖 Generated with Claude Code

harshitsinghbhandari and others added 5 commits June 27, 2026 23:45
…eedURL

electron-forge does not emit app-update.yml; electron-updater requires it at
process.resourcesPath to resolve the GitHub release feed. Without it every
packaged app threw ENOENT on the first download attempt, making updates
detected but never installed.

Two-part fix:
- forge.config.ts: add postPackage hook that writes app-update.yml into
  each platform's Resources dir (baked from AO_RELEASE_REPO so fork builds
  point at the fork, prod at AgentWrapper/agent-orchestrator).
- auto-updater.ts: remove setFeedURL + repo() + DEFAULT_RELEASE_REPO;
  configureFeed now only sets channel + allowDowngrade. electron-updater
  auto-loads the bundled yml on the first checkForUpdates call.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The postPackage hook wrote app-update.yml into Contents/Resources AFTER osxSign
sealed the bundle, so the added file was unsealed and macOS reported the app as
"damaged" (codesign: "a sealed resource is missing or invalid"). Generate it in
a prePackage hook and ship it via packagerConfig.extraResource, so it is copied
into the bundle and signed as part of the seal. The generated app-update.yml is
gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
macos-13 is deprecated and has no runner capacity (multi-hour queues),
so the detached release-intel leg never completed. Switch it to the
supported macos-15-intel image in both the release and nightly workflows.

Now that the Intel leg gets a runner and builds + signs the x64 installer
reliably (verified on fork v0.10.10), re-couple it into publish-feed
(needs: [release, release-intel]) so latest-mac.yml / nightly-mac.yml
always carry the x64 entry and Intel macOS users receive auto-updates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	.github/workflows/frontend-release.yml

@Priyanchew Priyanchew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Priyanchew Priyanchew merged commit 965e388 into AgentWrapper:main Jun 28, 2026
2 checks passed
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.

2 participants