Skip to main content

FAILURE-PATTERN ENCYCLOPEDIA

Debug the signature, not the symptom.

A maintained library of concrete test and CI failures. Every entry starts with recognizable evidence, then ranks causes, diagnostic checks, repairs, and prevention.

21

failure patterns

9

framework contexts

Have the raw failure in front of you?

Run the private browser workflow first, then use the matched guide to verify the diagnosis.

Triage locally

Timing or race condition

Playwright

Playwright timeout exceeded

TimeoutError: locator.click: Timeout 30000ms exceeded.

Playwright stopped waiting because an action or assertion did not reach its expected state before the configured timeout.

Open diagnostic guide

Selector drift

Playwright

Playwright strict mode violation

Error: strict mode violation: locator('button') resolved to 2 elements

A Playwright locator expected to identify one element matched more than one, so Playwright refused an ambiguous action.

Open diagnostic guide

Selector drift

Selenium

Stale element reference exception

StaleElementReferenceException: stale element reference

Selenium is holding a reference to a DOM node that the application replaced or detached after it was located.

Open diagnostic guide

Timing or race condition

Selenium · Playwright

Element is not visible or actionable

ElementNotInteractableException: element not interactable

The test found an element, but a user could not interact with it in its current state.

Open diagnostic guide

Environment or infrastructure

CI · Playwright · Jest

ECONNREFUSED in CI

Error: connect ECONNREFUSED 127.0.0.1:5432

The test process reached the target host, but no service was accepting connections on the requested port.

Open diagnostic guide

Environment or infrastructure

CI · Jest · Playwright

DNS resolution failed in CI

getaddrinfo ENOTFOUND service-name

The runtime could not translate a configured host name into an address in the CI environment.

Open diagnostic guide

Dependency or configuration

pytest

pytest fixture not found

fixture 'name' not found

pytest could not find a fixture with the requested name in the test's visible fixture scope.

Open diagnostic guide

Timing or race condition

Jest

Jest cannot log after tests are done

Cannot log after tests are done. Did you forget to wait for something async

Asynchronous work continued after Jest considered the test complete and attempted to write output later.

Open diagnostic guide

Test data or state isolation

pytest · Jest · CI

Unique constraint failed in a test

Unique constraint failed on the fields

The test attempted to create a record whose unique value already exists in the database visible to that test.

Open diagnostic guide

Environment or infrastructure

CI · Jest · pytest

Database connection pool exhausted

Timed out fetching a new connection from the connection pool

Concurrent test work requested more database connections than the configured pool could provide before its timeout.

Open diagnostic guide

Dependency or configuration

Jest · pytest · CI

Module not found during tests

Cannot find module 'package-name'

The test runtime could not resolve a package, local module, generated artifact, or configured path alias.

Open diagnostic guide

Assertion mismatch

Jest · Playwright · pytest

Expected and received values differ

Expected: value Received: other-value

The observed application result does not match the contract encoded in the assertion.

Open diagnostic guide

Likely flaky behavior

Jest · Playwright · CI

Unhandled promise rejection in tests

UnhandledPromiseRejection

An asynchronous operation rejected without a handler attached in the test or application lifecycle.

Open diagnostic guide

Dependency or configuration

Playwright · CI

Playwright browser executable doesn't exist

Error: browserType.launch: Executable doesn't exist at

Playwright went to launch the exact browser build its own version pins, and nothing was at that path. No test step ran, so the fix is in how the job installs or locates browsers, not in the spec.

Open diagnostic guide

Environment or infrastructure

Playwright · CI

Playwright webServer never became ready

Error: Timed out waiting 60000ms from config.webServer.

Playwright ran the webServer command, then polled the configured url or port until the timeout without getting an answer it counts as ready. It stops there, before running a single test.

Open diagnostic guide

Dependency or configuration

pytest · CI

pytest import file mismatch

import file mismatch: imported module 'test_login' has this __file__ attribute:

pytest imported one test file under a bare module name, then found a second file that would import under the same name. In the default import mode a module name can only belong to one file, so collection stops.

Open diagnostic guide

Dependency or configuration

pytest · CI

pytest mark not registered

'smoke' not found in `markers` configuration option

A test uses a custom mark pytest does not know. Without strict markers that is only a PytestUnknownMarkWarning; with strict markers on, collection of that file fails and nothing in it runs.

Open diagnostic guide

Likely flaky behavior

pytest · CI

pytest-xdist workers collected different tests

Different tests were collected between gw0 and gw1. The difference is:

Every pytest-xdist worker collects the suite on its own, and the controller needs all of them to produce the same test IDs in the same order. When they disagree, no test runs. It often fails on some runs and passes on others, which makes it look flaky. The first worker in the message is the one whose collection reached the controller first, usually gw0, and every other worker is compared against it.

Open diagnostic guide

Environment or infrastructure

JUnit · Maven · CI

Surefire forked VM terminated

The forked VM terminated without properly saying goodbye. VM crash or System.exit called?

Surefire runs tests in a forked JVM that reports back to Maven over a channel and says goodbye at the end. This fork exited without saying it, so Maven cannot tell what passed and fails the build.

Open diagnostic guide

Dependency or configuration

GitHub Actions · CI

GitHub Actions: Resource not accessible by integration

Resource not accessible by integration

A GitHub API call made with the workflow's GITHUB_TOKEN, or with a GitHub App token, returned 403 because that token does not hold the permission the endpoint needs. Posting PR comments, adding labels and creating releases are the usual places it appears.

Open diagnostic guide

Environment or infrastructure

Docker · CI

Cannot connect to the Docker daemon

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

The Docker client found the socket it was told to use, but no daemon accepted the connection. The client's wording tells you which of three states you are in, so read it before restarting anything.

Open diagnostic guide

Human-readable diagnosis with runnable checks.

Markdown and JSON variants for agent retrieval.

Primary references and related-pattern links.