esir_tech on Discord: after clicking Update the progress sat on 17% and
looked stuck. Cause: nothing watched a download that stopped sending. A
connection GitHub's asset host keeps open but silent (seen from some
networks) held the percent still until the client's 10-minute timeout,
then failed. The waits between retries showed the same still percent, and
after the bytes the Mac's unpack and codesign check showed a stale 100%.
- internal/update: fetch cancels a body that sends nothing for 30s
(stallAfter) as a network error, so download's existing retry resumes it
with Range. A step callback (update.WithStep) names download, retry,
verify, unpack and signature.
- internal/gui: /api/update's downloading answer carries step, and speed
(bytes/s over the last ~5s; it falls to 0 when bytes stop).
- app.js: the pill says "Downloading… 50% · 1.5 MB/s", "Reconnecting…",
then "Verifying…", "Unpacking…", "Checking signature…"; its tooltip
carries the text where the tight header hides it. Settings' Version row
says the same after its MB count. i18n in zh, zh-TW, ja, de. Comments
cut to stay under the core script budget (not raised).
Run on mote (mote-run):
- go test ./internal/update ./internal/gui -run 'TestDownload|TestUpdate|TestStage|Budget': ok
- new: TestDownloadStallIsTriedAgain, TestDownloadStallEveryTimeSaysSo,
TestUpdateDownloadSaysStepAndSpeed, TestUpdateSpeedFallsWhenStalled
- GUI, chromium and webkit: update-download-steps (new: en, zh, zh-TW, ja,
de at 900 and 420px), update-download-percent, update-download,
update-row-steady, update-stuck, update-network, update-mirror: 178 pass
- i18n-en-no-cjk, header-relang: pass. i18n-keys "a plugin's words are
its own" is red on origin/main 0d70f335e too (plugins/library,
routing, usage i18n.js vs Go strings), untouched here.
- gofmt -l; go vet ./...; GOOS=linux go vet -tags nogui ./...;
GOOS=windows go vet ./...: clean
Broken by hand: with the idle timer a no-op, TestDownloadStallIsTriedAgain
and TestDownloadStallEveryTimeSaysSo fail at their 20s bound (context
deadline exceeded); with speed left out of the answer
TestUpdateDownloadSaysStepAndSpeed fails ("never said how fast"); on the
old app.js/i18n.js update-download-steps fails in every case.
Not tried: a real update on a stalling network, a real Mac unpack and
codesign step (tests cover download/verify only), Windows/Linux runs.
The 10-minute total cap (client Timeout, GUI run ctx, CLI update) is
unchanged, so a moving download slower than ~140KB/s for the 83MB
Windows exe still fails at 10 minutes.
Reported-by: esir_tech