Skip to content

Setup fails at wsl-create step: Wsl/InstallDistro/0x800072f78 on Windows 26200 + WSL 2.7.3 #1050

Closed

Description

@simonxk

Title: Setup fails at wsl-create step: Wsl/InstallDistro/0x800072f78 on Windows 26200 + WSL 2.7.3

Describe the bug
OpenClawTray setup pipeline fails consistently at the "Create WSL instance" step. The installer attempts wsl --install --distribution Ubuntu-24.04 --name OpenClawGateway --location %LOCALAPPDATA%\OpenClawTray\wsl\OpenClawGateway --no-launch --web-download, which exits with code -1 after ~62 seconds. Error detail: Wsl/InstallDistro/0x800072f78.

A manual workaround (wsl --import OpenClawGateway ...) succeeds, but the installer's cleanup-distro step detects the manually-created distro as "stale" and unregisters it before re-attempting the same failing wsl --install command.

To Reproduce

  1. Windows 10.0.26200.0 (64-bit), WSL version 2.7.3.0
  2. Existing WSL distro: Ubuntu-24.04 (working normally)
  3. Run OpenClawTray setup → pipeline fails at step 7/17 (wsl-create)

Expected behavior
Setup should either succeed at creating the WSL distro, or detect a manually-imported distro and skip the creation step.

Logs
Attached: setup-engine-20260724-154855.jsonl
Key lines:

  • Line 16: Detects existing OpenClawGateway, decides to terminate and unregister it
  • Line 35-37: Re-attempts wsl --install ... --location %LOCALAPPDATA%\... --web-download, fails after 62157ms with exit -1
  • Line 40: Step marked Failed: Fresh WSL install failed ... Wsl/InstallDistro/0x800072f78

Additional context

  • Port 18789 is available
  • Existing Ubuntu-24.04 WSL distro works fine (wsl -d Ubuntu-24.04 succeeds)
  • Manual wsl --import to the same target path works, but installer deletes it on next run
  • WSL kernel: 6.6.114.1-1
  • Log files at %APPDATA%\OpenClawTray\Logs\Setup\setup-engine-20260724-*.jsonl

Activity

  1. added
    P0
    impact:data-loss
    impact:ux-release-blocker
    issue-rating: 🐚 platinum hermit
    clawsweeper:needs-live-repro
    clawsweeper:no-new-fix-pr
    clawsweeper:needs-maintainer-review
    clawsweeper:needs-product-decision
    on Jul 24, 2026
  2. clawsweeper commented on Jul 24, 2026

    @clawsweeper

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 25, 2026, 7:54 PM ET / 23:54 UTC.

    Summary
    Keep open. The merged safety fix prevents automatic deletion of a manually imported distro, but current setup still relies on WSL's online download and does not offer a supported way to continue with that imported distro after the reported download failure.

    Reproducibility: no. for the original WSL HTTP failure without the reporter's Windows network environment. Source reproduces the remaining behavior: an unowned manually imported same-named distro is preserved and setup stops rather than adopting it.

    Root-cause cluster
    Relationship: canonical
    Canonical: #1050
    Summary: The merged cleanup fix resolves the destructive subproblem, while this issue remains the canonical report for the unsupported recovery after WSL download failure.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Maintainer decision needed

    Question Recommendation
    Should local onboarding support an explicitly confirmed adoption or offline-import recovery path for a manually prepared WSL gateway after WSL web download fails? Add a confirmed recovery flow: Design a narrow setup recovery that validates a prepared gateway image and requires explicit user consent before treating it as managed.

    Why: Current main deliberately preserves unproven distros, but the remaining recovery path requires deciding what evidence and configuration work make an imported WSL environment safe to manage.

    Next step
    A maintainer must choose the supported ownership and recovery policy before implementation can safely proceed.

    Review details

    Best possible solution:

    Add a supported, user-confirmed in-product recovery path for WSL download failure that either validates and adopts a prepared gateway image or directs the user to a safe alternative without deleting their distro.

    Do we have a high-confidence way to reproduce the issue?

    No for the original WSL HTTP failure without the reporter's Windows network environment. Source reproduces the remaining behavior: an unowned manually imported same-named distro is preserved and setup stops rather than adopting it.

    Is this the best way to solve the issue?

    Unclear. The merged ownership gate is the right destructive-safety fix, but it does not provide the requested usable recovery path; its adoption policy needs maintainer direction.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Automatically adopting a same-named imported distro could run managed gateway configuration against an unproven WSL environment; the current fail-closed ownership rule is intentional and should not be bypassed implicitly.

    Codex review notes: model internal, reasoning high; reviewed against d938fc2bbf78.

    Label changes

    Label changes:

    • remove impact:data-loss: Current review impact labels are impact:ux-release-blocker.

    Label justifications:

    • P0: A first-time local setup can be blocked by WSL's download path without an in-product continuation.
    • impact:ux-release-blocker: The reported recovery requires manual WSL operations and is not available through the setup UI.
    Evidence reviewed

    What I checked:

    • Current installer still requires WSL web download: The direct-install argument builder unconditionally includes --web-download, so the reported WSL download failure has no alternate setup path on current main. (src/OpenClaw.SetupEngine/SetupSteps.cs:179, d938fc2bbf78)
    • Manual import is preserved but not adopted: A same-named unowned distro now returns a terminal preservation result before unregistering; setup therefore does not proceed by reusing the imported distro. (src/OpenClaw.SetupEngine/CleanupStaleDistroStep.cs:57, d938fc2bbf78)
    • Regression coverage confirms the safety behavior: The focused test asserts that an unowned registered OpenClawGateway is preserved and that setup asks for explicit confirmation rather than issuing termination or unregister commands. (tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs:530, d938fc2bbf78)
    • Documented product boundary: Current onboarding documentation explicitly says setup fails when WSL cannot create the named managed distro directly, while preserving an unproven same-named distro unless replacement is explicitly confirmed. (docs/ONBOARDING_WIZARD.md:27, d938fc2bbf78)
    • Merged partial fix provenance: The formally linked merged PR introduced the ownership gate, but its scope is destructive cleanup safety rather than an alternative WSL download or adoption path. (src/OpenClaw.SetupEngine/ManagedDistroOwnership.cs:8, 787db18f3874)
    • Release status: The latest available release commit predates the merged cleanup fix; git tag --contains returned no release tag for the fix, so that safety change is current-main-only. (787db18f3874)

    Likely related people:

    • Scott Hanselman: Introduced the current managed-distro ownership gate in the merged fix linked to this issue. (role: merged ownership-safety fix author; confidence: high; commits: 787db18f3874; files: src/OpenClaw.SetupEngine/ManagedDistroOwnership.cs, src/OpenClaw.SetupEngine/CleanupStaleDistroStep.cs)
    • Barbara Kudiess: Authored the preceding setup-step refactor that remains the surrounding ownership and WSL lifecycle surface. (role: recent setup refactor author; confidence: high; commits: b37307cbd51f; files: src/OpenClaw.SetupEngine/CreateWslInstanceStep.cs, src/OpenClaw.SetupEngine/CleanupStaleDistroStep.cs)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  3. bkudiess commented on Jul 28, 2026

    @bkudiess
    Collaborator

    Thanks for the detailed report. I traced 0x80072F78 to WSL’s online distro download path. Microsoft defines it as an HTTP response that could not be parsed. WSL downloads and verifies the Ubuntu .wsl image before applying the requested name and location, while your local wsl --import succeeds because it bypasses that network path.

    We also confirmed a Windows-node recovery bug: retry cleanup can unregister your manually imported OpenClawGateway. The fix here should preserve an existing distro unless setup can prove it owns it, and report the WSL download-stage failure more clearly.

    To help identify what caused the original download response failure, could you share the redacted output from:

    curl.exe -I -L -v https://releases.ubuntu.com/24.04.4/ubuntu-24.04.4-wsl-amd64.wsl

    curl.exe -I -L https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json

  4. added
    issue-rating: 🦪 silver shellfish
    and removed
    issue-rating: 🐚 platinum hermit
    clawsweeper:needs-live-repro
    on Jul 30, 2026
  5. 13 remaining items

  6. added
    clawsweeper:source-repro
    on Aug 4, 2026
  7. added
    status: 🚢 actively landing
    and removed
    status: 🚢 actively landing
    on Aug 18, 2026
  8. MilkyWay008 commented on Aug 19, 2026

    @MilkyWay008

    Your 0x800072f78 after ~62s is the WSL online download/verify path giving up, not OpenClaw itself. curl.exe -I -L the releases.ubuntu.com WSL image URL and the raw.githubusercontent.com DistributionInfo.json one...... a proxy or firewall or AV blocking those is the usual cause, and it lines up with why your manual import works while the installer's fetch dies. If you'd rather dodge the whole step, manually wsl --import the distro and set CleanBeforeRun to false in src/OpenClaw.SetupEngine/default-config.json so setup stops unregistering it as stale. Logs are under %APPDATA%\OpenClawTray\Logs\Setup if you need more. Oh btw, in case it might help that, I built a portable Hermes OTG repo, check it, imo it may be able to help you diagnose and figure out the fix in no time. https://github.com/MilkyWay008/Hermes-OTG

  9. added
    status: 🚢 actively landing
    on Aug 25, 2026
  10. removed
    status: 🚢 actively landing
    on Aug 25, 2026
  11. added
    status: 🚢 actively landing
    on Aug 25, 2026
  12. removed
    impact:data-loss
    on Aug 25, 2026
  13. shanselman commented on Aug 26, 2026

    @shanselman
    Collaborator

    Corrective live WSL BasePath ownership binding landed in #1230.

  14. removed
    status: 🚢 actively landing
    on Aug 26, 2026
  15. locked as resolved and limited conversation to collaborators on Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0clawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:ux-release-blockerissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    Urgent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions