openclaw - ✅(Solved) Fix [Bug]: Browser Playwright actions still fail after doctor --fix on 2026.4.24 [1 pull requests, 3 comments, 3 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#72168Fetched 2026-04-27 05:33:54
View on GitHub
Comments
3
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×3cross-referenced ×1labeled ×1

After upgrading to OpenClaw 2026.4.24, browser starts correctly, webpage opening works, and snapshot works. However, Playwright-based browser actions such as click, fill, type, and navigate still fail with "Playwright is not available in this gateway build" even after running openclaw doctor --fix and restarting the gateway.

Error Message

node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})" Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js The error is generated from: node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})" Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js NODE_PATH="$HOME/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-da6bdffc3d96/node_modules" node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})" Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js

Root Cause

After upgrading to OpenClaw 2026.4.24, browser starts correctly, webpage opening works, and snapshot works. However, Playwright-based browser actions such as click, fill, type, and navigate still fail with "Playwright is not available in this gateway build" even after running openclaw doctor --fix and restarting the gateway.

Fix Action

Fixed

PR fix notes

PR #72238: fix(browser): resolve playwright-core through runtime shim

Description (problem / solution / changelog)

Summary

Fix browser Playwright actions failing in packaged builds by resolving playwright-core through a browser-local runtime shim.

Linked Issue/PR

Closes #72168

Verification

  • Confirmed playwright-core resolves through createRequire.
  • Full browser e2e lane was blocked here by an unrelated missing typebox dependency.

Changed files

  • extensions/browser/src/browser/playwright-core.runtime.ts (added, +6/-0)
  • extensions/browser/src/browser/pw-ai.e2e.test.ts (modified, +10/-18)
  • extensions/browser/src/browser/pw-session.mock-setup.ts (modified, +6/-3)
  • extensions/browser/src/browser/pw-session.ts (modified, +3/-1)
  • extensions/browser/src/browser/pw-tools-core.state.ts (modified, +3/-1)
  • scripts/test-built-bundled-runtime-deps.mjs (modified, +199/-0)

Code Example

doctor --fix reports bundled plugin runtime deps installed, including playwright-core@1.59.1.

Confirmed dependency exists:

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-da6bdffc3d96/node_modules/playwright-core

Browser plugin package declares the dependency:

/opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/package.json

Relevant dependency:

"playwright-core": "1.59.1"

The error is generated from:

/opt/homebrew/lib/node_modules/openclaw/dist/routes-CpJeVyjj.js

The Playwright module uses a static ESM import from:

/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js

Relevant line:

import { chromium, devices } from "playwright-core";

Direct import reproduction command:

node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})"

Output:

import failed
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js

Also tested with NODE_PATH pointing to bundled runtime deps:

NODE_PATH="$HOME/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-da6bdffc3d96/node_modules" node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})"

Output:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js
Did you mean to import "playwright-core/index.js"?
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading to OpenClaw 2026.4.24, browser starts correctly, webpage opening works, and snapshot works. However, Playwright-based browser actions such as click, fill, type, and navigate still fail with "Playwright is not available in this gateway build" even after running openclaw doctor --fix and restarting the gateway.

Steps to reproduce

  1. Upgrade OpenClaw to 2026.4.24.
  2. Run openclaw doctor --fix.
  3. Restart gateway with openclaw gateway restart.
  4. Confirm gateway is reachable with openclaw gateway probe.
  5. Use the browser plugin to open https://example.com.
  6. Confirm webpage opening and snapshot work.
  7. Try a Playwright-based browser action such as click, fill, type, or navigate.
  8. Observe that the action fails with "Playwright is not available in this gateway build".
  9. Confirm playwright-core exists under bundled plugin runtime deps.
  10. Try importing the Playwright browser module directly: node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})"

Expected behavior

After openclaw doctor --fix installs the bundled browser plugin runtime dependencies and the gateway is restarted, Playwright-based browser actions such as click, fill, type, and navigate should work.

Actual behavior

Browser starts successfully, opening webpages works, and snapshot works. However, Playwright-based actions such as click, fill, type, and navigate fail with:

Playwright is not available in this gateway build; '<feature>' is unsupported. Repair the bundled browser plugin runtime dependencies so playwright-core is installed, then restart the gateway.

Direct import test also fails with:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js

OpenClaw version

2026.4.24 (cbcfdf6)

Operating system

macOS 26.2 arm64

Install method

npm global via Homebrew Node

Model

N/A - browser plugin issue, not model-related

Provider / routing chain

N/A - browser plugin issue, not provider/routing-related

Additional provider/model setup details

N/A. This issue is unrelated to model/provider routing. It reproduces at the browser control / Playwright runtime layer.

Logs, screenshots, and evidence

doctor --fix reports bundled plugin runtime deps installed, including [email protected].

Confirmed dependency exists:

~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-da6bdffc3d96/node_modules/playwright-core

Browser plugin package declares the dependency:

/opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/package.json

Relevant dependency:

"playwright-core": "1.59.1"

The error is generated from:

/opt/homebrew/lib/node_modules/openclaw/dist/routes-CpJeVyjj.js

The Playwright module uses a static ESM import from:

/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js

Relevant line:

import { chromium, devices } from "playwright-core";

Direct import reproduction command:

node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})"

Output:

import failed
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js

Also tested with NODE_PATH pointing to bundled runtime deps:

NODE_PATH="$HOME/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-da6bdffc3d96/node_modules" node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})"

Output:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'playwright-core' imported from /opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js
Did you mean to import "playwright-core/index.js"?

Impact and severity

Affected subsystem: browser plugin / browser control.

Severity: medium.

Basic browser functions still work, including starting the browser, opening webpages, and snapshot.

However, Playwright-based interaction features are unavailable, including click, fill, type, navigate, and related browser automation actions.

Consequence: browser automation workflows that require interaction with page elements cannot be completed.

Additional information

This does not appear to be the original HTTP_PROXY / HTTPS_PROXY issue.

Browser startup works, webpage opening works, and snapshot works.

The issue appears to be that bundled runtime deps are installed under:

~/.openclaw/plugin-runtime-deps/.../node_modules

but pw-ai-BDOHNhdx.js uses a static Node ESM import of playwright-core from the OpenClaw install tree.

Node ESM resolution does not resolve this package from NODE_PATH, so the import fails even after doctor --fix.

Please advise the official fix. Should doctor --fix make this ESM import resolvable, or is another supported repair command required?

extent analysis

TL;DR

The issue is likely due to the playwright-core package not being resolvable by the Node ESM import in pw-ai-BDOHNhdx.js, and can be fixed by making the import resolvable or using a different import method.

Guidance

  • Verify that the playwright-core package is installed in the correct location and version (1.59.1) under ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-da6bdffc3d96/node_modules.
  • Check if the NODE_PATH environment variable is set correctly to include the path to the bundled runtime dependencies.
  • Consider modifying the pw-ai-BDOHNhdx.js file to use a dynamic import or a different import method that can resolve the playwright-core package from the NODE_PATH.
  • Run the command with NODE_PATH set to the bundled runtime deps to see if it resolves the issue: NODE_PATH="$HOME/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-da6bdffc3d96/node_modules" node -e "import('/opt/homebrew/lib/node_modules/openclaw/dist/pw-ai-BDOHNhdx.js').then(()=>console.log('import ok')).catch(e=>{console.error('import failed'); console.error(e.stack||e); process.exit(1)})"

Example

No code example is provided as the issue is related to the import resolution and not a specific code snippet.

Notes

The issue appears to be specific to the Node ESM import resolution and the location of the playwright-core package. The doctor --fix command installs the bundled plugin runtime dependencies, but the import in pw-ai-BDOHNhdx.js is not resolvable.

Recommendation

Apply a workaround by modifying the `pw-ai-BDOHNhdx.js

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…

FAQ

Expected behavior

After openclaw doctor --fix installs the bundled browser plugin runtime dependencies and the gateway is restarted, Playwright-based browser actions such as click, fill, type, and navigate should work.

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 - ✅(Solved) Fix [Bug]: Browser Playwright actions still fail after doctor --fix on 2026.4.24 [1 pull requests, 3 comments, 3 participants]