1
options = Options()
options.add_argument('use-fake-device-for-media-stream')
options.BinaryLocation = "/usr/bin/chromium-browser"

driver = webdriver.Chrome(executable_path="/usr/bin/chromedriver",options=options)

On executing the above with sudo python3 script_name.py, the following errows shows up:

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /snap/chromium/current/command-chromium.wrapper is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

The above error doesnt show up on executing python3 script_name.py, I believe that has to do something with the display. Please let me know how I can resolve this. Other details: Chromium version: 85.0.4183.83 Selenium version:3.141.0 Chrome webDriver version: 85.0.4183.83

  • You can try to set some browser flags https://github.com/testerSunshine/12306/issues/327#issuecomment-530657428 – Honsa Stunna Sep 30 '20 at 07:42
  • You can try the solution given here. It helped me. https://stackoverflow.com/a/56638103/5210943 – jab May 21 '22 at 01:53

0 Answers0