Merged
Size
S
Change Breakdown
Bug Fix90%
Docs10%
#60682fix(browser): remove fromSurface: false for Chrome 146+ screenshot compat

Screenshots fixed for Chrome 146+ compatibility

Browser screenshot capture is working again on Chrome 146+ after removing a deprecated CDP parameter that newer versions reject for managed browsers.

The browser's screenshot function was broken on Chrome 146+. The tool was passing fromSurface: false to Chrome's CDP screenshot API, but newer Chrome versions reject this parameter for managed and headful browsers, returning an "Unable to capture screenshot" error. Removing this parameter restores the feature while keeping the viewport capture behavior intact. The problematic parameter was originally added as a workaround for a Chromium compositor bug (40760789) that caused cross-origin image textures to go missing—but that bug was fixed around Chrome 130, and the workaround was never cleaned up.

View Original GitHub DescriptionFact Check

Summary

Describe the problem and fix in 2-5 bullets:

  • Problem: Page.captureScreenshot passes fromSurface: false, which Chrome 146+ rejects for managed/headful browsers, returning "Unable to capture screenshot"
  • Why it matters: browser screenshot is broken on Chrome 146+ while browser snapshot (DOM-based) still works
  • What changed: Removed fromSurface: false from the CDP call in extensions/browser/src/browser/cdp.ts:124. Updated the comment to explain the Chromium bug (40760789) was fixed around Chrome 130 and fromSurface: false now fails on 146+. Updated test assertion.
  • What did NOT change (scope boundary): captureBeyondViewport: true remains. No other screenshot parameters touched.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #60540
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: Chromium behavior change in Chrome 146+. fromSurface: false tells Chrome to capture from the compositor surface rather than the rendered surface. Chrome 146+ managed/headful browsers reject this parameter, returning empty screenshot data. The original workaround was for Chromium bug 40760789 (cross-origin image textures lost with fromSurface: true + captureBeyondViewport: true), which was fixed around Chrome 130.
  • Missing detection / guardrail: No Chrome version detection around the fromSurface parameter
  • Contributing context (if known): The Chromium bug was reported and fixed upstream. The workaround outlived the bug.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: extensions/browser/src/browser/cdp.screenshot-params.test.ts
  • Scenario: Updated existing test to assert fromSurface is omitted from CDP params rather than set to false

This contribution was developed with AI assistance (Codex).

© 2026 · via Gitpulse