DevToolsActivePort Missing: Check Chrome Logs

updated November 18, 2026

Chrome exits before Selenium opens a page. If two sessions use the same --user-data-dir, remove that option and retry. ChromeDriver creates a fresh profile for each session by default. This fixed our two-session test.

If Chrome already has a fresh profile, start Chrome directly as the user running the test. Use the same browser and options. Its first error can explain why it closed.

Chrome instance exited. Examine ChromeDriver verbose log to determine the cause.

ChromeDriver 157 printed this when a second session tried to use an open profile. To record its launch command in Python, pass this service alongside your existing Chrome options:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service(service_args=["--verbose"], log_output="chromedriver.log")
driver = webdriver.Chrome(service=service, options=options)

Look for Launching chrome: in chromedriver.log. In our Debian container, starting Chrome directly reported No usable sandbox!. Headless mode still failed. For that error, use a runner that supports Chrome's sandbox, which isolates its processes.

unknown error: DevToolsActivePort file doesn't exist

ChromeDriver 114 gave this earlier wording for the profile conflict on macOS:

unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)

On Debian the first line ended in crashed. and the port-file line stayed the same. Chrome writes that file in its profile so ChromeDriver can connect. Creating an empty file cannot start the browser.

We checked Python and Java with Selenium 4.52.0 on 10 November 2026. Chrome and ChromeDriver 114.0.5735.90 produced the port-file message. On macOS 15.4.1, Chrome 157.0.8103.39 with ChromeDriver 157.0.8103.38 reported that Chrome exited. On Debian 12, Chrome and ChromeDriver 157.0.8103.50 gave the same wording. Setting or unsetting CI did not change those messages.

Put it into practice

Solve a graded problem: write a test, and we check it would catch a real bug.

Browse the problems →

Learn this in full

Reading about a problem is not the same as fixing one. Pick a lecture or a practice problem and write the test yourself.

Keep reading