openclaw - 💡(How to fix) Fix [Bug]: Regression of #70193 in 2026.4.23 — bundled-deps installer places playwright-core where dist pw-ai loader can't resolve it, Chromium binary also not fetched [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#71521Fetched 2026-04-26 05:11:59
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1cross-referenced ×1

act:*, navigate, and snapshot all fail with "Playwright is not available in this gateway build" on a freshly upgraded 2026.4.23 install. This is a regression of #70193 (closed 2026-04-22 by commit 9c733956c0 with the claim that bundled deps are now repaired on plugin activation).

The bundled-deps activation does install playwright-core on first run — I can see it in the startup log — but it installs it into a location the gateway's dist-level pw-ai loader can't resolve, and the pinned Chromium binary is never downloaded. Net effect: user-facing browser tool is dead until manually repaired.

Error Message

$ openclaw browser start # succeeds, Chrome launches via CDP $ openclaw browser tabs # succeeds $ openclaw browser navigate https://example.com GatewayClientRequestError: Playwright is not available in this gateway build; 'navigate' is unsupported. Repair the bundled browser plugin runtime dependencies so playwright-core is installed, then restart the gateway. Docs: /tools/browser#playwright-requirement

Root Cause

Root cause (two stacked bugs)

Fix Action

Workaround

Until the underlying bugs are fixed, a two-line repair restores full browser functionality (no need to reinstall OpenClaw):

# 1. Hoist playwright-core so the dist-level pw-ai loader can resolve it.
ln -sfn /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/node_modules/playwright-core \
        /opt/homebrew/lib/node_modules/openclaw/node_modules/playwright-core

# 2. Pull the pinned Chromium binary.
cd /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser && \
  node ./node_modules/playwright-core/cli.js install chromium chromium-headless-shell

# 3. Restart the gateway.
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway

After this: openclaw browser navigate, browser snapshot --format ai, and act:* all work again end-to-end.

Code Example

[plugins] browser installed bundled runtime deps: @modelcontextprotocol/sdk@1.29.0, commander@^14.0.3, express@^5.2.1, playwright-core@1.59.1, typebox@1.1.28, undici@8.1.0, ws@^8.20.0

---

$ openclaw browser start          # succeeds, Chrome launches via CDP
   $ openclaw browser tabs            # succeeds
   $ openclaw browser navigate https://example.com
   GatewayClientRequestError: Playwright is not available in this gateway build; 'navigate' is unsupported.
   Repair the bundled browser plugin runtime dependencies so playwright-core is installed, then restart the gateway.
   Docs: /tools/browser#playwright-requirement

---

/opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/node_modules/playwright-core

---

// dist/pw-ai-Cn4h1-cX.js
import { chromium, devices } from ""playwright-core"";

---

$ node --input-type=module -e ""await import('file:///opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-Cn4h1-cX.js')""
LOAD ERROR: ERR_MODULE_NOT_FOUND
Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-Cn4h1-cX.js

---

$ ls ~/Library/Caches/ms-playwright/
chromium-1208   chromium_headless_shell-1208   ffmpeg-1011

---

const pwAiMod = await import('file://<install>/dist/pw-ai-<hash>.js');
// ^ must succeed; this exercises the real gateway resolution path.
const exe = require('<install>/dist/extensions/browser/node_modules/playwright-core').chromium.executablePath();
assert(fs.existsSync(exe)); // ^ must pass; this catches missing Chromium binary.

---

# 1. Hoist playwright-core so the dist-level pw-ai loader can resolve it.
ln -sfn /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/node_modules/playwright-core \
        /opt/homebrew/lib/node_modules/openclaw/node_modules/playwright-core

# 2. Pull the pinned Chromium binary.
cd /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser && \
  node ./node_modules/playwright-core/cli.js install chromium chromium-headless-shell

# 3. Restart the gateway.
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
RAW_BUFFERClick to expand / collapse

Summary

act:*, navigate, and snapshot all fail with "Playwright is not available in this gateway build" on a freshly upgraded 2026.4.23 install. This is a regression of #70193 (closed 2026-04-22 by commit 9c733956c0 with the claim that bundled deps are now repaired on plugin activation).

The bundled-deps activation does install playwright-core on first run — I can see it in the startup log — but it installs it into a location the gateway's dist-level pw-ai loader can't resolve, and the pinned Chromium binary is never downloaded. Net effect: user-facing browser tool is dead until manually repaired.

Environment

  • OpenClaw 2026.4.23 (a979721)
  • macOS 25.2.0 (Apple Silicon), Node 22 via Homebrew
  • Installed via npm i -g openclaw@latest
  • Agent: openclaw:manny on openai/gpt-5.4 (model is immaterial, same failure with any provider)

Repro

  1. Fresh npm i -g openclaw@latest on a machine with no prior ~/Library/Caches/ms-playwright/chromium-1217
  2. Start the gateway; observe the startup line:
    [plugins] browser installed bundled runtime deps: @modelcontextprotocol/[email protected], commander@^14.0.3, express@^5.2.1, [email protected], [email protected], [email protected], ws@^8.20.0
  3. Start a browser session and try to navigate:
    $ openclaw browser start          # succeeds, Chrome launches via CDP
    $ openclaw browser tabs            # succeeds
    $ openclaw browser navigate https://example.com
    GatewayClientRequestError: Playwright is not available in this gateway build; 'navigate' is unsupported.
    Repair the bundled browser plugin runtime dependencies so playwright-core is installed, then restart the gateway.
    Docs: /tools/browser#playwright-requirement

Root cause (two stacked bugs)

Bug A — ESM resolution hole for the dist-level pw-ai loader

The bundled runtime-deps installer places playwright-core at:

/opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/node_modules/playwright-core

But the gateway's pw-ai module lives at dist/pw-ai-*.js and imports the dep with a bare specifier:

// dist/pw-ai-Cn4h1-cX.js
import { chromium, devices } from ""playwright-core"";

Node's ESM resolver walks up from the importer's directory. From /.../openclaw/dist/, it checks:

  • /.../openclaw/dist/node_modules/playwright-core (missing)
  • /.../openclaw/node_modules/playwright-core (missing)
  • /opt/homebrew/lib/node_modules/playwright-core (missing)

…and never looks inside dist/extensions/browser/node_modules/. So the dynamic await import(""./pw-ai-Cn4h1-cX.js"") in loadPwAiModule() throws ERR_MODULE_NOT_FOUND: Cannot find package 'playwright-core'. In mode: ""soft"" the loader silently returns null, and requirePwAi() emits the misleading ""not available in this gateway build"" 501 for every nav/snapshot/act call.

Direct evidence from the installed build:

$ node --input-type=module -e ""await import('file:///opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-Cn4h1-cX.js')""
LOAD ERROR: ERR_MODULE_NOT_FOUND
Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-Cn4h1-cX.js

Fix suggestions for A

Any one of these would close the hole:

  1. Hoist playwright-core install target to openclaw/node_modules/playwright-core (reachable from /dist/).
  2. Have the bundled-runtime-deps installer also symlink the plugin-dir install into openclaw/node_modules/ so the dist-level loader resolves it.
  3. Change dist/pw-ai-*.js to import via a relative path inside the plugin (or via createRequire(pluginRoot)), so it doesn't depend on Node's upward node_modules walk from /dist/.

Bug B — Pinned Chromium binary not downloaded

Even after (A) is fixed, the first real navigation still fails because [email protected] pins Chromium revision 1217, but:

$ ls ~/Library/Caches/ms-playwright/
chromium-1208   chromium_headless_shell-1208   ffmpeg-1011

