Skip to content

fix(desktop): disable the updater when app-update.yml is missing - #64681

Merged
neriousy merged 1 commit into
devfrom
updater-missing-feed
Nov 18, 2026
Merged

neriousy merged 1 commit into
devfrom
updater-missing-feed

Conversation

@neriousy

@neriousy neriousy commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

Closes #64649

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The desktop updater turned on for any packaged build. electron-updater reads its feed from resources/app-update.yml, and distro packages that update the app themselves remove it (the AUR's opencode-desktop-bin does). Every check then failed with a raw ENOENT toast, and the background check logged the error at startup and every 10 minutes.

The updater now also needs app-update.yml to be present before it turns on. Without it, the updater stays in its existing disabled state, so electron-updater never loads. It logs once that it's disabled, and the app menu's "Check for Updates…" item is greyed out. Official builds are unaffected. electron-builder writes app-update.yml into resources for its auto-updatable targets (dmg/zip, NSIS, AppImage, deb, rpm), script/pack.ts writes it for --dir builds, and the official .deb ships it. A missing file is how packagers turn the updater off: an electron-builder maintainer recommends deleting it to disable auto-update for deb/rpm (electron-builder#8838). electron-updater 6.8.9's own isUpdaterActive() only checks app.isPackaged (plus APPIMAGE for AppImage), so it can't tell us this.

In Settings, the button for a disabled updater now reads "Updates unavailable", and the row says the build is updated outside OpenCode. A check that comes back disabled (for example the hidden check command) shows the same message in a toast instead of nothing. The new strings are in English only; other locales fall back to them.

No feature flag: this is a bug fix.

How did you verify your code works?

  • bun test src/updater and bun typecheck in packages/gui-plugins.
  • Added a test that updaterAction reports the disabled state as unavailable.
  • Not run in a packaged Linux build.

Screenshots / recordings

None.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. I couldn't package the app from source in time, so I patched this PR's app-update.yml check into the official v2.3.2 Linux .deb and ran it headless. With the file removed, the startup check no longer logs the ENOENT error or goes into error. With the file present, the updater still checks and ends up up-to-date. bun test src/updater and tsc -b pass in packages/gui-plugins. Public API: unchanged.

The Settings and toast changes are visible in the UI, but I couldn't capture them. Could you add a before/after screenshot of Settings → Updates on a build without app-update.yml?

Related: #52122

@neriousy
neriousy merged commit 0b87612 into dev Nov 18, 2026
15 checks passed
@neriousy
neriousy deleted the updater-missing-feed branch November 18, 2026 16:48
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
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.

desktop: update check on Linux fails with ENOENT for app-update.yml

1 participant