Bug Description
After openclaw gateway restart, ALL browser act operations (evaluate, click, wait, etc.) fail with error:
action targetId must match request targetId
Environment
- OpenClaw version: 2026.6.9 (c645ec4)
- OS: Windows 11 (Win32_NT 10.0.26200 x64)
- Node: v24.14.0
- Browser: Chromium v144+ (openclaw profile, fresh/managed)
Steps to Reproduce
openclaw gateway restart
- Open any page:
browser action=open url=https://example.com
- Attempt evaluate:
browser action=act kind=evaluate fn="1+1" targetId={returnedTargetId}
- Result: 403, "action targetId must match request targetId"
Reproducibility
- 100% reproducible after gateway restart
- Affects ALL act kinds: evaluate, click, wait, select, fill, drag, etc.
- Not affected: snapshot, console, open/close/tabs (these still work)
- Confirmed on fresh tab (open any URL, immediately act → same error)
- Persists across tab close/reopen cycles
Observed Behavior
| Operation |
Status |
| snapshot |
OK |
| open/close/tabs |
OK |
| console |
Executes but no output returned |
| act (evaluate/click/wait/...) |
ALL fail with targetId mismatch |
Root Cause Analysis
Traced to dist/routes-D-R1Vq9w.js line ~1288:
if (action.targetId && action.targetId !== tab.targetId)
return jsonActError(res, 403, ACT_ERROR_CODES.targetIdMismatch,
"action targetId must match request targetId");
The check compares action.targetId (passed by caller) against tab.targetId (CDP internal targetId). After gateway restart, these may diverge — the openPage response returns one targetId (the responseTargetId) but the act handler later resolves tab.targetId to a different CDP-internal identifier.
Workaround
Using subagent + Playwright as fallback for JavaScript-rendered page interaction.
Impact
This breaks the core browser interaction path — critical for workflows that extract data from JavaScript-rendered pages (e.g., video URL extraction from TikTok/Douyin).
Bug Description
After
openclaw gateway restart, ALL browseractoperations (evaluate, click, wait, etc.) fail with error:action targetId must match request targetIdEnvironment
Steps to Reproduce
openclaw gateway restartbrowser action=open url=https://example.combrowser action=act kind=evaluate fn="1+1" targetId={returnedTargetId}Reproducibility
Observed Behavior
Root Cause Analysis
Traced to
dist/routes-D-R1Vq9w.jsline ~1288:The check compares
action.targetId(passed by caller) againsttab.targetId(CDP internal targetId). After gateway restart, these may diverge — the openPage response returns one targetId (theresponseTargetId) but the act handler later resolvestab.targetIdto a different CDP-internal identifier.Workaround
Using subagent + Playwright as fallback for JavaScript-rendered page interaction.
Impact
This breaks the core browser interaction path — critical for workflows that extract data from JavaScript-rendered pages (e.g., video URL extraction from TikTok/Douyin).