Skip to content

fix(scrape): capture screenshot outside the nav-budget race#164

Merged
us merged 1 commit into
mainfrom
fix/screenshot-capture-budget
Jun 21, 2026
Merged

fix(scrape): capture screenshot outside the nav-budget race#164
us merged 1 commit into
mainfrom
fix/screenshot-capture-budget

Conversation

@us

@us us commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Full-page screenshots of heavy/tall pages were silently dropped — Page.captureScreenshot ran inside the post_navigate_phase nav-budget race, so a slow page exhausted the budget mid-capture ("WS closed") and the response returned with no screenshot.

Fix: capture runs AFTER the budget race with its own page_timeout, using the still-live session. Verified locally with chrome_nav_budget_ms=2000 (forced budget hit): full-page capture of firecrawl.dev returns a 756x20562 PNG. Found via prod testing of fastcrw.com.

Follow-up to #163.

A full-page screenshot of a heavy/tall page was being silently dropped:
Page.captureScreenshot ran inside the post_navigate_phase nav-budget race, so
on a slow page the budget elapsed mid-capture, the in-flight CDP request died
("WS closed"), and the response came back with no screenshot.

Move the capture out of the budget race: post_navigate_phase returns the HTML
only, and the screenshot is captured afterwards with its own page_timeout,
using the still-live session (the partial-snapshot path uses it too). The
page-load budget no longer cancels the capture.

Verified locally: with chrome_nav_budget_ms=2000 (forced budget hit) a
full-page capture of firecrawl.dev still returns a 756x20562 PNG.
@us us merged commit 4021b50 into main Jun 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant