This is interesting information!

I have the chromium and chromium-chromedriver packages installed via
apt.  I wonder if that is why my example (headless) can work without
overriding executable_path?  chromium-chromedriver ships a
/usr/bin/chromedriver that's a shell script that exec's
/snap/bin/chromium.chromedriver.

> Does this work for you?

No.  I get

seleniumwhy.py:10: DeprecationWarning: executable_path has been deprecated, 
please pass in a Service object
  driver = webdriver.Chrome(options=options, executable_path=driver_path)
Traceback (most recent call last):
  File "seleniumwhy.py", line 10, in <module>
    driver = webdriver.Chrome(options=options, executable_path=driver_path)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/chrome/webdriver.py", 
line 95, in __init__
    RemoteWebDriver.__init__(
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", 
line 152, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", 
line 249, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", 
line 318, in execute
    self.error_handler.check_response(response)
  File 
"/usr/lib/python3/dist-packages/selenium/webdriver/remote/errorhandler.py", 
line 242, in check_response
    raise exception_class(message, screen, stacktrace)
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.)


Meanwhile --headless emits the same DeprecationWarning, but works.


I'm also on Ubuntu 20.04 today (was on 19.10 when I filed the bug).  Possibly 
relevant: I use the Ubuntu on Wayland session.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874415

Title:
  chromedriver doesn't work with the snap package, without --headless

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1874415/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to