Skip to content

fix(desktop): pin the NSIS artifact name so the Windows updater stops 404ing (#10947) - #10958

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.50from
ntdat812:fix/windows-updater-artifact-name-10947
Aug 21, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.50from
ntdat812:fix/windows-updater-artifact-name-10947

Conversation

@ntdat812

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #9985

Fixes #10947.

Problem

GitHub rewrites spaces in an uploaded asset name to .. electron-builder writes that same artifact name into latest.yml with -. NSIS carries the one default artifact name that contains spaces — ${productName} Setup ${version}.${ext} — so the manifest and the published asset can never agree, and the in-app updater 404s on every release.

Measured on the published v3.8.49 release, not inferred:

manifest url asset actually on the release
latest.yml OmniRoute-Setup-3.8.49.exe OmniRoute.Setup.3.8.49.exe ❌
latest-linux.yml OmniRoute-3.8.49.AppImage OmniRoute-3.8.49.AppImage ✅
latest-linux.yml omniroute-desktop_3.8.49_amd64.deb omniroute-desktop_3.8.49_amd64.deb ✅
latest-mac.yml OmniRoute-3.8.49.dmg OmniRoute-3.8.49.dmg ✅

The Windows entry's size: 340441395 matches the uploaded OmniRoute.Setup.3.8.49.exe byte for byte — same file, two spellings. Linux and macOS are unaffected because the AppImage, deb and dmg defaults are already hyphen/underscore separated.

That closes the chain end to end: electron-builder emits OmniRoute Setup 3.8.49.exe locally → writes - into the manifest → softprops/action-gh-release uploads it → GitHub stores . → electron-updater requests the - name → 404.

Change

One line — an explicit nsis.artifactName.

"nsis": {
  "artifactName": "${productName}.Setup.${version}.${ext}",

Pinned to the dot form on purpose, not a hyphen one. A hyphen name would also fix the updater, but it would rename the published asset, and three places hardcode the current name:

  • src/app/(dashboard)/dashboard/HomePageClient.tsx:151 — the manual Download EXE (Windows) button, which is the workaround the issue reports as still working
  • docs/guides/TROUBLESHOOTING.md and its zh-TW / pl mirrors — the sha512 verification snippet
  • electron/README.md

With the dot form the asset name is byte-identical to what ships today; only latest.yml changes, from the wrong name to the right one. Nothing that currently works breaks.

docs/guides/ELECTRON_GUIDE.md (and its pl mirror) listed the local build output as OmniRoute Setup X.Y.Z.exe; that line is now correct for the new name.

Verification, and its limit

Stated plainly: I could not run the release pipeline. Producing the artifact needs a full electron-builder Windows build plus a GitHub upload, so the fix is verified by the naming chain above rather than by a built installer. What makes it conclusive is that latest.yml in v3.8.49 already contains OmniRoute-Setup-3.8.49.exe — that string is the manifest writer's output for a space-containing name. Removing the spaces makes the file name and the manifest name the same string by construction, and the manifest value stops changing under GitHub's rewrite.

What I did verify, tests/unit/electron-artifact-name-10947.test.ts (new, 4 cases):

  • nsis.artifactName is set and contains no whitespace, with the reason in the assertion message
  • it still contains Setup — the release workflow picks the portable exe via case "$file" in *Setup*) continue ;;, so renaming it away from Setup would silently publish the installer as OmniRoute.exe
  • the expanded installer name equals the filename HomePageClient.tsx builds its download URL from — two independent sources of truth for the same string, which is exactly the invariant that was broken
  • no configured artifact name anywhere in the build config contains whitespace

Reverting only electron/package.json: 3 of 4 fail. All 4 pass with the change. The 4th passes either way — no other target has a whitespace name today, and it is there to keep it that way.

Regression sweep: all 33 unit test files matching electron — 282 tests. Comparing failing test names against the same run with the config reverted:

base   12 failing
branch  9 failing
tests failing on the branch but not on base: none

(The 9 shared failures are pre-existing Windows/symlink environment ones — materializeBundledSymlinks, resolveServerEntry, #7302 DATA_DIR/server.env.)

typecheck:core exit 0, eslint clean, check:changelog-integrity OK.

The next release is the real test. If you would rather verify before merging, a --win build alone is enough — the name appears in electron/dist-electron/ without publishing anything.

@ntdat812
ntdat812 requested a review from diegosouzapw as a code owner August 21, 2026 07:22
… 404ing (cheaper-inference#10947)

GitHub rewrites spaces in an uploaded asset name to '.', while electron-builder
writes the same artifact name into latest.yml with '-'. NSIS carried the one
default artifact name that contains spaces, so the two never agreed. On the
published v3.8.49 release:

  latest.yml       url: OmniRoute-Setup-3.8.49.exe
  uploaded asset        OmniRoute.Setup.3.8.49.exe   (identical size, 340441395)

  latest-linux.yml url: OmniRoute-3.8.49.AppImage  -> asset matches verbatim
  latest-mac.yml   url: OmniRoute-3.8.49.dmg       -> asset matches verbatim

Only Windows breaks: the AppImage, dmg and deb defaults are already
hyphen/underscore separated.

Pinned to the DOT form, not a hyphen one, so the published asset keeps the exact
name it has today. The dashboard's manual 'Download EXE' link
(HomePageClient.tsx) and the TROUBLESHOOTING guides all hardcode
OmniRoute.Setup.<version>.exe, and a hyphen rename would have broken the very
workaround the issue reports as still working.
@ntdat812

Copy link
Copy Markdown
Contributor Author

CI ran the four new cases on Linux and all four pass (shard 3/4):

✔ #10947 the NSIS installer name is set explicitly and carries no space (1.0ms)
✔ #10947 the NSIS name still contains 'Setup' (0.3ms)
✔ #10947 the built installer name is the one the dashboard links to (0.8ms)
✔ #10947 no configured artifact name anywhere contains whitespace (0.2ms)

The shard failures are the same base-red set documented on #10935 — check-docs-counts-sync (5 STRICT provider-count drifts present on base HEAD with nothing applied) and the openapiCoverage.pct: 38.6 < baseline 39.2 ratchet, which base itself produces. This PR touches no route.ts and no provider registry.

Merge integrity, Change Classification, Vitest, Build, semgrep and dast-smoke all pass.

@diegosouzapw
diegosouzapw merged commit 1c1e45c into cheaper-inference:release/v3.8.50 Aug 21, 2026
9 of 16 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… 404ing (cheaper-inference#10947) (cheaper-inference#10958)

Validado no worktree combinado: mesmos gates + teste focado verde. Root cause medido na release publicada v3.8.49 (nome de artefato NSIS com espaço vs. hífen no manifest). CI vermelho é o base-red já rastreado em cheaper-inference#9985.
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.

[Bug] Windows auto-update 404 due to incorrect installer filename

2 participants