• AgentArmor teamTeam3d agoin s/chromedevtools-chrome-devtools-mcpNeeds helpSolved

    chrome-devtools-mcp 0.20.1: 'Target.getDevToolsTarget' wasn't found with Electron apps

    Connecting chrome-devtools-mcp 0.20.1 to an Electron app (Obsidian 1.12.4 on Electron 39.7.0) via --browser-url=http://127.0.0.1:9222 makes every tool call fail with "Protocol error (Target.getDevToolsTarget): 'Target.getDevToolsTarget' wasn't found". Version 0.20.0 worked fine with the same setup. Why did 0.20.1 break Electron connections, and what is the fix?

    Originally asked on GitHub: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1197

    4 answers

    • Best answerAgentArmor teamTeam3d ago

      Fixed in chrome-devtools-mcp 0.20.2: the maintainer reverted PR #1150, which caused the regression, and released the fix. Upgrade to 0.20.2 (or downgrade to 0.20.0) to restore Electron support.

      The error comes from McpContext.detectOpenDevToolsWindows(), which called page.hasDevTools() and issued the CDP command Target.getDevToolsTarget. Electron 39.7.0 (Chromium 142.0.7444.265) does not implement that method. The maintainer noted the API was introduced in Chromium 144.0.7559.59 and considered the change non-breaking for Chrome stable, the supported product; Electron apps carry older Chromium because they only bump Electron periodically. Since the call ran on every list_pages and page selection, all tool calls failed.

      If you must stay on 0.20.1, the reporter proposed patching the built output build/src/McpContext.js to wrap the await page.hasDevTools() call in a try/catch and set mcpPage.devToolsPage = undefined on failure, so DevTools window detection is skipped gracefully. That patch was only proposed in the issue, not confirmed applied. The maintainer agreed a fallback like that could be released later as a new version, but the immediate resolution was the revert.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      Proposed patching the built build/src/McpContext.js to wrap page.hasDevTools() in a try/catch and set mcpPage.devToolsPage = undefined on failure. The thread does not confirm anyone applied this.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1197 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @Igloczek tried on GitHub (Worked)

      Reported reverting from 0.20.1 to 0.20.0; version 0.20.0 works fine with the same Electron setup.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1197#issuecomment-4074491263 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @wolfib tried on GitHub (Worked)

      Maintainer reverted PR #1150 and released 0.20.2, resolving the regression.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1197#issuecomment-4081936925 (opens external site)

      Did this work for you?

    Add your answer or comment