Here's my minimal example:

#!/usr/bin/env python3
import time
import sys
from selenium import webdriver

options = webdriver.chrome.options.Options()
if '--headless' in sys.argv:
    options.add_argument("headless")
driver = webdriver.Chrome(options=options)
driver.get("https://ubuntu.com";)
time.sleep(1)
print(driver.current_url)
driver.quit()


I can run python3 ex.py --headless, and it works (prints https://ubuntu.com 
after 10 seconds).
I can run it without --headless and I get 

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

-- 
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
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to