Browser channel override still requires the bundled Playwright Chromium
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- playwright, typescript
Research direction
Start with packages/runtime-playground/src/browser-capture-session.ts, tracing how launchChromiumBrowser() and playwrightBrowserReadiness() handle WP_CODEBOX_BROWSER_CHANNEL. Check the browser provenance and metadata paths named by the issue as well. Confirm channel mode launches and reports readiness without bundled Chromium, while no-channel mode keeps requiring it with the existing error.
Written by the indexing model from the issue text.
Description
Problem
launchChromiumBrowser (packages/runtime-playground/src/browser-capture-session.ts) first calls assertPlaywrightBrowserReady(), which throws unless Playwright's bundled Chromium is on disk. Only after that does it launch with channel: process.env.WP_CODEBOX_BROWSER_CHANNEL.
This makes the documented channel override unusable on its own. A host that wants the system Chrome (WP_CODEBOX_BROWSER_CHANNEL=chrome, which every GitHub-hosted Ubuntu runner already has) still has to download the pinned Chromium and its apt dependencies, only to never launch it. playwrightBrowserReadiness() (used by discovery) has the same blind spot and reports such a host as unavailable.
Evidence
On a GitHub Actions ubuntu-latest runner with WP_CODEBOX_BROWSER_CHANNEL=chrome and google-chrome on PATH, a wordpress.browser-probe step failed with:
Required Playwright Chromium 149.0.7827.55 (revision 1228) is unavailable. Install the browser owned by this WP Codebox package with: node ./node_modules/playwright/cli.js install chromium
Downstream, the browser install step (playwright install --with-deps chromium) costs 56 s on average and up to 258 s per run in a production deploy gate.
Expected
- When
WP_CODEBOX_BROWSER_CHANNELis set, launch through that channel without requiring the bundled Chromium. If the channel's browser is missing, Playwright's own launch error is the one surfaced. playwrightBrowserReadiness()reports a channel-configured host as ready, or checks the channel's browser instead of the bundled one, so discovery agrees with launch.- Browser provenance and metadata name the channel in use.
- With no channel set, behaviour is unchanged: the bundled Chromium is still required, with the same error.
AI disclosure: Claude (Anthropic) in the Pi coding agent (Franklin), directed by @chubes4. AI traced the failure from a deploy gate run and wrote this issue.
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 4
- Avg merge
- 35m
- Merged PRs (30d)
- 11
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/wp-codebox
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Automattic/wp-codebox#2531 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Automattic/wp-codebox#2467 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Automattic/wp-codebox#2466 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Automattic/wp-codebox#2105 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Automattic/wp-codebox#2061 ·
Maintainers usually reply within 1 day
All issues in Automattic/wp-codebox
Similar issues
-
area:api bug good first issue priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Doezer/Questarr#1486 · 1 comment ·
Maintainers usually reply within 1 day
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Sergey-Bar/Penny#245 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mihazs/lazysh#3377 · 2 comments ·
Maintainers usually reply within 1 day
-
Approve the Cloudflare agent plugin for harness sessionsPossibly taken @joshtsch claimed this today. Openenhancement ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day