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 Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1874415

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

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  Since I upgraded my Ubuntu 19.04 laptop to Ubuntu 19.10 I've been
  unable to run Robot Framework tests using SeleniumLibrary with Chrome.
  I keep getting errors from chromedriver:

  
  Parent suite setup failed:
  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.)

  
  Things work somewhat better when I ask chromium to run in headless mode, 
although I still get weird failures partway through the test suite (I think on 
the first test that uses Select Window): TimeoutException: Message: timeout: 
Timed out receiving message from renderer: 300.000.

  It would be easier to debug this if I could _see_ what the browser is
  doing, which brings us back to the original problem: non-headless
  chromium doesn't work in 19.10.

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

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to