Error Reference
Common test automation and CI/CD errors: cause, fix, and a code example for each.
Playwright
-
locator.click: Target page, context or browser has been closed
Playwright throws this when the page, context, or browser is torn down before an action resolves. It's almost always a missing await.
Read fix -
locator.click: Timeout 30000ms exceeded
The element never became actionable (visible, enabled, stable, receiving events) within Playwright's default 30s action timeout.
Read fix -
Error: strict mode violation: locator resolved to 2 elements
Playwright's strict mode refuses to act on a locator that matches more than one element instead of silently picking the first.
Read fix -
page.goto: net::ERR_CONNECTION_REFUSED
Playwright tried to navigate to a URL where nothing is listening yet. Usually the dev/test server wasn't ready.
Read fix -
Error: expect(locator).toBeVisible() failed
The assertion's own error message tells you which failure this is: read 'Received:' carefully before changing anything.
Read fix -
browserType.launch: Executable doesn't exist at .../chromium-XXXX/chrome-linux/chrome
Playwright's browser binaries were never installed, or don't match the Playwright version in package.json.
Read fix -
TimeoutError: waiting for selector "..." to be visible
This comes from the older page.waitForSelector API. It's the same actionability issue as a locator timeout, just an older call shape.
Read fix -
Error: locator.fill: Element is not an <input>, <textarea> or [contenteditable] element
fill() only works on real form controls, and the locator resolved to a wrapper element instead of the actual input.
Read fix -
Error: page.click: Element is outside of the viewport
The click target sits outside the configured browser viewport and couldn't be scrolled into a clickable position.
Read fix -
Error: net::ERR_ABORTED
The navigation was cancelled, either by a second navigation racing the first, or because the URL triggers a download instead of a page load.
Read fix -
Test timeout of 30000ms exceeded
This is the whole-test timeout, not a single action's. Something in the test hung or a step is genuinely slow.
Read fix -
Error: locator.click: Element is not attached to the DOM
The element you were about to click got unmounted and remounted between when it was found and when the action fired.
Read fix -
Error: browserContext.newPage: Target page, context or browser has been closed
You tried to open a new page in a context (or browser) that was already closed or crashed.
Read fix -
Error: locator.selectOption: Element is not a <select> element
selectOption() only works on native <select> elements, but this locator matched a custom dropdown component instead.
Read fix -
Error: element is not stable - waiting for element to stop moving
Playwright refuses to click a moving target because a CSS transition or animation is still running on the element.
Read fix
Cypress
-
CypressError: Timed out retrying after 5000ms: cy.wait() timed out waiting for the 1st request to the route
The aliased request your test is waiting on never fired, usually because of a URL/method mismatch or a timing issue in the intercept setup.
Read fix -
CypressError: cy.click() failed because this element is detached from the DOM
The app re-rendered and replaced the element between when Cypress found it and when it tried to click it.
Read fix -
Cypress detected that the test has ended but there is still a pending command
A command started running but the test finished before it resolved, almost always caused by mixing native async/await with the Cypress command queue.
Read fix -
CypressError: Timed out retrying after 4000ms: Expected to find element: `...`, but never found it
The selector is either wrong, or the element renders later than Cypress's default retry window, so check for a pending network request first.
Read fix -
cy.visit() failed because you are attempting to visit a URL that is of a different origin
Cypress runs a test in one origin at a time, and the test tried to cross to a different domain mid-flow.
Read fix -
Cypress could not verify that this server is running
Cypress can't reach the URL configured as baseUrl. The app server either isn't up yet or is on a different port.
Read fix -
cy.type() failed because it requires a valid DOM element
The locator resolved to nothing (or to a detached element) right at the moment cy.type() tried to act on it.
Read fix -
CypressError: This element is not visible because it has CSS property: display: none
The target (or one of its ancestors) is hidden, usually a menu/dropdown item that only becomes visible after a real trigger interaction.
Read fix -
CypressError: cy.wait() timed out waiting for the 1st request to the route: `@getUsers`. No request ever occurred.
The alias cy.wait() is looking for never fired, so check for a typo between the intercept and the wait, or a request-order race.
Read fix -
Uncaught exception from application under test
The app under test threw an unhandled JS error, and Cypress fails the test by default when that happens.
Read fix -
CypressError: cy.click() failed because the center of this element is hidden from view
Another element (a sticky header, modal, or overlay) is sitting on top of the click target's center point.
Read fix -
AssertionError: Timed out retrying after 4000ms: expected false to be true
A generic retried assertion never became true in time. The real condition is whatever's asserted just above this line in the command log.
Read fix -
cy.request() failed trying to load: http://localhost:3000/api/... ECONNREFUSED
The API server that cy.request() is calling isn't reachable at that host/port.
Read fix -
CypressError: cy.origin() failed because your callback function returned a promise
cy.origin() callbacks must be synchronous, plain functions, with no async/await and no closures over outer-scope variables.
Read fix -
cy.type() failed because this element is disabled
Cypress is correctly refusing to type into a disabled field. This is usually a sign the app hasn't enabled it yet at this point in the flow.
Read fix
Selenium
-
StaleElementReferenceException: stale element reference: element is not attached to the page document
The element you found earlier no longer exists in the current DOM, because the page re-rendered after you located it and before you acted on it.
Read fix -
NoSuchElementException: no such element: Unable to locate element
Selenium searched the current DOM for your locator and found nothing, and either the selector is wrong or the element hasn't rendered yet.
Read fix -
ElementClickInterceptedException: element click intercepted
Selenium found the element and tried to click it, but another element is currently on top of it at that point on the page.
Read fix -
TimeoutException: Expected condition failed: waiting for element to be clickable
The explicit wait's condition never became true within the timeout: the element stayed non-clickable (or absent) the whole time.
Read fix -
SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version XX
The installed ChromeDriver binary doesn't match the installed Chrome browser version.
Read fix -
WebDriverException: unknown error: cannot find Chrome binary
Selenium's ChromeDriver can't locate an actual Chrome (or Chromium) executable on this machine.
Read fix
Appium
-
SessionNotCreatedError: A new session could not be created
Appium rejected the session request. It's almost always a capabilities mismatch against what's actually available on the device/emulator.
Read fix -
NoSuchElementError: An element could not be located on the page using the given search parameters
The locator strategy (accessibility id, XPath, UiAutomator selector) didn't match anything in the current app screen.
Read fix -
Error: Could not find a connected Android device
Appium's UiAutomator2 driver couldn't see any device or emulator through ADB when the session started.
Read fix -
A session is either terminated or not started
The app crashed, or the Appium session was otherwise killed mid-test, and this command arrived after the session was already gone.
Read fix
API Testing
-
Error: Request failed with status code 401
The API rejected the request as unauthenticated, and in test suites this is often a token lifecycle bug, not a credentials typo.
Read fix -
Error: timeout of 5000ms exceeded
The HTTP client gave up waiting for a response before the server replied, which could be a slow endpoint, a slow test environment, or a hung request.
Read fix -
Error: JSON schema validation failed: instance.price is not of a type(s) number
The response body doesn't match the contract your test expects, because the API is returning a different shape or type than the schema declares.
Read fix -
Error: Request failed with status code 409 (Conflict)
The API refused to create/update a resource because it already exists in that state, a common symptom of tests sharing data instead of isolating it.
Read fix
CI/CD
-
Error: connect ECONNREFUSED 127.0.0.1:3000
The test tried to hit a local server that isn't actually up yet in the CI environment, a classic 'works on my machine' parity gap.
Read fix -
Error: listen EADDRINUSE: address already in use :::3000
Something is already bound to the port your app/test server is trying to use on the CI runner.
Read fix -
Jest: A worker process has failed to exit gracefully
Something in the test run (an open handle, timer, or connection) is keeping the Node process alive after the tests themselves finished.
Read fix -
Error: Input required and not supplied: token
A GitHub Action in your workflow expects an input (often a token) that wasn't passed, usually a missing `with:` value or an unset secret.
Read fix