[BUG] Screenshot and JavaScript tools fail with "Cannot access a chrome-extension:// URL of different extension"
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bug: Screenshot and JavaScript tools fail with "Cannot access a chrome-extension:// URL of different extension"
Environment
- Platform: macOS Darwin 24.6.0
- Claude Code: (run claude --version to confirm)
- Chrome Extension: Claude in Chrome (verify version in chrome://extensions)
Issue
The screenshot and javascript_tool MCP tools consistently fail with:
Error capturing screenshot: Cannot access a chrome-extension:// URL of different extension
Meanwhile, read_page, navigate, wait, and find tools work correctly.
What Works vs. What Fails
| Tool | Uses | Status |
|-----------------|---------------------|----------|
| read_page | Accessibility tree | ✅ Works |
| navigate | Chrome tabs API | ✅ Works |
| wait | Timer | ✅ Works |
| find | Accessibility tree | ✅ Works |
| screenshot | chrome.debugger API | ❌ Fails |
| javascript_tool | chrome.debugger API | ❌ Fails |
Troubleshooting Attempted
- ❌ Closed Next.js debugger/DevTools - no change
- ❌ Full Chrome restart (Cmd+Q) - no change
- ❌ Created fresh tabs - no change
- ❌ Tried deployed HTTPS URL instead of localhost - no change
What Should Happen?
Chrome extension should be able to take screenshots and execute js
Error Messages/Logs
The screenshot and javascript_tool MCP tools consistently fail with:
Error capturing screenshot: Cannot access a chrome-extension:// URL of different extension
Steps to Reproduce
Steps to Reproduce
- Start Claude Code with claude
- Verify Chrome extension connected via /mcp
- Navigate to any URL (tested both localhost:3001 and https://pockla-app-team-beta.vercel.app)
- Attempt screenshot or javascript_tool action
- Error occurs regardless of URL
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
Showing cached comments. Read the full discussion on GitHub ↗
15 Comments
same error
I had the same issue and it (looks like) it was caused by a Chrome extension (password manager in my case).
Try to disable all your extensions and see if it's working
I fixed this:
This didn't work for me, unfortunately.
One way that worked for me was just disable all other extensions
I suspect having a non-Chrome chromium-based browser open also causes issues. I use Dia and I noticed that new Dia windows were spawning to
dia://new-tab-page-third-party. When I close Dia, things seem to work.Also, disabling all non-Claude extensions seemed to help, too. Can't tell which specific one(s) are causing issues.
I get this issue a lot when using the Claude Code Chrome extension to test webpages.
Also affected. macOS, Claude Code 2.1.3. Was working late December, started failing early January. Error shows "Cannot access a chrome-extension:// URL of different extension" when using debugger API tools (screenshot, javascript_tool). Accessibility tree tools (read_page, navigate, find) still work.
Same issue here, I've allowed JavaScript events as suggested. Disabling all extensions appears to do the trick. Happy to help debug if needed
Unchecked runtime.lastError: Cannot access a chrome:// URLmcpPermissions-njmGsNbg.js:3 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
of which
(16)Unchecked runtime.lastError: Debugger is not attached to the tab with id: 270581492.
<details><summary>Details</summary>
<p>
<img width="2930" height="860" alt="Image" src="https://github.com/user-attachments/assets/c8a7fd24-6169-460f-a741-16e8036e850a" />
<img width="2918" height="648" alt="Image" src="https://github.com/user-attachments/assets/08978dda-0d11-45e8-8360-da7811c22503" />
<img width="1312" height="1300" alt="Image" src="https://github.com/user-attachments/assets/19e1c49d-f89f-4e1d-ac01-dafa1e2c3013" />
</p>
</details>
For anyone else coming across this who also has numerous conflicting extensions (redux devtools, react devtools, etc) - I created a separate "Claude" chrome profile (I skipped the google account link) with only the claude extension installed which did the trick.
For me it worked when i've disabled 'uBlock Origin'
I've been using this separate profile approach as well, but the problem is that Claude Code can't target a specific Chrome profile. So if you have the extension installed in multiple profiles, like a clean "Claude" profile and your personal one, you end up having to manually enable/disable the extension depending on which profile you want Claude to use
chrome shut down apple password extension works!
For me, it only works when I turn off all the extensions except the Claude Code Extension. It's sad.