Skip to content

ci: pin @puppeteer/browsers to v3 to fix Chrome install on newer Node#3679

Merged
B4nan merged 2 commits into
masterfrom
claude/pin-puppeteer-browsers-v3
May 29, 2026
Merged

ci: pin @puppeteer/browsers to v3 to fix Chrome install on newer Node#3679
B4nan merged 2 commits into
masterfrom
claude/pin-puppeteer-browsers-v3

Conversation

@B4nan
Copy link
Copy Markdown
Member

@B4nan B4nan commented May 28, 2026

What

Add a yarn resolutions entry to pin @puppeteer/browsers to v3 even though our direct puppeteer devDep stays on v24.

Why

Recent CI failures with Could not find Chrome (ver. X) on newer Node releases are caused by a known upstream bug:

  • puppeteer@24@puppeteer/browsers@2.xextract-zip@2.0.1 (unmaintained since 2020).
  • On newer Node releases, extract-zip silently aborts mid-stream without rejecting, exits with code 0, and leaves the Chrome cache directory existing-but-empty (only the first archive entry, ABOUT, ends up on disk).

Confirmed empirically against the sister repo apify-client-js — diagnostic instrumentation captured a clean repro:

puppeteer:browsers:install Downloading binary from https://storage.googleapis.com/...
puppeteer:browsers:install Duration for download: 1321ms
puppeteer:browsers:install Installing .../146.0.7680.153-chrome-linux64.zip to .../linux-146.0.7680.153
+ find /home/runner/.cache/puppeteer -maxdepth 4 -type f
/home/runner/.cache/puppeteer/chrome/linux-146.0.7680.153/chrome-linux64/ABOUT     ← only ABOUT
/home/runner/.cache/puppeteer/chrome/146.0.7680.153-chrome-linux64.zip

No Duration for extract debug line — unpackArchive() never resolved.

Upstream

Why override instead of bumping puppeteer to v25

puppeteer@25 is ESM-only, requires Node ≥22.12, and is a much bigger change. Pinning just the buggy transitive package is a smaller change with less risk surface:

  • puppeteer@24's CLI does require('@puppeteer/browsers'). v3 is ESM-only, but require()-of-ESM is stable on Node ≥20.20 / ≥22.12 / ≥24 (verified locally with end-to-end install on each).
  • Net dependency cleanup: removes extract-zip plus 34 of its transitive deps from yarn.lock (456-line reduction).

Same fix is being applied in apify-client-js: apify/apify-client-js#919.

🤖 Generated with Claude Code

The transitive @puppeteer/browsers@2.x (pulled in by puppeteer@24)
uses extract-zip@2.0.1 (unmaintained since 2020). On newer Node
releases extract-zip silently aborts mid-stream without rejecting,
leaving the Chrome cache directory existing-but-empty (only the
first archive entry on disk) and the install command exiting 0.
Test runs then fail with "Could not find Chrome (ver. X)".

@puppeteer/browsers v3 replaces extract-zip with system unzip/tar.exe.
Pinning it via yarn resolutions is sufficient — puppeteer@24's CLI
only uses the stable surface area that v3 keeps, and require() of
v3's ESM module works on all supported Node versions (>=20.20 /
22.12 / 24) thanks to stabilized require-of-ESM.

Net dependency cleanup: removes extract-zip + 34 of its transitive
deps in yarn.lock.

Upstream: puppeteer/puppeteer#14957
Fix:      puppeteer/puppeteer#14960

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added this to the 141st sprint - Tooling team milestone May 28, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label May 28, 2026
@B4nan B4nan changed the title fix(ci): pin @puppeteer/browsers to v3 to fix Chrome install on newer Node ci: pin @puppeteer/browsers to v3 to fix Chrome install on newer Node May 28, 2026
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label May 28, 2026
Node 18 has been EOL since 2025-04-30. Dropping it also unblocks the
@puppeteer/browsers v3 override in the previous commit, which is
ESM-only and can't be required from puppeteer-core's CJS ChromeLauncher
on Node 18 (require(esm) stabilized in 20.19 / 22.12).
@B4nan B4nan merged commit 6af119b into master May 29, 2026
8 checks passed
@B4nan B4nan deleted the claude/pin-puppeteer-browsers-v3 branch May 29, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants