-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
ClawHub requests fail when OPENCLAW_CLAWHUB_URL contains a path prefix #83975
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug
When
OPENCLAW_CLAWHUB_URL(orCLAWHUB_URL) is set to a URL that includes a non-root path prefix (e.g.http://host:port/prefix), all ClawHub API calls return 404.Root Cause
src/infra/clawhub.ts→buildUrl()(line 553):new URL()treats a leading-/path as absolute and replaces the base URL's entire pathname:Expected:
http://host:port/prefix/api/v1/searchThis affects every endpoint (
/api/v1/search,/api/v1/skills/*,/api/v1/packages/*,/api/v1/download, etc.).Reproduction
Direct
curlto the full path confirms the endpoint is alive:Suggested Fix
Replace
new URL(path, base)with string concatenation to preserve the base path:Or alternatively, ensure
normalizeBaseUrlstrips trailing slashes andparams.pathis joined without the leading/.Environment
main(commit041266a)