Skip to content

fix(store): stamp our update_url into the .crx, so installs can update - #65

Merged
ralyodio merged 2 commits into
mainfrom
store-crx-update-url
Aug 1, 2026
Merged

fix(store): stamp our update_url into the .crx, so installs can update#65
ralyodio merged 2 commits into
mainfrom
store-crx-update-url

Conversation

@ralyodio

@ralyodio ralyodio commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Why

Chased down "still getting CoinPay Wallet v0.9.0". Every server-side link is already correct:

Link Version
coinpayportal master 0.9.2
GitHub release extension-v0.9.2 asset 0.9.2 (verified)
Store listing (/api/store/extensions/coinpay-wallet) 0.9.2, live
gupdate feed (/api/store/updates.xml) advertises 0.9.2
download.crx CRX3, manifest 0.9.2

The break is on the client. Chromium polls the update_url baked into the installed manifest — it never consults the feed the store advertises. CoinPay Wallet's manifest has no update_url (neither does its zip), so every install pins itself to the version it was first given, and the store's correct updates.xml is never fetched by anyone.

routes.ts even documents the assumption — "Extensions set update_url… in their manifest" — but nothing enforces or supplies it, and publishers write their manifest long before they list here.

What

packCrx signed the publisher's zip bytes verbatim. Since the .crx is packed on demand and the route already knows the feed URL, stampUpdateUrl now rewrites manifest.json to point at it, before signing (the CRX3 signature covers the zip bytes).

Overwriting a publisher's own update_url is deliberate: the extension id is derived from the store's signing key, so only the store's feed can serve an update Chromium will accept for that id — a foreign update_url points at a different id and silently does nothing.

Verification

  • services/api store suite: 52/52 pass (5 new cases), tsc --noEmit clean.
  • End-to-end against the real published CoinPay Wallet 0.9.2 bundle: all 13 files stay byte-identical, only the 7 empty directory entries drop (Chromium recreates those from file paths), and the packed .crx carries the feed URL with the version intact.

Caveat

This cannot rescue already-installed copies — they have no update_url to poll, so they stay put. Existing installs need one manual reinstall to get onto the update channel; everything installed after this lands updates on its own.

🤖 Generated with Claude Code

ralyodio and others added 2 commits August 1, 2026 06:03
#62 pruned them from build-release.sh, which covers linux/macos/deb/rpm/
AppImage. The Windows job stages separately with Copy-Item -Recurse and
kept shipping them: v3.8.9's tronbrowser-win-x64.zip contains
moshpit.test.js (12077B) and moshpit-drift.test.js (4106B).

Mirror the prune in the pwsh path so every platform matches.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Chromium polls the update_url baked into the installed manifest — it never
consults the feed the store advertises on the listing page. Most publishers
omit it (it points at us, and they write their manifest long before they
list here), so a store install pinned itself to whatever version it was
installed at and never moved again, while the store served a correct
updates.xml that nothing ever asked for.

CoinPay Wallet is the live case: the store, its gupdate feed and the packed
.crx are all at 0.9.2, but the shipped manifest has no update_url, so every
existing install sits on the version it was first given.

The .crx is packed on demand and we already know the feed URL, so set it
there, before signing (the CRX3 signature covers the zip bytes). Overwriting
a publisher's own update_url is deliberate: the id comes from the store's
signing key, and only our feed can serve an update Chromium accepts for it.

Verified against the real published 0.9.2 bundle: all 13 files stay
byte-identical, only the empty directory entries drop (Chromium recreates
those from the paths), and the resulting .crx carries the feed URL.

Note this cannot rescue already-installed copies — they have no update_url
to poll, so they need one manual reinstall to get onto the channel.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio marked this pull request as ready for review August 1, 2026 08:50
@ralyodio
ralyodio merged commit 6423fdf into main Aug 1, 2026
6 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.

1 participant