Repository navigation
Description
Summary
On a slow or unstable link, an in-app update cannot complete at all: before installing anything, the preflight has to download the release's pinned omp runner (~239 MB) in a single pass with a 15-minute cap and no resume. When that transfer fails, the update aborts with fetch-omp failed, nothing is installed, and the user stays on the old version — pressing 重试 repeats the same doomed transfer.
Observed on 0.7.1 → 0.7.2, stage 停止由 ompweb 管理的会话:
the new release could not fetch its omp: fetch-omp failed: Could not fetch
ompweb's omp from https://github.com/ompweb-dev/oh-my-pi/releases/download/
v18.22.0-int.202611172157.ga645f02/ompweb-omp-windows-x64.exe: fetch failed.
The app itself was healthy before and after (HTTP 200, /api/hosts online) — only the update is blocked.
Why it cannot get through
- Every release pins a runner in
omp-runner.json({"repo":"ompweb-dev/oh-my-pi","tag":"v18.22.0-int.202611172157.ga645f02"}), and the update preflight downloads it before cutover. - Asset:
ompweb-omp-windows-x64.exe, 250,826,752 bytes, verified againstompweb-omp.sha256(a83c304f…b8a4162). DOWNLOAD_TIMEOUT_MS = 15 * 60 * 1000(lib/hosts/update-worker.ts:27),HOST_RELEASE_MAX_MEMBER = 512 MB(:25), and a dropped connection restarts from byte 0 — the.partialis discarded.
Throughput measured on this machine: direct GitHub ~87 KB/s, through a local HTTP proxy ~309 KB/s, third-party mirrors 625–827 KB/s. 239 MB within 15 minutes needs ≥270 KB/s sustained and a connection that never drops; neither holds here, so the preflight fails every time.
Workaround that works (may be worth documenting)
Pre-seed the pinned runner where fetchedOmpBin() looks for it, then use the normal update:
%USERPROFILE%\.omp\agent\omp-web\omp\0.7.2\<tag>\ompweb-omp.exe
The file must hash to the value in ompweb-omp.sha256; --runner-info then reports {"protocol":1,"omp":"…"}. With the runner in place, POST /api/app-update prepare/commit finished 0.7.1 → 0.7.2 in about 2 minutes.
Suggestions
- Do not download the runner in the update preflight. Cut over first and let the app fetch it on demand (routes already retry) or on idle; a missing runner should not block an update that is otherwise ready.
- Make the download resumable (HTTP
Range+ keep the.partial), so a slow link still converges across attempts. - If the runner still has to be fetched up front, surface the size, the expected sha256 and the target path in the error, so pre-seeding or a mirror is discoverable — the current message truncates and only suggests
npm install -g @kahme247/ompweb. - Consider a per-attempt budget that scales with observed throughput instead of a fixed 15 minutes.
Environment
- Windows 11, node v25.9.0, npm 11.12.1, ompweb 0.7.1 → 0.7.2 (npm global install, tray + host daemon)
- Network: GitHub reachable only through a TUN proxy (
github.comresolves to198.18.0.23); direct throughput ~87 KB/s
Activity
fix(updates): build the tray at release and resume omp runner downloads
chore(release): 0.7.3
chore(release): 0.7.3 (#534)
fix(updates): build the tray at release and resume omp runner downloa…