zai-org / zai-org/feedback

[Bug] zcode 链接 WSL 下,无法使用浏览器mcp

Open
#340 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2 status: 待评估 type: Bug
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

提交前确认 · Pre-submission checklist
  • 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category

工具调用 / MCP · Tool use / MCP

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

严重程度 · Severity

阻塞使用 · Blocking (无法使用核心功能 / core function unusable)

复现频率 · Reproducibility

必现 · Always

问题描述 · Description

ZCode 桌面版连接 WSL2 工作区时,browser-use 插件(官方, v0.3.0)的浏览器后端完全不可用:

  • control-browser skill 可正常加载,mcp__node_repl__js 工具存在且工作正常
    (bootstrap 成功,能 import browser-client.mjs)
  • await agent.browsers.list() 返回空数组 [] —— 没有任何后端注册
  • 调用 agent.browsers.getForUrl(...) / getDefault() 均报错:
    Browser backend '__no_browser_backend__' is unavailable

即:桌面版的 IAB 后端没有覆盖到 WSL 侧会话,CLI 的 cdp 无头后端也不存在,
WSL 工作区下浏览器自动化(网页查阅、GUI 测试)整体不可用。
网络本身正常(WSL 内 curl 可正常访问外网),可排除网络因素。

复现步骤 · Steps to reproduce
  1. Windows 11 + WSL2 (Ubuntu),ZCode 桌面版连接 WSL 工作区
  2. 启用官方 browser-use 插件(v0.3.0)
  3. 新会话中加载 browser-use:control-browser skill
  4. 在 mcp__node_repl__js 中执行 SKILL.md 的标准 bootstrap(setupBrowserRuntime)
  5. 执行 await agent.browsers.list() → 返回 []
  6. 执行 await agent.browsers.getForUrl("https://example.com/")
    → 报错 Browser backend 'no_browser_backend' is unavailable
期望表现 · Expected behavior

WSL 会话中应有可用浏览器后端:IAB 桥接到 WSL 会话,或提供 cdp 无头 Chromium;
至少应给出可行动的错误提示或文档指引(如"请用 --browser-use=headless 启动"),
而不是空列表 + no_browser_backend 这种无信息量的报错。

实际表现 · Actual behavior

后端列表为空,所有后端选择调用失败,浏览器 MCP 在 WSL 工作区完全无法使用。

ZCode 版本 · ZCode version

3.8.1

设备 / 系统 / 浏览器 · Device / OS / Browser

Windows 11 + WSL2 Ubuntu (x64, WSL2 kernel 6.6.114.1-microsoft-standard-WSL2) 浏览器:N/A(WSL 会话内无头环境,问题与具体浏览器无关)

截图 / 录屏 / 日志 · Screenshots / Recordings / Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure in the browser-use control-browser skill, using the SKILL.md bootstrap in mcp__node_repl__js and checking agent.browsers.list(). Trace how browser backends are registered for a ZCode desktop session connected to WSL2. Done means a WSL session exposes a usable backend or reports a clear, actionable setup error instead of an empty list and no_browser_backend.

Written by the indexing model from the issue text.

Assessment

Tech stack
ubuntu
Domain
desktop, devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.