fix(deployer): probe npm registries before OpenClaw install, fail fast when all blocked - #106
Merged
Merged
Conversation
The Ask Agent button on unavailable skills was wrapped in an el-tooltip showing the missing-requirement reason, which is redundant — the same reason is already shown on the 'Unavailable' badge next to the skill name. Unwrap the button so hovering it no longer shows the tooltip. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t when all are blocked On corporate networks (e.g. Microsoft) the public npm registries the deployer falls back to (registry.npmjs.org, registry.npmmirror.com) are blocked by network policy (Defender Network Protection 'NPM URL Block'). Previously the installer handed each blocked registry to 'npm install -g openclaw' with a 900s timeout, so it would hang for many minutes per registry AND trigger a Windows Security 'blocked by your IT admin' toast for every blocked host before eventually falling through to a reachable mirror. Add a fast parallel reachability probe (per-registry /-/ping, 2.5s timeout) and only attempt registries that respond, fastest-first. If no candidate registry is reachable, log a clear, actionable message and return failure immediately so the install fail screen shows right away instead of making the user wait through repeated long npm hangs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jul 24, 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.
Problem
On the Microsoft corporate network, installing MicroClaw shows a Windows Security prompt — "This content is blocked by your IT admin … [Te] NPM URL Block" — and then hangs for a long time.
Root cause: the deployer installs the OpenClaw gateway with
npm install -g openclawand forces its own hardcoded registry fallback list (registry.npmjs.org→registry.npmmirror.com→ Huawei), ignoring the machine's configured registry. On corp networks the first two are blocked by Defender Network Protection. For each blocked registry, npm was handed aproc.wait(timeout=900)(15 min), so the install:Verified from a corp machine:
registry.npmjs.organdregistry.npmmirror.comfail (SSL blocked), while the Huawei mirror servesopenclawfine.Fix
_reachable_npm_registries(): a fast parallel reachability probe (each candidate''s/-/ping, 2.5s timeout). Only registries that respond are attempted, fastest-first. Blocked/unreachable hosts are dropped so they are never handed to the 900snpm install.Tests
test_all_registries_unreachable_fails_fast_without_installasserts we fail fast and never callnpm installwhen nothing is reachable.python -m unittest tests.test_windows_setup_upgrade→ 25 passed;ruff check/ruff format --checkclean.Fixes #93.