豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Incorrect userdata dir leads to missing DevToolsActivePort #818

@mroeling

Description

@mroeling

Description of the bug

Running in OpenAI's Codex, the chrome-devtools-mcp can not connect to the active browser because of an error in the path to the google-chrome/DevToolsActivePort file.

• Called chrome-devtools.list_pages({})
  └ Could not connect to Chrome. Check if Chrome is running and remote debugging is enabled by going to chrome://inspect/#remote-debugging.
    Cause: Could not find DevToolsActivePort for chrome at /home/<userdirname>/config/google-chrome/DevToolsActivePort

Note that:

  1. the dot is missing before config
  2. /home/ is the name of the active user, renamed for privacy.

Reproduction

  • run a command for the browser
  • note the missing dot in the file name

Expectation

I expect the code to properly traverse the path to find the existing DevToolsActivePort file.

MCP configuration

[mcp_servers.chrome-devtools]
command = "npx"
args = [
"chrome-devtools-mcp@latest",
"--autoConnect"
]

Chrome DevTools MCP version

"version": "0.13.0" (through @latest)

Chrome version

144.0.7559.96

Coding agent version

v0.88.0

Model version

gpt-5.2-codex

Chat log

› chrome-devtools.list_pages({}) • Called chrome-devtools.list_pages({}) └ Could not connect to Chrome. Check if Chrome is running and remote debugging is enabled by going to chrome://inspect/#remote-debugging. Cause: Could not find DevToolsActivePort for chrome at /home/mark.roeling/config/google-chrome/DevToolsActivePort ─ Worked for 4s ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── • I can’t connect to Chrome (no DevToolsActivePort). Please start Chrome with remote debugging enabled, then I can list pages.

Node version

v20.19.0

Operating system

Linux

Extra checklist

  • I want to provide a PR to fix this bug

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions