Skip to content
LatchkeyLatchkey home

Self-Healing CI: Recovering a Playwright Host Validation Failure

A Playwright host-deps validation that fails usually hit a transient package-fetch blip while installing system libraries, not a permanently unsupported host -- a retry clears it.

The problem

A Playwright setup step fails during host validation / install-deps because installing required system libraries (or fetching their package metadata) hit a transient error. The host is supported and the libraries exist; a package-fetch blip interrupted the install. A human re-runs and the dependencies install cleanly.

Typical symptom
Host system is missing dependencies to run browsers.
Failed to install browser dependencies (apt-get returned a transient error)

Why it happens

Playwright validates and installs the system libraries its browsers need, which fetches OS packages over the network, so a transient mirror or metadata blip during that install can fail validation even though the host is supported and the libraries are available.

It is a setup-time package-fetch blip, not an unsupported host: refreshing metadata and retrying the dependency install makes validation pass.

The manual fix

Manual mitigations for host validation:

  1. Re-run the job so the dependency install is retried.
  2. Refresh package metadata before install-deps, then retry.
  3. Use a base image with the browser dependencies preinstalled to avoid the fetch.
Manual retry
npx playwright install-deps   || (sleep 5 && npx playwright install-deps)

How this gets automated

A host-validation failure caused by a transient package fetch has a recognizable signature -- a fetch/install error on system libraries, not a genuine unsupported-host error -- and the safe response is to refresh metadata and retry. A self-healing CI pipeline detects the dependency-install failure, retries the setup, and only escalates if the host is genuinely unsupported or the libraries are truly unavailable.

Frequently asked questions

What causes Self-Healing CI: recovering a Playwright host validation failure?
A Playwright setup step fails during host validation / install-deps because installing required system libraries (or fetching their package metadata) hit a transient error. The host is supported and the libraries exist; a package-fetch blip interrupted the install. A human re-runs and the dependencies install cleanly.
How do I fix Self-Healing CI: recovering a Playwright host validation failure manually?
[object Object]
Can Self-Healing CI: recovering a Playwright host validation failure be fixed automatically?
A host-validation failure caused by a transient package fetch has a recognizable signature -- a fetch/install error on system libraries, not a genuine unsupported-host error -- and the safe response is to refresh metadata and retry.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card