Skip to content
QA Knowledge Hub

SessionNotCreatedException in Selenium

Updated 2026-11-13 · 3 min read

Selenium could not start a browser session. Check the launched browser and driver pair, then reduce startup options and inspect environment logs.

Recognise the error

The official Java API names this exception:

org.openqa.selenium.SessionNotCreatedException

This is the documented exception identifier, not a reproduced stack trace. Driver-specific wording and diagnostic details vary. Keep the full message from your own run; no browser error was reproduced for this page. Java fragments below assume an existing Selenium 4 WebDriver driver and standard Selenium imports. They were checked against the APIs but not compiled or run here.

The browser automation session could not start. This happens before a page locator can help. A version mismatch is a useful first check, but the full startup log decides the next step.

The WebDriver specification defines the corresponding protocol error string as:

session not created

1. The driver does not match the browser being launched

Read the browser path and version in the startup failure, then compare the driver in use. For modern Chrome, follow Chrome's official version-selection procedure or use a matching Chrome for Testing browser/driver pair. Do not copy an old download URL from a tutorial.

chromedriver --version

Run this in the failing machine or container. It reports the driver on PATH; an explicit service path can override it. Check the actual configured binary too.

2. A manually pinned driver overrides automatic management

For a project using Selenium Manager, remove obsolete explicit driver configuration and let Selenium resolve the driver when creating the session:

WebDriver driver = new ChromeDriver();
try {
    driver.get("about:blank");
} finally {
    driver.quit();
}

Selenium Manager needs access to the required downloads or an appropriate cache. In restricted CI, provision a verified matching pair in the image instead. Do not assume the laptop's cached binary exists on the runner.

3. The browser cannot start with this profile or configuration

Try a new session with default options to isolate a custom binary, extension or profile argument. Give concurrent tests separate profiles. Inspect browser and driver logs for the exact startup failure; a missing dependency or blocked executable needs an environment fix, not a locator retry.

For Grid, inspect the node that launches the browser. Updating only the client dependency cannot repair an incompatible browser on that node.

Prevention and interview answer

Record browser, driver and Selenium versions in CI artifacts and update the browser/driver pair together. Keep the startup smoke test separate from application tests. “I check the launched binaries first, then reduce the options and inspect the startup logs rather than changing waits.”

Once a session starts, element problems belong to pages such as NoSuchElementException, not session startup.

Quick answers

Does this always mean a version mismatch?

No. Browser startup, profile conflicts, permissions and remote node configuration can also prevent a session.

Does updating Selenium update my installed Chrome?

Do not assume that. Verify which browser binary and driver are actually launched.

Sources

Want a project you can show in interviews?

The portfolio project kit walks you through testing a deliberately buggy app with Selenium or Playwright and API tests, then explaining it. The app itself is free.