fix: cancel a stalled portable update download

Open
#1,983 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
desktop

Research direction

The issue describes the change on the fork branch fix/f118-update-download-deadline, including the DownloadUpdateAsync() call, progress window Closed event, and UpdateDownloadDeadlineTests. The fix and tests are already reported as complete, so check the branch and test results rather than starting a second implementation. Done means the download cancels on window close or deadline and a canceled download is not installed.

Written by the indexing model from the issue text.

Description

clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-release-blocker issue-rating: 🦞 diamond lobster no-stale P0

What Problem

A portable update download that receives the response headers and then stalls never finishes. Closing the progress window does not cancel it, and startup stays behind that wait.

Pull request creation is refused for this account (CreatePullRequest FORBIDDEN, REST create 404). Permissions are pull: true and push: false. The branch is on the fork.

Compare: https://github.com/openclaw/openclaw-windows-node/compare/main...SebTardif:fix/f118-update-download-deadline?expand=1

Head: a8e2518215ba93131da1cb6d70ca67e77b704240 on SebTardif:fix/f118-update-download-deadline

User Impact

Closing the download window stops the download. A download that stalls after the headers also stops at a deadline, 10 minutes unless OPENCLAW_UPDATE_DOWNLOAD_TIMEOUT sets another positive number of seconds. A canceled download does not install, and the app continues to start.

Why

DownloadUpdateAsync() was called with no cancellation token. Updatum reads the asset after the headers arrive, so the 100-second HTTP timeout does not cover a stalled body. The progress window had no close signal. The download now receives a token that cancels when that window closes and when the overall deadline ends.

Evidence

UpdateDownloadDeadlineTests passed: blank and invalid values stay at 10 minutes, and 1 and 30 become that many seconds. The tray source passes that token to DownloadUpdateAsync, cancels it from the progress window Closed event, and records a canceled download instead of installing.

./build.ps1 succeeded. Shared tests: 4810 passed, 24 skipped. Tray tests: 4796 passed.

Not verified

The progress window was not opened. A live GitHub download that stalls after the headers was not captured.

Dominant language
C#
Stars
2.2k
Forks
340
Avg merge
3d 11h
Merged PRs (30d)
166

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openclaw/openclaw-windows-node

All issues in openclaw/openclaw-windows-node

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.