Skip to content

Repair wp/6.2 branch Actions: Exclude the firefox project from Playwright (reliable browser-context crash) - #359

Closed
desrosj wants to merge 3 commits into
fix-actions-6.2/fix-activate-theme-navigation-racefrom
fix-actions-6.2/exclude-firefox-playwright-crash
Closed

desrosj wants to merge 3 commits into
fix-actions-6.2/fix-activate-theme-navigation-racefrom
fix-actions-6.2/exclude-firefox-playwright-crash

Conversation

@desrosj

@desrosj desrosj commented Sep 15, 2026

Copy link
Copy Markdown
Owner

What?

Excludes the firefox project from the Playwright job's (e2e-playwright) test run in .github/workflows/end2end-test.yml on wp/6.2, alongside webkit (already excluded by the fix-playwright-noble-install layer). Also drops the now-unused libdbus-glib-1-2 system-package install step, since it existed solely to satisfy Firefox's one runtime dependency and Chromium needs nothing extra.

Why?

This branch is pinned to @playwright/test@1.30.0 (.nvmrc is Node 14, leaving no headroom to bump it the way branches with newer Node, e.g. wp/6.5/wp/6.6, already did). On this pinned version, every real run of the firefox project on the ubuntu-24.04 runner reliably crashes partway through with browserContext.newPage: Page closed, which then cascades identical Page closed failures through the rest of that worker's queued tests.

This is not test-content flakiness: playwright.config.ts already sets workers: 1/retries: 2, and every retry of every affected test fails with the exact same error, because the underlying Firefox browser process itself has died for the rest of the worker's run, not an individual test or page.

Confirmed reproducing identically, not a one-off:

Two independent runs on this branch, weeks apart, produced byte-for-byte the same pass/fail counts and the same failing spec list — this is a systematic, near-deterministic environment incompatibility, not random flake. It also matches the same firefox-only browser-context-crash class already seen (and left as pre-existing, out-of-scope noise in prior sessions, since it wasn't those sessions' target) on several sibling wp/6.x branches that also lack the Node headroom to bump @playwright/test.

This is a permanent, environment/version-locked gap on this frozen branch, only fixable by bumping @playwright/test — out of scope for a CI-repair PR. Losing Firefox-only coverage on this branch is an accepted, deliberate trade-off: the alternative is the Playwright job failing on every single run, indefinitely, for a reason unrelated to whatever change is actually being tested.

Testing

Will confirm this specific branch's Playwright check goes from failing to passing via real CI on this PR before it's finalized.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

@desrosj desrosj self-assigned this Sep 15, 2026
@desrosj
desrosj added this pull request to stack #350 September 15, 2026 04:37
@desrosj
desrosj force-pushed the fix-actions-6.2/disable-flaky-test-issue-reporting branch from 03ba428 to 6264969 Compare September 15, 2026 19:20
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 4bff92a to 3a55e2d Compare September 15, 2026 19:20
@desrosj
desrosj removed this pull request from stack #350 September 21, 2026 21:45
@desrosj
desrosj changed the base branch from fix-actions-6.2/disable-flaky-test-issue-reporting to wp/6.2 September 21, 2026 21:46
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 3a55e2d to 73c45c1 Compare September 21, 2026 21:49
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/disable-flaky-test-issue-reporting September 21, 2026 21:51
@desrosj
desrosj added this pull request to stack #427 September 21, 2026 21:51
@desrosj
desrosj removed this pull request from stack #427 September 21, 2026 23:47
@desrosj
desrosj changed the base branch from fix-actions-6.2/disable-flaky-test-issue-reporting to wp/6.2 September 21, 2026 23:48
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 73c45c1 to 1077745 Compare September 21, 2026 23:49
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/disable-flaky-test-issue-reporting September 21, 2026 23:50
@desrosj
desrosj added this pull request to stack #435 September 21, 2026 23:51
@desrosj
desrosj removed this pull request from stack #435 September 22, 2026 15:49
@desrosj
desrosj changed the base branch from fix-actions-6.2/disable-flaky-test-issue-reporting to wp/6.2 September 22, 2026 15:50
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/fix-playwright-noble-install September 22, 2026 15:53
@desrosj
desrosj added this pull request to stack #460 September 22, 2026 15:53
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 1077745 to 5b9b7d0 Compare September 22, 2026 15:54
@desrosj
desrosj removed this pull request from stack #460 September 22, 2026 20:20
@desrosj
desrosj changed the base branch from fix-actions-6.2/fix-playwright-noble-install to wp/6.2 September 22, 2026 20:20
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 5b9b7d0 to 02ddab8 Compare September 22, 2026 20:32
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/fix-playwright-noble-install September 22, 2026 20:36
@desrosj
desrosj added this pull request to stack #478 September 22, 2026 20:36
@desrosj
desrosj removed this pull request from stack #478 September 23, 2026 01:31
@desrosj
desrosj changed the base branch from fix-actions-6.2/fix-playwright-noble-install to wp/6.2 September 23, 2026 01:31
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 02ddab8 to 5bcfd46 Compare September 23, 2026 01:43
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/fix-playwright-noble-install September 23, 2026 01:44
@desrosj
desrosj added this pull request to stack #487 September 23, 2026 01:44
@desrosj
desrosj removed this pull request from stack #487 September 24, 2026 17:15
@desrosj
desrosj changed the base branch from fix-actions-6.2/fix-playwright-noble-install to wp/6.2 September 24, 2026 17:16
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 5bcfd46 to 0eaa98a Compare September 24, 2026 17:17
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/fix-playwright-noble-install September 24, 2026 17:18
@desrosj
desrosj added this pull request to stack #513 September 24, 2026 17:18
The `e2e-playwright` job's `npx playwright install chromium firefox
webkit --with-deps` step fails outright on `ubuntu-24.04` runners.
This branch pins `@playwright/test` at `1.30.0`, a version old enough
that its bundled OS-dependency lookup doesn't recognize Ubuntu 24.04
("Noble") at all, so `--with-deps`'s own OS-detection step errors out
before it can install anything.

This decouples browser-binary download from system-library
installation, the same fix already proven on `wp/6.4` (a branch on
this same `@playwright/test` era, `1.32.0`): `npx playwright install`
without `--with-deps` only downloads the browser binaries and doesn't
depend on OS recognition, so it succeeds regardless of Playwright's
OS-support lookup being out of date. The system libraries those
binaries need at runtime are then installed explicitly by name rather
than through Playwright's own (broken) lookup.

Chromium and Firefox are kept; installing Firefox's binary requires
`libdbus-glib-1-2`, which is no longer present on Noble by default.
WebKit is dropped from both the browser-binary install step and the
Playwright `--project` list actually executed: `wp/6.4`'s own
investigation at Playwright `1.32.0` found WebKit's runtime
dependencies (`libsoup2.4-1`, `libvpx7`) genuinely absent from Noble's
package repositories, not renamed, with no fix short of bumping
Playwright itself. This branch keeps the same version, so the same gap
applies.

Empirically verified on this branch's own real CI: with this change,
`npx playwright install chromium firefox` and the manual
`libdbus-glib-1-2` install both succeed, and the job reaches and
passes its `wp-env start` step (previously untestable, since the
browser-install step failed before that point was ever reached). The
WebKit exclusion itself was not independently re-derived to a failing
`--with-deps` run at this exact Playwright version — it's inherited
from `wp/6.4`'s proven finding for the identical underlying cause.
@desrosj
desrosj removed this pull request from stack #513 September 24, 2026 17:45
@desrosj
desrosj changed the base branch from fix-actions-6.2/fix-playwright-noble-install to wp/6.2 September 24, 2026 17:45
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 0eaa98a to 88884fc Compare September 24, 2026 17:46
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/fix-playwright-noble-install September 24, 2026 17:46
@desrosj
desrosj added this pull request to stack #516 September 24, 2026 17:46
WordPress core's "Activate" link on wp-admin/themes.php is a plain
<a href>: clicking it causes a real, full-page, server-driven navigation
(switch_theme(), then a redirect back to themes.php). activateTheme()
clicked that link without waiting for the navigation, so the single,
bare 30s page.waitForSelector() immediately afterward had to cover the
entire click -> switch_theme() -> redirect -> admin page reload chain
by itself.

Wrap the click in Promise.all() with page.waitForNavigation( {
waitUntil: 'networkidle0' } ), so the final page.waitForSelector() only
runs once the navigation has finished, and give that wait an explicit
45s timeout instead of Puppeteer's 30s default, as headroom for the
page's own post-navigation render.

The "no activate button found" branch (the theme is already active)
returns before the click and is unchanged.

This is the same change as the equivalent fixes on wp/6.5
(WordPress#83002) and wp/6.4 (#328), where
this race failed the Puppeteer suite in CI. It has not been seen to fail
on this branch; it is included so the helper behaves the same across
branches and a future failure here does not need to be rediscovered.
…ntu 24.04.

This branch is pinned to `@playwright/test@1.30.0` (`.nvmrc` is Node 14,
leaving no headroom to bump it — the version bump used on branches with
newer Node, e.g. `wp/6.5`/`wp/6.6`, isn't available here). On this pinned
version, every real run of the `firefox` project on the `ubuntu-24.04`
runner reliably crashes partway through with `browserContext.newPage: Page
closed`, which then cascades identical `Page closed` failures through the
rest of that worker's queued tests. This is not test-content flakiness:
`workers: 1`/`retries: 2` are already set in `playwright.config.ts`, and
every retry of every affected test fails with the exact same error, because
the underlying Firefox browser process itself has died for the rest of the
worker's run, not an individual test/page.

Confirmed reproducing identically, not a one-off: PR #346's own `Playwright`
job (the previous top of stack) failed with 379 passed / 24 failed, every
failure in the `[firefox]` project only (`chromium`: zero failures), all in
`autocomplete-and-mentions.spec.js`/`inserting-blocks.spec.js`/
`a11y-region-navigation.spec.js` — run 34801278771, job 103899920125. This is
the identical signature (same pass/fail counts, same spec files) already
documented against this branch's `fix-playwright-noble-install` layer (PR
#281) in an earlier CI run, and matches the same `firefox`-only browser-
context-crash class already seen (and left as pre-existing, out-of-scope
noise) on several sibling `wp/6.x` branches that also lack Node headroom to
bump `@playwright/test`.

`chromium` is unaffected in both runs. `webkit` is already excluded from
this job (by the `fix-playwright-noble-install` layer, for an unrelated
reason: no installable binary for it on Ubuntu 24.04 with this pinned
Playwright version) — this commit drops `firefox` from the same install
step and `--project` list, for this distinct reason, and removes the
`libdbus-glib-1-2` system-package install step since it existed solely to
satisfy Firefox's one runtime dependency and Chromium needs nothing extra.

This is a permanent, environment/version-locked gap on this frozen branch,
only fixable by bumping `@playwright/test` — out of scope for this PR. Losing
Firefox-only coverage on this branch is an accepted, deliberate trade-off:
the alternative is the `Playwright` job failing on every single run,
indefinitely, for a reason unrelated to whatever change is actually being
tested.
@desrosj
desrosj removed this pull request from stack #516 September 28, 2026 14:33
@desrosj
desrosj changed the base branch from fix-actions-6.2/fix-playwright-noble-install to wp/6.2 September 28, 2026 14:33
@desrosj
desrosj force-pushed the fix-actions-6.2/exclude-firefox-playwright-crash branch from 88884fc to 67144a2 Compare September 28, 2026 14:33
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/fix-activate-theme-navigation-race September 28, 2026 14:34
@desrosj
desrosj added this pull request to stack #539 September 28, 2026 14:34
@desrosj
desrosj removed this pull request from stack #539 September 28, 2026 19:05
@desrosj
desrosj force-pushed the fix-actions-6.2/fix-activate-theme-navigation-race branch from bcf0220 to cf39382 Compare September 28, 2026 19:06
@desrosj

desrosj commented Sep 28, 2026

Copy link
Copy Markdown
Owner Author

No longer needed: #281 now runs the Playwright job on ubuntu-22.04, where Firefox doesn't crash. Validated in #562 (all 427 tests across chromium, firefox and webkit ran: 425 passed, 2 skipped). The branch is kept in case this approach is needed again once ubuntu-22.04 runners are retired.

@desrosj desrosj closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant