Skip to content

fix(create-webclaw): repair binary install on Windows (and all platforms)#72

Merged
0xMassi merged 1 commit into
mainfrom
fix/create-webclaw-windows
Jun 27, 2026
Merged

fix(create-webclaw): repair binary install on Windows (and all platforms)#72
0xMassi merged 1 commit into
mainfrom
fix/create-webclaw-windows

Conversation

@0xMassi

@0xMassi 0xMassi commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Fixes #71.

npx create-webclaw never used the prebuilt binary on any platform — it silently fell back to cargo install, which fails with 'cargo' is not recognized / cargo: not found unless Rust is present. Reported as Windows-only; it's actually every OS.

Bugs fixed

  1. Asset name mismatch. getAssetName() hardcoded webclaw-mcp-<target>, but release assets are webclaw-<tag>-<target> (versioned, no mcp- infix), so assets.find() always returned undefined. Asset names are now built from the release tag_name + a platform→target map.
  2. unzip absent on Windows. The .zip branch now uses PowerShell Expand-Archive (ships with Windows 10/11); unzip is kept only for the non-Windows case.
  3. Silent failure. A bare catch {} hid the real cause (a 403 is almost always a GitHub API rate limit, which Rust can't fix). The error is now surfaced, with a rate-limit hint and optional GITHUB_TOKEN on the api.github.com request (token dropped on CDN redirects).
  4. Subdir + .exe (not in the issue's suggested fix). Archives extract into a webclaw-<tag>-<target>/ subdirectory holding three binaries, so the old chmod(BINARY_PATH) hit a nonexistent path. webclaw-mcp is now lifted out of that subdir to BINARY_PATH and the rest is cleaned up. BINARY_NAME/BINARY_PATH also gain .exe on Windows so the written MCP config points at a real file.

Testing (Docker — no Windows machine)

  • Linux amd64 + arm64 (Debian trixie): full flow installs the binary and it answers a real MCP initialize handshake → serverInfo: webclaw-mcp 0.6.13, 12 tools.
  • Windows .zip path validated against the real release zip: Expand-Archive-equivalent extraction, nested .exe resolved + lifted, PE header MZ. Executing the .exe needs Windows (the reporter confirmed that on Win11).
  • Bug 3: with the GitHub API blocked, the new build prints the real reason instead of "No pre-built binary found".
  • Reproduced the original failure first (current 0.1.4 → cargo fallback → fail), then confirmed the fix.

create-webclaw bumped 0.1.4 → 0.1.5.

Out of scope (separate issue)

The Linux release binaries require GLIBC 2.38+, so they won't run on Debian 12 / Ubuntu 22.04 / Amazon Linux 2023 even after this fix (download succeeds, execution fails). That's a release-pipeline fix (build on older glibc or static-link musl), tracked separately.

🤖 Generated with Claude Code

…rms)

`npx create-webclaw` never used the prebuilt binary on any platform and
silently fell back to `cargo install`, which fails with "'cargo' is not
recognized" / "cargo: not found" unless Rust is installed. Four bugs:

1. Asset name mismatch: getAssetName() hardcoded `webclaw-mcp-<target>`,
   but release assets are `webclaw-<tag>-<target>` (versioned, no `mcp-`
   infix). The `find()` always returned undefined, so the prebuilt path
   was never taken — on every OS, not just Windows. Now the asset name is
   built from the release tag_name + a platform→target map.

2. `unzip` is absent on Windows. The `.zip` branch now uses PowerShell
   `Expand-Archive` (ships with Windows 10/11) and keeps `unzip` only for
   the non-Windows case.

3. The prebuilt failure was swallowed by a bare `catch {}`, hiding the
   real cause (a 403 is almost always a GitHub API rate limit). The error
   is now surfaced, with a rate-limit hint + GITHUB_TOKEN support on the
   api.github.com request (token dropped on CDN redirects).

4. (missed by the report's own suggested fix) Archives extract into a
   `webclaw-<tag>-<target>/` subdirectory holding three binaries, so the
   old `chmod(BINARY_PATH)` hit a nonexistent path. webclaw-mcp is now
   lifted out of that subdir to BINARY_PATH and the rest is cleaned up.
   BINARY_NAME/BINARY_PATH also gain the `.exe` suffix on Windows so the
   written MCP config points at a real file.

Tested in Docker (no Windows machine available):
- Linux amd64 + arm64 on Debian trixie: full flow installs the binary and
  it answers a real MCP initialize handshake (serverInfo webclaw-mcp
  0.6.13, 12 tools).
- Windows .zip path validated against the real release zip: Expand-Archive
  equivalent extraction, nested `.exe` resolved + lifted, PE header `MZ`.
  Executing the .exe needs Windows (the reporter confirmed that on Win11).
- Bug 3: with the GitHub API blocked, the new build prints the real reason
  instead of "No pre-built binary found".

Closes #71

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@0xMassi
0xMassi merged commit f528629 into main Jun 27, 2026
4 checks passed
@0xMassi
0xMassi deleted the fix/create-webclaw-windows branch June 27, 2026 10:12
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.

create-webclaw fails on Windows: asset name mismatch + uses missing unzip command

1 participant