[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_
This issue has 15 comments on GitHub. Read the full discussion on GitHub ↗