claude-code - 💡(How to fix) Fix [BUG] Preview tool screenshot always returns black image after browser gets into broken state [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46501Fetched 2026-04-11 06:18:37
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Error Message

chrome-error://chromewebdata/ — the internal browser gets stuck on this URL and cannot navigate to localhost.

Code Example

chrome-error://chromewebdata/ — the internal browser gets stuck on this URL and cannot navigate to localhost.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The preview tool's internal browser gets stuck and screenshots always return a completely black image. Even when the server is running and window.location.href shows the correct localhost URL, the screenshot capture is broken.

<img width="651" height="1120" alt="Image" src="https://github.com/user-attachments/assets/e4c5ca52-f77e-4814-912a-c21eef79abaf" />

What Should Happen?

Screenshots should show the actual rendered app.

Error Messages/Logs

chrome-error://chromewebdata/ — the internal browser gets stuck on this URL and cannot navigate to localhost.

Steps to Reproduce

Start a Vite dev server via preview_start The internal browser fails to load localhost (stuck on chrome-error://chromewebdata/) Navigate via preview_eval → location.href shows the correct URL Call preview_screenshot → returns completely black image Restarting Mac does not fix it within the same Claude Code session

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

4.6

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The internal browser getting stuck on chrome-error://chromewebdata/ likely causes the screenshot issue, and resolving this navigation problem may fix the screenshot capture.

Guidance

  • Verify that the internal browser can navigate to localhost without getting stuck on chrome-error://chromewebdata/ by checking the browser's navigation behavior outside of the screenshot capture process.
  • Check if there are any browser extensions or settings that could be interfering with the internal browser's navigation.
  • Attempt to reproduce the issue with a different Claude model or version to isolate if the problem is specific to the Sonnet model or version 4.6.
  • Consider resetting the internal browser's settings or clearing its cache to see if this resolves the navigation issue.

Example

No specific code snippet is provided as the issue seems related to the internal browser's behavior rather than a code-specific problem.

Notes

The issue seems to be related to the internal browser's ability to navigate to localhost, and resolving this may require further investigation into the browser's settings or the environment in which it is running. The fact that this is a regression suggests that a change in the Claude Code version or the environment may have introduced this issue.

Recommendation

Apply workaround: Given the information, a workaround such as resetting the internal browser or checking for interfering extensions might be necessary until the root cause is identified and fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Preview tool screenshot always returns black image after browser gets into broken state [1 participants]