Python - "DevToolsActivePort file doesn't exist" error, Chrome Version 111, Python Selenium package Version 4.8.3

138 views
Skip to first unread message

Chad Dubiel

unread,
Mar 31, 2023, 2:26:02 AM3/31/23
to Selenium Users
Hello,

I've recently updated to Chrome version 111.0.5563.147, I've also updated Selenium to version 4.8.3 and I'm running in a Python 3.10.10 virtual environment. I've attempted to use a manual download of chromedriver ver 111 from the official distribution with a Service pointing programmatically to the path, but that led to the same error seen below. Below I am attempting to use webdriver_manager to handle creating the service automatically. 

My code is as follows:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager


if __name__ == "__main__":
  driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))


This results in the following error: 

Traceback (most recent call last):
  File "C:\Users\cdubiel\PycharmProjects\GlassScraper\glass_scraper\ops\fetch\empty_test.py", line 11, in <module>
    driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
  File "C:\Users\cdubiel\PycharmProjects\GlassScraper\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 80, in __init__
    super().__init__(
  File "C:\Users\cdubiel\PycharmProjects\GlassScraper\venv\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 104, in __init__
    super().__init__(
  File "C:\Users\cdubiel\PycharmProjects\GlassScraper\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 286, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\cdubiel\PycharmProjects\GlassScraper\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 378, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\cdubiel\PycharmProjects\GlassScraper\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute
    self.error_handler.check_response(response)
  File "C:\Users\cdubiel\PycharmProjects\GlassScraper\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited normally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
Backtrace:
(No symbol) [0x0060DCE3]
(No symbol) [0x005A39D1]
(No symbol) [0x004B4DA8]
(No symbol) [0x004D20BC]
(No symbol) [0x004CED19]
(No symbol) [0x005015AE]
(No symbol) [0x0050129C]
(No symbol) [0x004FACC6]
(No symbol) [0x004D6F68]
(No symbol) [0x004D80CD]
GetHandleVerifier [0x00883832+2506274]
GetHandleVerifier [0x008B9794+2727300]
GetHandleVerifier [0x008BE36C+2746716]
GetHandleVerifier [0x006B6690+617600]
(No symbol) [0x005AC712]
(No symbol) [0x005B1FF8]
(No symbol) [0x005B20DB]
(No symbol) [0x005BC63B]
BaseThreadInitThunk [0x76947D69+25]
RtlInitializeExceptionChain [0x77A3B74B+107]
RtlClearBits [0x77A3B6CF+191]


Process finished with exit code 1

I've attempted complete reinstalls of Python, Chrome, and restarted my machine but nothing has fixed the error. I would greatly appreciate any help. 

Reply all
Reply to author
Forward
0 new messages