Browser channel override still requires the bundled Playwright Chromium

オープン
#2,606 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
playwright, typescript
領域
backend, testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
19
フォーク
4
平均マージ
35分
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/wp-codebox のほかの issue

Automattic/wp-codebox の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。