4

I am trying to run my script for selenium/chromedrive but keep getting the error below.

Selenium ver 4.72 Chrome Browser version:Version 108.0.5359.125 (Official Build) (64-bit) ChromeDriver version: ChromeDriver 108.0.5359.71

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.)

Script: from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service options = Options() options.binary_location = "C:/Program Files/Google/Chrome/Application/chrome.exe"

options.add_argument("--no-sandbox") s = Service(executable_path=r'C:/Bin/chromedriver.exe') driver = webdriver.Chrome(service=s, options=options) driver.get("https://www.walmart.com")

Thanks you for any help

I have also tried Selenium manager but no good. I'm at my wits end

I think it might be because my chrome is installed in Application folder instead of user/appdata? Not too sure. What is the default location for Chrome? I've tried uninstialling chrome/and appdata and reinistalling but it puts me back at that folder.

U13-Forward
  • 69,221
  • 14
  • 89
  • 114
Huy Tran
  • 41
  • 1
  • 2

3 Answers3

0

There appears to be a bug with the latest chromedriver according to this thread: https://groups.google.com/g/chromedriver-users/c/wYA8JQB7l0A

Try running in headless mode and it will spin up properly.

C.J.
  • 1
0

Same here - Bug still there in chrome/chromedriver V110.XXXX @ 14 Feb2 023 Disable the option --headless, that seems to work.

0

I got same error. If you dont want to use option --headless You Should try this, Before executing the code, close all the chrome browser windows and try. –