i.e. any previously-downloaded Chromium is stale (from an earlier Playwright version), and the bundled-deps installer only pulls the Node package. Until playwright install chromium is run, pw.chromium.launch() throws because the executable path (.../ms-playwright/chromium-1217/chrome-mac-arm64/Google Chrome for Testing.app/...) doesn't exist.

Fix suggestion for B

After the bundled-deps installer activates playwright-core, have it read playwright-core/browsers.json to find the pinned chromium/chromium-headless-shell revisions and invoke playwright-core/cli.js install chromium chromium-headless-shell if the matching binaries aren't already on disk.

Why the 2026.4.22 smoke test passes even though both bugs ship

test/release-check.test.ts (added in 9c733956c0) asserts the dep is present after plugin activation. That's necessary but not sufficient: it doesn't exercise the gateway's actual loader path from dist/pw-ai-*.js, and it doesn't check that the pinned Chromium binary is reachable at chromium.executablePath(). A more robust assertion would be:

const pwAiMod = await import('file://<install>/dist/pw-ai-<hash>.js');
// ^ must succeed; this exercises the real gateway resolution path.
const exe = require('<install>/dist/extensions/browser/node_modules/playwright-core').chromium.executablePath();
assert(fs.existsSync(exe)); // ^ must pass; this catches missing Chromium binary.

Workaround

Until the underlying bugs are fixed, a two-line repair restores full browser functionality (no need to reinstall OpenClaw):

# 1. Hoist playwright-core so the dist-level pw-ai loader can resolve it.
ln -sfn /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/node_modules/playwright-core \
        /opt/homebrew/lib/node_modules/openclaw/node_modules/playwright-core

# 2. Pull the pinned Chromium binary.
cd /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser && \
  node ./node_modules/playwright-core/cli.js install chromium chromium-headless-shell

# 3. Restart the gateway.
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway

After this: openclaw browser navigate, browser snapshot --format ai, and act:* all work again end-to-end.

Related

  • #70193 — original bug, claimed fixed in 9c733956c0 (this report is a regression)
  • #50717 — likely adjacent (remote-relay path reports the same ""Playwright is not available"" text)
  • #71484 — separate but related bundled-deps installer packaging issue filed today

Happy to PR either the smoke-test hardening or the hoist/symlink logic in src/plugins/bundled-runtime-root.ts — let me know which direction you prefer.

extent analysis

TL;DR

To fix the issue, hoist the playwright-core installation to a location where the gateway's loader can resolve it, and ensure the pinned Chromium binary is downloaded.

Guidance

  1. Verify the issue: Confirm that the playwright-core package is installed in a location that is not reachable by the gateway's loader, and that the Chromium binary is not downloaded.
  2. Hoist playwright-core: Consider one of the suggested fixes for Bug A, such as hoisting the playwright-core install target to openclaw/node_modules/playwright-core or symlinking the plugin-dir install into openclaw/node_modules/.
  3. Download Chromium binary: After fixing Bug A, ensure the pinned Chromium binary is downloaded by invoking playwright install chromium or by adding a step to the bundled-deps installer to download the binary.
  4. Test the fix: Verify that the gateway's loader can resolve playwright-core and that the Chromium binary is reachable by exercising the browser functionality.

Example

No code snippet is provided as the issue is related to the installation and configuration of dependencies rather than a specific code error.

Notes

The provided workaround can be used to temporarily restore browser functionality until the underlying bugs are fixed. The fix suggestions for Bug A and Bug B provide a starting point for permanently resolving the issue.

Recommendation

Apply the workaround provided in the issue body to temporarily restore browser functionality, and then work on implementing one of the suggested fixes for Bug A and Bug B to permanently resolve the issue. This approach allows for immediate restoration of functionality while also addressing the root causes of the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Regression of #70193 in 2026.4.23 — bundled-deps installer places playwright-core where dist pw-ai loader can't resolve it, Chromium binary also not fetched [1 comments, 2 participants]