Skip to content

Commit 6c0fda3

Browse files
committed
feat: add troubleshooting skill definition and expand documentation with details on autoConnect timeouts and extension debugging conflicts.
1 parent 2216b3a commit 6c0fda3

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

docs/troubleshooting.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
auto-accept installation prompt.
99
- Find a specific error in the output of the `chrome-devtools-mcp` server.
1010
Usually, if your client is an IDE, logs would be in the Output pane.
11+
- Search the [GitHub repository issues and discussions](https://github.com/ChromeDevTools/chrome-devtools-mcp) for help or existing similar problems.
1112

1213
## Debugging
1314

@@ -98,3 +99,16 @@ Possible workarounds include:
9899
`npx chrome-devtools-mcp --browser-url http://127.0.0.1:9222`
99100

100101
- **Use Powershell or Git Bash** instead of WSL.
102+
103+
### Connection timeouts with `--autoConnect`
104+
105+
If you are using the `--autoConnect` flag and tools like `list_pages`, `new_page`, or `navigate_page` fail with a timeout (e.g., `ProtocolError: Network.enable timed out` or `The socket connection was closed unexpectedly`), this usually means the MCP server cannot handshake with the running Chrome instance correctly. Ensure:
106+
107+
1. Chrome 144+ is running.
108+
2. Remote debugging is enabled in Chrome via `chrome://inspect/#remote-debugging`.
109+
3. You have allowed the remote debugging connection prompt in the browser.
110+
4. There is no other MCP server or tool trying to connect to the same debugging port.
111+
112+
### Conflicts with Extension Debugging
113+
114+
Extension debugging is not supported when using `--browserUrl` (`--browser-url`) and `--autoConnect`. These options are mutually exclusive to the `--enableCategoryExtensions` (if applicable) or general extension debugging features. Attempting to use them together will result in connection failures or undefined behavior.

skills/troubleshooting/SKILL.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: troubleshooting
3+
description: Uses Chrome DevTools MCP and documentation to troubleshoot connection and target issues. Trigger this skill when list_pages, new_page, or navigate_page fail, or when the server initialization fails.
4+
---
5+
6+
## Troubleshooting Wizard
7+
8+
You are acting as a troubleshooting wizard to help the user configure and fix their Chrome DevTools MCP server setup. When this skill is triggered (e.g., because `list_pages`, `new_page`, or `navigate_page` failed, or the server wouldn't start), follow this step-by-step diagnostic process:
9+
10+
### Step 1: Determine the Exact Error
11+
12+
Identify the exact error message from the failed tool call or the MCP initialization logs. Look for common errors such as:
13+
14+
- `Target closed`
15+
- `ProtocolError: Network.enable timed out` or `The socket connection was closed unexpectedly`
16+
- `Error [ERR_MODULE_NOT_FOUND]: Cannot find module`
17+
- Any sandboxing or host validation errors.
18+
19+
### Step 2: Read Known Issues
20+
21+
Use the `view_file` tool to read the contents of `docs/troubleshooting.md` in the project root to map the error to a known issue. Pay close attention to:
22+
23+
- Sandboxing restrictions (macOS Seatbelt, Linux containers).
24+
- WSL requirements.
25+
- `--autoConnect` handshakes, timeouts, and requirements.
26+
- Conflicts between `--autoConnect`/`--browser-url` and extension debugging.
27+
28+
### Step 3: Formulate a Configuration
29+
30+
Based on the exact error and the user's environment (OS, MCP client), formulate the correct MCP configuration snippet. Check if they need to:
31+
32+
- Pass `--browser-url=http://127.0.0.1:9222` instead of `--autoConnect` (e.g. if they are in a sandboxed environment like Claude Desktop).
33+
- Remove `--enableCategoryExtensions` if using `--autoConnect`.
34+
- Enable remote debugging in Chrome (`chrome://inspect/#remote-debugging`) and accept the connection prompt.
35+
36+
_If you are unsure of the user's configuration, ask the user to provide their current MCP server JSON configuration._
37+
38+
### Step 4: Run Diagnostic Commands
39+
40+
If the issue is still unclear, use the `run_command` tool to run diagnostic commands to test the server directly:
41+
42+
- `npx chrome-devtools-mcp@latest --help` (to verify the installation and Node.js environment)
43+
- Ask the user to run `DEBUG=* npx chrome-devtools-mcp@latest --log-file=/tmp/cdm-test.log` to capture verbose logs if they are attempting to run it from an IDE or different environment.
44+
45+
### Step 5: Check GitHub for Existing Issues
46+
47+
If `docs/troubleshooting.md` does not cover the specific error, check if the `gh` (GitHub CLI) tool is available in the environment. If so, use the `run_command` tool to search the GitHub repository for similar issues:
48+
`gh issue list --repo ChromeDevTools/chrome-devtools-mcp --search "<error snippet>" --state all`
49+
50+
Alternatively, you can recommend that the user checks https://github.com/ChromeDevTools/chrome-devtools-mcp/issues and https://github.com/ChromeDevTools/chrome-devtools-mcp/discussions for help.

0 commit comments

Comments
 (0)