Skip to content

Fix in-app update failure on releases published without an update package - #160

Merged
japperJ merged 1 commit into
masterfrom
japperj-fix-appimage-update-nupkg-lookup
Sep 29, 2026
Merged

japperJ merged 1 commit into
masterfrom
japperj-fix-appimage-update-nupkg-lookup

Conversation

@japperJ

@japperJ japperJ commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Problem

The in-app updater fails with:

Update install failed: Could not find asset called
'WinContainers-0.2.00-beta.1a-beta-full.nupkg' in GitHub Release 'v0.2.00-beta.1a Beta'.

Release v0.2.00-beta.1a was published with no Velopack .nupkg assets at all — only assets.beta.json, releases.beta.json, RELEASES-beta, the portable ZIP, Setup.exe and the checksums manifest. No user could install that update in-app.

Root cause

Two cooperating bugs:

  1. The asset filter failed open. scripts/publish-release.ps1 selected release assets by matching the version against file names. vpk normalizes 0.2.00-beta.1a to 0.2.0-beta.1a when it names its output, so ^WinContainers-0.2.00-beta.1a(?:[-.]|$) matched nothing and the script published a release with zero update packages — without failing.

  2. The tag was not normalized SemVer. The updater derives the expected package name from the raw release tag (0.2.00-beta.1a) while vpk names the files from the normalized version (0.2.0-beta.1a). Those two names can never agree, so a tag like v0.2.00-* can only ever produce an uninstallable release.

tools/test-release-contracts.ps1 permitted leading zeros and never required a full package, so the broken release passed validation.

Fix

  • scripts/publish-release.ps1

    • Rejects tags that are not normalized SemVer (no leading zeros in major/minor/patch).
    • Selects assets from the assets.<channel>.json manifest that vpk writes, which is the authoritative list of the names the updater needs.
    • Requires exactly one Full package and asserts its name is WinContainers-<version>-<channel>-full.nupkg.
    • Fails if a declared asset was not produced, or if any unlisted .nupkg/.zip/.exe would be left behind unpublished.
  • tools/test-release-contracts.ps1

    • Strict SemVer for minimumSupportedVersion and releaseTag.
    • Requires the full update package in the checksum manifest — the check that would have caught this release.
  • src/WinContainers.App/UpdateService.cs

    • Translates Velopack's missing-asset/missing-release failure into an actionable message pointing at the manual installer download, instead of surfacing the raw Velopack text.
  • docs/releases.md documents the tag and asset-selection contract.

Verification

  • dotnet build src/WinContainers.App/WinContainers.App.csproj -c Debug — succeeds.
  • dotnet test tests/WinContainers.Tests.Unit/... — 220 passed, 0 failed.
  • Contract test exercised against good and bad manifests: accepts v0.2.0-beta.1a, v0.1.54-beta.9d, v1.2.3; rejects v0.2.00-beta.1a, a manifest with no full package, and duplicate names.
  • Tag gate exercised: accepts v0.2.0-beta.1a, v1.2.3; rejects v0.2.00-beta.1a, v1.02.3, v1.2.

Follow-up

Delete release/tag v0.2.00-beta.1a and re-publish as v0.2.0-beta.1b — a strictly greater version, so clients on 0.2.00-beta.1a can update in-app rather than seeing the normalized tag as the same version.

A release tagged v0.2.00-beta.1a shipped with no Velopack .nupkg assets, so
the in-app updater failed with "Could not find asset called
'WinContainers-0.2.00-beta.1a-beta-full.nupkg'".

Two causes, both now guarded:

- publish-release.ps1 selected assets by matching the version against file
  names. vpk normalizes 0.2.00-beta.1a to 0.2.0-beta.1a, so neither package
  matched and the filter silently published an uninstallable release. Asset
  selection is now driven by the assets.<channel>.json manifest vpk writes,
  and the run fails if the full package is absent, if a declared asset was not
  produced, or if an unlisted package, ZIP or EXE is left behind.
- The tag regex allowed leading zeros. The updater derives the expected
  package name from the raw tag while vpk names files from the normalized
  version, so the tag must be normalized SemVer. Both the publish script and
  the contract test now reject leading zeros.

test-release-contracts.ps1 additionally requires the full update package in
the checksum manifest, and UpdateService translates Velopack's missing-asset
failure into a message pointing at the manual installer download.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@japperJ
japperJ merged commit 9d1547b into master Sep 29, 2026
1 check passed
@japperJ
japperJ deleted the japperj-fix-appimage-update-nupkg-lookup branch September 29, 2026 21:38
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