fix(create-webclaw): repair binary install on Windows (and all platforms)#72
Merged
Conversation
…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>
This was referenced Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #71.
npx create-webclawnever used the prebuilt binary on any platform — it silently fell back tocargo install, which fails with'cargo' is not recognized/cargo: not foundunless Rust is present. Reported as Windows-only; it's actually every OS.Bugs fixed
getAssetName()hardcodedwebclaw-mcp-<target>, but release assets arewebclaw-<tag>-<target>(versioned, nomcp-infix), soassets.find()always returnedundefined. Asset names are now built from the releasetag_name+ a platform→target map.unzipabsent on Windows. The.zipbranch now uses PowerShellExpand-Archive(ships with Windows 10/11);unzipis kept only for the non-Windows case.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 optionalGITHUB_TOKENon theapi.github.comrequest (token dropped on CDN redirects)..exe(not in the issue's suggested fix). Archives extract into awebclaw-<tag>-<target>/subdirectory holding three binaries, so the oldchmod(BINARY_PATH)hit a nonexistent path.webclaw-mcpis now lifted out of that subdir toBINARY_PATHand the rest is cleaned up.BINARY_NAME/BINARY_PATHalso gain.exeon Windows so the written MCP config points at a real file.Testing (Docker — no Windows machine)
initializehandshake →serverInfo: webclaw-mcp 0.6.13, 12 tools..zippath validated against the real release zip:Expand-Archive-equivalent extraction, nested.exeresolved + lifted, PE headerMZ. Executing the.exeneeds Windows (the reporter confirmed that on Win11).0.1.4→ cargo fallback → fail), then confirmed the fix.create-webclawbumped 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