Browser channel override still requires the bundled Playwright Chromium

Offen
#2,606 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
playwright, typescript
Bereich
backend, testing

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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_CHANNEL is 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.

Vorherrschende Sprache
TypeScript
Sterne
19
Forks
4
Ø Merge
35 Min.
Gemergte PRs (30 T.)
11

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Automattic/wp-codebox

Alle Issues in Automattic/wp-codebox

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.