[Desktop-packages] [Bug 1874415] Re: chromedriver doesn't work with the snap package, without --headless
Indeed, your last comment is relevant, I can now reproduce the problem in a Wayland session. The same test runs fine in an X11 session. ** Summary changed: - chromedriver doesn't work with the snap package, without --headless + [snap] chromedriver doesn't work without --headless under Wayland ** Tags added: snap -- 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: [snap] chromedriver doesn't work without --headless under Wayland 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
[Desktop-packages] [Bug 1874415] Re: chromedriver doesn't work with the snap package, without --headless
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 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 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
[Desktop-packages] [Bug 1874415] Re: chromedriver doesn't work with the snap package, without --headless
That minimal example doesn't run here in a clean 20.04 VM with the chromium snap. However if I apply this minimal modification to the script, it succeeds, with and without the headless switch: -driver = webdriver.Chrome(options=options) +driver_path = "/snap/bin/chromium.chromedriver" +driver = webdriver.Chrome(options=options, executable_path=driver_path) Does this work for you? -- 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
[Desktop-packages] [Bug 1874415] Re: chromedriver doesn't work with the snap package, without --headless
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
[Desktop-packages] [Bug 1874415] Re: chromedriver doesn't work with the snap package, without --headless
I am able to successfully run the chromium snap's (admittedly very basic) tests without headless mode. The tests are at https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap- from-source/tree/tests?h=stable. Marius, could you maybe share a minimal reproducer that fails, so I can investigate further? -- 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
[Desktop-packages] [Bug 1874415] Re: chromedriver doesn't work with the snap package, without --headless
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: chromium-browser (Ubuntu) Status: New => Confirmed -- 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