Error launching chrome after new update.

396 views
Skip to first unread message

Ice Sickle

unread,
Nov 23, 2022, 10:14:39 PM11/23/22
to Selenium Users
Our team has been running selenium testing using Python for chrome and firefox for years. Today someone was updated to the latest chrome version (107.0.5304.107). and is now unable to run selenium. I updated to the same version to verify and I am having the same issue. 

In the past selenium would open chrome in a new window using the guest profile. Now it's attempting to open in the currently open chrome window using the local user's profile. I tried to force it to use guest but it still crashed ~4 seconds into the run

Not sure if this is just a selenium issue and we need to wait for an update or something we can fix. I tried to look around for other solutions with the errors below but most are related to Linux permissions. We are testing on windows. Firefox is still running fine and chrome does seem to work if I run in headless but that's, not a solution we can use for our testing team.

Versions:
Python: 3.10.4
Selenium: 4.6.0
Webdriver manager: 3.8.5
Chrome: 107.0.5304.107

Stack trace:
conftest.py:58: in ui
    driver = webdriver.Chrome(executable_path=ChromeDriverManager().install(), options=options)
C:\test\PycharmProjects\Global Compliance\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py:81: in __init__
    super().__init__(
C:\test\PycharmProjects\Global Compliance\venv\lib\site-packages\selenium\webdriver\chromium\webdriver.py:106: in __init__
    super().__init__(
C:\test\PycharmProjects\Global Compliance\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:288: in __init__
    self.start_session(capabilities, browser_profile)
C:\test\PycharmProjects\Global Compliance\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:381: in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
C:\test\PycharmProjects\Global Compliance\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:444: in execute
    self.error_handler.check_response(response)
C:\test\PycharmProjects\Global Compliance\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py:249: in check_response
    raise exception_class(message, screen, stacktrace)
E   selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited normally.
E     (unknown error: DevToolsActivePort file doesn't exist)
E     (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.)

⇜Krishnan Mahadevan⇝

unread,
Nov 23, 2022, 10:17:22 PM11/23/22
to seleniu...@googlegroups.com
Take a look at this Stackoverflow post: https://stackoverflow.com/q/50790733

Gist of the post: Please check the user as which chrome browser is getting spun off as. Is your browser being spun off as administrator maybe? 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/48ccb804-f520-4f50-b32c-9d00f166fe03n%40googlegroups.com.

Ice Sickle

unread,
Nov 24, 2022, 12:10:26 PM11/24/22
to Selenium Users
Ya, I found that page first and was giving its solutions a try. From what i can tell chrome is not running as admin. I tried various arguments to try and use a different profile, disable gpu, sandbox, disabled dev shm usage. All seem to act the same. Chrome will always open a new tab in my current browser instead of opening a new one. 

app.png
If I close my current browser then it does open a new window and I get the "chrome is being controlled...." message. After about 1 min of sitting at the main chrome screen selenium fails with the same error as my first message. If I have an existing chrome open then it opens a new tab in that chrome and fails within ~4 seconds.
 chrome.png

Every time selenium opens chrome it's using my personal profile with all my extensions. Before the updating to the newest chrome version, it was fine so the only thing that changed was updating chrome. 

Ice Sickle

unread,
Nov 24, 2022, 12:12:30 PM11/24/22
to Selenium Users
Cant edit my last post. In the first picture the column with "No" is the "Elevated" column in task manager on the details tab.

Ice Sickle

unread,
Nov 28, 2022, 1:18:43 PM11/28/22
to Selenium Users

Chrome pushed another update and now if i have chrome closed and run my script i am shown this screen 
chrome.png

From here i can manually click Guest or my Selenium profile and the script will run like normal and pass. I created the selenium profile to try and force selenium to use that when opening chrome. i have tried using profile-directory and the user-data arguments but they all have no change and show the screen above when running the script. 
options.png

Does anyone know of a way to force selenium to open chrome using the guest or a specific profile? The guest would be best because having a path to app data in our testing framework would not be great. Would require each tester to pass in the path to their chrome install.

Michael Odumosu

unread,
Mar 6, 2023, 10:08:19 PM3/6/23
to Selenium Users

Same issue here sounds like this is a bug

Michael Odumosu

unread,
Mar 6, 2023, 10:08:22 PM3/6/23
to Selenium Users
im using selenium java  even the older version are not working for me it may be the browser itself you have to revert

On Monday, November 28, 2022 at 1:18:43 PM UTC-5 alep...@gmail.com wrote:

Michael Odumosu

unread,
Mar 6, 2023, 10:08:27 PM3/6/23
to Selenium Users
here's the code I used to at least get it to open but then I get devtools active port doesn't exist

  @Override
  public  WebDriver getDriver(Boolean headless) {

    System.setProperty(
      "webdriver.chrome.driver",
      CommonUtils.dotenv.get("CHROMEDRIVER")
    );

    ChromeOptions options = new ChromeOptions();
    options
    .addArguments("--no-sandbox")
    .addArguments("--user-data-dir=C:\\Users\\Restop-8734\\AppData\\Local\\Google\\Chrome\\User Data")
    .addArguments("--start-maximized")
    .addArguments("disable-infobars")
    .addArguments("--disable-extensions")
    .addArguments("--disable-gpu")
    .addArguments("--disable-gpu")
    .addArguments("--disable-dev-shm-usage'")
    .addArguments("--profile-directory=Default")
    .setExperimentalOption("useAutomationExtension", false);
    if(headless == true){
      options.addArguments("--headless");
    }
    // ChromeDriverService service = new ChromeDriverService.Builder()
    // .usingDriverExecutable(new File(CommonUtils.dotenv.get("CHROMEDRIVER")))
    // .build();
    driver = new ChromeDriver(options);
    return driver;
  }

On Monday, November 28, 2022 at 1:18:43 PM UTC-5 alep...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages