web/playwright-native fails to install Chromium on Ubuntu 26.04 ("OS too new") — workaround via PLAYWRIGHT_HOST_PLATFORM_OVERRIDE
- Dominant language
- Kotlin
- Stars
- 310
- Forks
- 28
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 8
Description
**Informational / workaround** — not a blocker. Everything works after the steps below. Filing this to help anyone else on a very new (just-released or non-LTS) Linux distro who hits the same wall bringing up the `web/playwright-native` device.
## Environment
- **OS:** Ubuntu 26.04 LTS ("resolute"), x86_64, kernel `7.0.0-27-generic`
- **Hardware:** 2014 Intel MacBook Pro — worth noting the *OS* is newer than the tooling expects, not the hardware
- **Trailblaze:** `2026.07.02.2`, installed via **Homebrew on Linux** (`brew install block/tap/trailblaze`)
- **Java:** none installed system-wide; the brew formula's bundled runtime was used (nice — no separate JDK needed)
## Install (brew path worked cleanly)
```bash
brew install block/tap/trailblaze
```
All dependencies came in as prebuilt bottles (including `ffmpeg`). `trailblaze --version` and `trailblaze device list` both worked immediately.
## The problem
Connecting the web device:
```bash
trailblaze device connect web/playwright-native
```
fails while Trailblaze installs Chromium:
```
Installing Playwright (this may take up to 2 minutes)...
Downloading Chromium
Error: ERROR: Playwright does not support chromium on ubuntu26.04-x64
```
It retries 3× with the same error and the device bind fails.
**Root cause:** Playwright ships *prebuilt* browser binaries only for OS versions in its known list. Ubuntu 26.04 is newer than the bundled Playwright knows about, so it refuses rather than hand over a possibly-incompatible binary.
## Workaround
Point Playwright at the nearest supported build with `PLAYWRIGHT_HOST_PLATFORM_OVERRIDE`. The download happens inside the Trailblaze **daemon**, so the env var must be set when the daemon starts:
```bash
trailblaze app --stop
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu24.04-x64 trailblaze app --headless
trailblaze snapshot --device web/playwright-native
```
Notes:
- The value **must include the arch suffix** — `ubuntu24.04-x64`. Bare `ubuntu24.04` fails with `does not support chromium on ubuntu24.04`.
- Playwright then logs `BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu24.04-x64` and pulls **Chrome for Testing 147.0.7727.15 (chromium v1217)**, which runs fine on 26.04 (all required libs are present — system Google Chrome already runs there).
- Once cached (`~/.cache/ms-playwright/chromium-1217`), the override is only needed again if a future version bump requires a new Chromium revision. Adding `export PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu24.04-x64` to your shell profile makes it durable.
**Result:** `trailblaze snapshot --device web/playwright-native` → `Snapshot captured`, `Browser: Chromium (desktop)`, viewport 1280×800. ✅
## Two small observations (optional, for maintainers)
1. **First-install race:** the `device connect` / `snapshot` install-wait wrapper printed `✗ Device bind failed` while the daemon was *still* downloading the (large, 3-part ~280 MB) browser bundle. A retry after the cache populated succeeded. The wrapper's timeout appears to race the daemon's actual install completion rather than tracking it.
2. **Possible auto-fallback:** Playwright already has the "unsupported OS → nearest build" path — it just needs the override set. Trailblaze could catch the `does not support chromium on ` error and auto-retry with the nearest `ubuntuXX.04-x64`, making this transparent for anyone on a brand-new or non-LTS distro.
Happy to provide full daemon logs if useful.
Contributor guide
Research direction
Reproduce the failure with `trailblaze device connect web/playwright-native` on Ubuntu 26.04, then inspect the daemon's Playwright installation path and the device-connect wait behavior. Compare the result with `PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu24.04-x64`; done could mean automatic fallback for unsupported Ubuntu versions and a wrapper that waits for browser installation to finish.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, linux, playwright, ubuntu
- Domain
- operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100