[Bug] 应用内浏览器 click 类事件注入跨页面静默失效(fill/domSnapshot 正常)— ZCode 3.9.1 macOS
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
问题类别 · Category
Browser(应用内浏览器 / browser-use 自动化)
涉及的 Agent 框架 · Agent framework
ZCode 内置 browser-use(node_repl js 通道,IAB 后端)
严重程度 · Severity
Medium(浏览器自动化降级为只读+填充,点击类无法使用)
复现频率 · Reproducibility
一旦进入失效状态则 100% 持续复现(跨页面、跨客户端重启);但首次触发条件不明(同版本客户端当天上午 click 正常,下午起失效)
问题描述 · Description
ZCode 3.9.1 (5853) macOS arm64 (darwin 25.5.0)。通过 node_repl js 驱动应用内浏览器(IAB)时,click 类事件注入全部静默失效,而协议层操作全部正常:
| 操作 | 状态 |
|---|---|
| locator.click()(playwright surface) | ❌ Timeout waiting for locator(actionability 等待直至超时) |
| cua.click({x,y})(坐标直射元素中心) | ❌ 无报错但页面零反应 |
| dom_cua.click({node_id}) | ❌ 无报错但页面零反应 |
| locator.fill() / press 输入 | ✅ 正常(能写入输入框) |
| domSnapshot() / getAttribute / goto / tabs 管理 | ✅ 全部正常 |
关键判别(双对照实验):
- 既有功能按钮同样点不动(如 dsh web 本地应用的 Collapse sidebar)→ 排除被测页面代码问题
- 换最简单外页同样失败(example.com 首页唯一链接,点击后 URL 不变)→ 排除页面特定因素,定位 IAB 事件注入层
复现步骤 · Steps to reproduce
失效状态下(本机当前持续可复现):
// bootstrap 后
const tab = await browser.tabs.new();
await tab.goto("https://example.com/");
await tab.playwright.waitForLoadState({ state: "domcontentloaded" });
const link = tab.playwright.getByRole("link");
await link.first().click({ timeoutMs: 2500 }); // → Timeout
// 坐标路径同样无效:
const dom = await tab.dom_cua.get_visible_dom();
const r = dom.elements[0].rect;
await tab.cua.click({ x: r.x + r.width/2, y: r.y + r.height/2 }); // 无报错,URL 不变
期望表现 · Expected behavior
click 注入成功:example.com 链接点击后导航到 iana.org;或至少坐标点击路径可用。
实际表现 · Actual behavior
三路 click(locator / 坐标 / DOM 事件)全部无效果;fill 等协议层操作正常;同一 URL 手动鼠标操作正常。
补充信息
- 时间线:2026-08-25 上午同一版本 click 完全正常(曾成功 click 选工作区 + fill+Enter 发消息完整驱动会话),下午起失效,触发条件不明
- 重启无效:重启 ZCode 客户端后新进程下依然失效
- 版本未变:3.9.1 (5853),2026-08-23 安装,无自动更新
- 猜测方向:IAB 后端事件注入(sendInputEvent 类)在某种运行期条件下进入坏态并跨重启持续——具体在宿主内部,无法进一步定位
ZCode 版本 · ZCode version
3.9.1 (5853),macOS 15 (darwin 25.5.0 arm64)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided node_repl js reproduction against example.com and compare locator.click(), cua.click(), and dom_cua.click() with the working fill and domSnapshot operations. Investigate the IAB event-injection layer described in the report; done means the example.com link navigates to iana.org or the coordinate click path works while the other protocol operations remain functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, playwright
- Domain
- desktop, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100