8000 [Bug] v0.15.0 release missing latest.yml — auto-updater throws 404 on every launch · Issue #68 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

[Bug] v0.15.0 release missing latest.yml — auto-updater throws 404 on every launch #68

Closed

Description

@Dr-ilies

[Bug] v0.15.0 release missing latest.yml — auto-updater throws 404 on every launch

Summary

Starting with v0.15.0, wmux's bundled electron-updater throws a noisy 404 on every launch because the GitHub release for v0.15.0 is missing the latest.yml metadata file that electron-updater requires.

This is purely cosmetic (the app still works), but the error is printed on startup and every 6 hours thereafter (RECHECK_INTERVAL_MS = 6 * 60 * 60 * 1000 in src/main/updater.ts).

Environment

  • wmux version: v0.15.0
  • OS: Windows 10/11
  • Install method: Release zip (wmux-0.15.0-win-x64.zip)
  • Install location: %LOCALAPPDATA%\wmux\

Steps to reproduce

  1. Download wmux-0.15.0-win-x64.zip from https://github.com/amirlehmam/wmux/releases/tag/v0.15.0
  2. Extract anywhere
  3. Run wmux.exe

Observed output

[wmux] Installed wmux OpenCode plugin to C:\Users\ilies\.config\opencode\plugin\wmux.js
Checking for update
wmux pipe server listening on \\.\pipe\wmux
Error: Error: Cannot find latest.yml in the latest release artifacts
(https://github.com/amirlehmam/wmux/releases/download/v0.15.0/latest.yml): HttpError: 404
  "method: GET url: https://github.com/amirlehmam/wmux/releases/download/v0.15.0/latest.yml
   Please double check that your authentication token is correct..."
[updater] Auto-updater error: Error: Cannot find latest.yml in the latest release artifacts...
  code: 'ERR_UPDATER_CHANNEL_FILE_NOT_FOUND'

Root cause

Looking at the v0.15.0 release: https://github.com/amirlehmam/wmux/releases/tag/v0.15.0

The release ships:

  • wmux-0.15.0-win-x64.zip (the binary)
  • Source code (zip) / Source code (tar.gz) (auto-generated by GitHub)

But it is missing latest.yml, which electron-updater (loaded in src/main/updater.ts via import { autoUpdater } from 'electron-updater') requires to discover update metadata. Without it, electron-updater fetches https://github.com/amirlehmam/wmux/releases/download/v0.15.0/latest.yml and gets a 404.

The autoUpdater.error event listener in initAutoUpdater() (lines 88–90 of src/main/updater.ts) logs the full error, and the error fires on every checkForUpdates() call — which happens on startup and every 6 hours.

Suggested fixes (in order of preference)

1. Ship latest.yml in the release (preferred — the right fix)

electron-builder is configured in electron-builder.json. The release workflow should be generating latest.yml (or latest.yml.gz) and uploading it as a release asset. Verify the build pipeline:

  • In CI, the build step should run electron-builder --win --x64 --publish never (or always) which produces dist/latest.yml alongside the zip.
  • The release workflow should upload dist/latest.yml to the GitHub release as an asset.

Sample latest.yml for v0.15.0:

version: 0.15.0
files:
  - url: wmux-0.15.0-win-x64.zip
    sha512: <sha512 of the zip>
    size: <size in bytes>
path: wmux-0.15.0-win-x64.zip
sha512: <sha512 of the zip>
releaseDate: '2026-07-02T00:00:00.000Z'

For macOS/Linux builds (if/when added), also ship latest-mac.yml and latest-linux.yml as needed.

2. Defensive fix in code: catch + silence the 404

Even with latest.yml shipped, transient GitHub outages or partial releases (e.g. for hot-patch builds) can trigger the same error. Make initAutoUpdater() more defensive:

autoUpdater.on('error', (err) => {
  // Channel-file-not-found is expected when the release doesn't ship
  // latest.yml (e.g. manual/partial releases). Log a warning, not the full stack.
  const msg = err?.message || String(err);
  if (msg.includes('ERR_UPDATER_CHANNEL_FILE_NOT_FOUND') ||
      msg.includes('Cannot find latest.yml')) {
    console.warn('[updater] latest.yml not found in latest release — update check skipped.');
    return;
  }
  console.error('[updater] Auto-updater error:', err);
});

3. Allow disabling the updater via env var

Some users (e.g. air-gapped, corporate, sandboxed) cannot reach GitHub. Add a kill switch:

export function initAutoUpdater(): void {
  if (process.env.WMUX_DISABLE_UPDATER === '1') {
    console.log('[updater] Disabled via WMUX_DISABLE_UPDATER=1');
    return;
  }
  // ...existing code
}

This is consistent with other env-var overrides already in the codebase (e.g. WMUX_MIN_RELEASE_AGE_DAYS).

Workaround for end users (until fixed)

None clean. The error is purely cosmetic. To suppress it locally, you can patch app.asar (not recommended — lost on every reinstall), or downgrade to a release that ships latest.yml.

Related

Priority

Medium — the app functions correctly, but the error spam is a poor first-launch experience and obscures real problems in the user's terminal scrollback.

Activity

  1. added a commit that references this issue on Jul 4, 2026
  2. amirlehmam commented on Jul 4, 2026

    @amirlehmam
    Owner

    Thanks for the outstanding report — root cause, error transcript, and three ranked fixes. All three are implemented and shipped in v0.15.1.

    1. latest.yml is now shipped ✅ (the real fix)

    v0.15.1 ships latest.yml with the sha512 + size of the zip. Since v0.15.1 is now the latest release, existing v0.15.0 installs stop 404ing immediately on their next check (electron-updater resolves the latest release's channel file, not the installed version's) — no action needed on your side.

    You were close on the root cause: there is a CI release workflow that generates latest.yml, but it has silently failed on every tag since v0.8.6 (a package.json/package-lock.json desync broke npm ci — fixed in 16d0100), so recent releases were published by a manual pipeline that skipped that step. latest.yml generation is now a mandatory, checklisted step of the manual release process too, generated from the final zip so the embedded hash always matches.

    2. Defensive handling ✅ (3ae2e14)

    ERR_UPDATER_CHANNEL_FILE_NOT_FOUND / Cannot find latest.yml is now classified as an expected condition: one single-line warning per session —

    [updater] latest.yml not found in latest release — update check skipped.
    

    — instead of the full error dump on startup and every 6-hour recheck. Real updater errors still log in full. The notify-only badge path (update-checker.ts) is unaffected either way.

    3. Kill switch ✅

    WMUX_DISABLE_UPDATER=1 disables the auto-updater entirely (logs [updater] Disabled via WMUX_DISABLE_UPDATER=1 and returns before any network access) — same convention as WMUX_MIN_RELEASE_AGE_DAYS, as you suggested.

    All covered by unit tests (tests/unit/updater.test.ts). Thanks again — reports of this caliber are a pleasure to fix.

  3. amirlehmam commented on Jul 4, 2026

    @amirlehmam
    Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0