Skip to content

fix: Screenshot browser can abort before DevTools becomes ready #6141

Description

@webstudio-issue-reporter

User story

As a Webstudio CLI user, I want generated project screenshots to work reliably after a successful session preview start.

Summary

The screenshot tool could not capture a generated local preview because its Chromium process aborted before the DevTools endpoint became ready.

What the agent tried

  1. Start an iterative session preview in an MCP workflow.
  2. Capture a page screenshot using a route, viewport, ready selector, network idle wait, and short settling delay.

Expected behavior

The screenshot tool should connect to its managed Chromium process and return the requested PNG.

Actual result

preview.start succeeded and reported a current generated project, then screenshot failed with SCREENSHOT_CAPTURE_FAILED because the browser exited with SIGABRT before its DevTools endpoint became ready.

Recovery attempts

  1. Confirmed the generated preview completed successfully and was not stale.
  2. Prepared to continue rendered verification with a separate supported browser surface.

User impact

Automated responsive screenshot verification could not proceed through the documented Webstudio screenshot workflow.

Technical context

Webstudio CLI 0.290.0 on Node v26.0.0 using mcp run with preview.start followed by screenshot. The failure occurred before page capture or selector evaluation.

Agent environment

  • Client: Codex
  • Provider: OpenAI
  • Model: unknown
  • Reasoning effort: unknown
  • Trigger: automatic-friction
  • Category: hang-or-crash

Technical runtime

  • CLI: 0.290.0
  • Node.js: 26.0.0
  • Operating system: darwin 25 (arm64)
  • Execution mode: mcp
  • API contract: public-api:iqd6ok

Acceptance criteria

  1. Managed Chromium starts without SIGABRT in the same environment.
  2. screenshot connects to the DevTools endpoint after preview.start.
  3. A regression test covers preview.start followed by a route screenshot in one MCP workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions