Skip to main content

ubuntu-latest moved to 26.04: pin what Playwright supports

7 min read
CI/CD
GitHub Actions
Playwright
Testing
Debugging
SC
Written by Shailesh Chaudhari
Software engineer: AI agents and backend systems

Short answer. If npx playwright install --with-deps chromium fails in GitHub Actions with Playwright does not support chromium on ubuntu26.04-x64, your job is running on the Ubuntu 26.04 image, usually because it asks for ubuntu-latest, and your Playwright version predates 26.04 support. There are two fixes: upgrade Playwright to a release that supports 26.04, or pin the job to runs-on: ubuntu-24.04. I pinned, only the jobs that install a browser, and added a unit test that fails if one of them goes back to a floating label.

The general point is not about either vendor. ubuntu-latest is a label whose meaning changes on the provider's schedule, and it did, as announced. My toolchain had a list of operating systems it supports, and the label moved off that list. Pin what your toolchain supports, and make the pin something a test checks.

What happened

On 2026-12-05 the CI runs for this portfolio and for EduScale each failed in the same two kinds of job: the ones that install Chromium for Playwright. In the portfolio those are the accessibility job (axe on every route) and the end-to-end job. In EduScale they are the WCAG job on public routes and the anonymous read-only view. Every other EduScale job passed; the portfolio run also had an unrelated dependency-audit failure, fixed in a separate commit. None of the Playwright tests ran; the jobs stopped at install.

What the logs prove

I want to keep this separate from what I inferred, because the first explanation that comes to mind for a red CI run is usually "someone broke something", and that is not what the logs say.

The install step printed three lines. From the EduScale run (the portfolio's is the same apart from the version, 1.59.1):

BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu26.04-x64 as a fallback.
Cannot install dependencies for ubuntu26.04-x64 with Playwright 1.58.2!
Error: ERROR: Playwright does not support chromium on ubuntu26.04-x64

The job's "Set up job" step names the image it ran on:

Image: ubuntu-26.04
Version: 20261129.15.1

The portfolio's previous CI run before that day, on 2026-10-25, ran the same two jobs on Image: ubuntu-24.04 and passed. The workflow said runs-on: ubuntu-latest both times.

So, proven by the logs: the same label ran on 24.04 in October and on 26.04 in December, and on 26.04 the installed Playwright versions (1.58.2 and 1.59.1) refused to install Chromium, saying in their own words that the OS is not supported.

What the vendors say

Both sides documented their part.

GitHub announced the move in the runner-images repository, in an issue titled "ubuntu-latest label will use Ubuntu 26.04 in November 2026", opened on 2026-09-17. It says the change would be rolled out over several weeks beginning 2026-10-19, with the migration planned to complete by 2026-11-19, and it lists the possible impact plainly: workflows that depend on Ubuntu 24.04-specific software, libraries or prebuilt binaries may be affected.

Playwright's 1.61.0 release notes say "Playwright now supports Ubuntu 26.04", and the system requirements page in the current docs lists Ubuntu 22.04, 24.04 and 26.04. Both repos were on earlier versions.

What I infer from that, rather than read in a log: the label had already moved by the time either repo next ran CI. The portfolio had no CI run between 2026-10-25 and 2026-12-05, so the first run after the rollout window was the first one to meet 26.04. Nothing changed in my code to cause it. Nothing was broken on either vendor's side either: each did what it had said it would do, and the combination was unsupported.

The fix: pin the jobs that need it

The portfolio fix (7f2684a) changes two lines in .github/workflows/ci.yml:

a11y:
  name: Accessibility — WCAG 2.1 AA
  # ubuntu-latest is 26.04, where Playwright 1.59 cannot install Chromium.
  runs-on: ubuntu-24.04

and the same for the e2e job. The quality job (type-check, lint, Prettier, Jest) stays on ubuntu-latest. It installs no browser, and on the run after the fix it ran on Image: ubuntu-26.04 and passed, next to the two pinned jobs on ubuntu-24.04. A pin is a constraint; I only wanted it where something depends on it.

EduScale's fix (dd764496) took the blunter route and pinned all fourteen jobs in its CI file to ubuntu-24.04. That is simpler to read and keeps every job on one image, at the cost of pinning jobs that did not need it. Both repos went green on the next run.

Why pin instead of upgrading Playwright?

Upgrading is the fix that moves forward, and it is the long-term one. The pin was the smaller change: one line per job, and the test runner stays exactly as it was. An upgrade moves two things at once, the OS image and the Playwright release with its browser builds, and an accessibility suite that runs axe against rendered pages is the kind of suite where a new browser build can shift results. Keeping those two changes in separate commits makes either one easy to read and to revert.

So the pin buys a choice of timing. It does not remove the decision. A pinned image is supported for a limited time too, and when 24.04 is retired the pin turns into a failure of its own. In the portfolio, a comment above each pinned runs-on line says why it is there, so whoever removes it knows what to check first.

The guard test

A pin in a YAML file is the kind of thing a later cleanup "tidies" back to ubuntu-latest because the others say that. So the portfolio has a Jest test, __tests__/ci-runners.test.ts, that reads the workflow and checks every job that installs Playwright:

describe("CI jobs that run Playwright", () => {
  const ci = readFileSync(join(process.cwd(), ".github/workflows/ci.yml"), "utf8");
  const jobs = ci
    .slice(ci.indexOf("\njobs:\n"))
    .split(/\n {2}(?=[a-z0-9_-]+:\n)/i)
    .slice(1);
  const playwrightJobs = jobs.filter((j) => j.includes("playwright install"));

  it("finds the Playwright jobs", () => {
    expect(playwrightJobs.length).toBeGreaterThanOrEqual(2);
  });

  it("pins their runner rather than using ubuntu-latest", () => {
    for (const job of playwrightJobs) {
      const runner = job.match(/runs-on:\s*(\S+)/)?.[1];
      expect(runner).toMatch(/^ubuntu-\d{2}\.\d{2}$/);
    }
  });
});

Two details matter more than the regex.

The test selects jobs by what they do (playwright install), not by name. A new job that installs a browser is covered the day it is added, without anyone remembering this test exists.

And the first assertion checks that it found at least two such jobs. Without it, a change to the file's layout that made the split find nothing would leave the second test looping over an empty list and passing. I have been caught by exactly that shape before, and a passing test only proves the test passes is the longer version of why the count is there.

It has limits I know about. It reads only ci.yml, so a Playwright job in another workflow file would not be checked, and it accepts any pinned Ubuntu version, including one Playwright does not support. It guards against drifting back to a floating label, which is the mistake that happened. EduScale has the pin but not the test.

If you are looking at the same error

  1. Open the "Set up job" step of the failed job and read the Image: line. That tells you which OS you actually got, whatever the workflow says.
  2. Check your Playwright version against its release notes and the system requirements page. If your version predates support for that image, either upgrade or pin.
  3. If you pin, pin only the jobs that install browsers or other OS-specific binaries, write the reason next to the line, and decide when you will upgrade instead.
  4. Add a check that fails if the pin disappears, and make the check prove it found something to check.

A floating label is a reasonable default for jobs that only need Node. For a job that depends on a vendor's supported-OS list, it means the job's environment can change without a commit in your repo, and the first you hear of it is a red run.

A related lesson from EduScale, about a different gap between "CI is green" and "it runs": a green build is not a running function.

SC
Written by Shailesh Chaudhari
Software engineer: AI agents and backend systems