#9398: Fix browser extension install path calculation
cli
stale
Cluster:
Browser Extension Fixes
## Summary
Fixes the `openclaw browser extension install` command that was failing with "Bundled Chrome extension is missing" error.
## Changes
Changed path resolution in `bundledExtensionRootDir()` from `../../assets/chrome-extension` to `../assets/chrome-extension`.
## Root Cause
From `dist/index.js`, the old path incorrectly resolved to:
- `/usr/local/lib/node_modules/assets/chrome-extension` ❌
After fix, it correctly resolves to:
- `/usr/local/lib/node_modules/openclaw/assets/chrome-extension` ✅
## Testing
This is a one-line path fix following the exact solution provided in the issue report.
Fixes #9397
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the bundled Chrome extension path resolution used by `openclaw browser extension install`. Specifically, `bundledExtensionRootDir()` now resolves `../assets/chrome-extension` relative to the built file’s directory, which aligns with the packaged layout where `dist/cli/*` and `dist/assets/*` are siblings.
The change is localized to `src/cli/browser-cli-extension.ts` and affects only how the installer finds the bundled extension assets (`manifest.json`, icons, etc.) before copying them into the user’s state directory.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is a single path resolution adjustment scoped to the browser extension install flow, and it matches the expected dist/package directory structure (assets next to compiled CLI files). No other call sites or behavioral changes were introduced.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#10937: fix(browser): correct fallback path for bundled Chrome extension
by dddabtc · 2026-02-07
90.3%
#9796: fix(cli): correct fallback path for bundled Chrome extension (#9772)
by lailoo · 2026-02-05
90.3%
#10589: fix: chrome extension install fails in bundled dist layout
by joetomasone · 2026-02-06
87.3%
#14944: fix(browser): prefer openclaw profile in headless/noSandbox environ...
by BenediktSchackenberg · 2026-02-12
79.9%
#9259: Fix: Restore explicit glob patterns in package.json files field
by vishaltandale00 · 2026-02-05
79.6%
#6193: fix(browser): default to openclaw profile instead of chrome extensi...
by mikezaoldyeck · 2026-02-01
77.9%
#20424: Fix plugin extension path traversal in discovery/install
by markmusson · 2026-02-18
77.1%
#13568: Fix browser (OpenClaw-managed) launch fail by binding remote debugg...
by singlag · 2026-02-10
74.8%
#13176: fix: resolve llm-task module import for global installs
by striking · 2026-02-10
74.2%
#8614: fix(browser): detect early chromium exit to prevent startup hang
by Wren-OC · 2026-02-04
73.8%