Forums

(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

As of a few days ago I am getting this error every time I try and run a script. I didn't make any changes on my end so I am wondering if something in the environment changed?

2022-08-29 20:18:00,466: Exception on /scrape [GET] Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2051, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1501, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1499, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1485, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/home/dreamdrivesforkids/mysite/dashboard.py", line 196, in scrape all_records += processor._at_get(this_search + _at_limit, row['vehicle'], row['exclude']) File "/home/dreamdrivesforkids/mysite/processor.py", line 481, in _at_get web_driver = webdriver.Chrome(options=chrome_options) File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in init RemoteWebDriver.init( File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.9/site-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: crashed. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) NO MATCH**

Is your chromedriver configured like in the example? https://help.pythonanywhere.com/pages/selenium

Cheers for that link. I was not using the '--no-sandbox' flag I suddenly started getting this error a few days ago on code that has run fine for months. Adding that flag fixed it for me... even though using this flag in typical environments is frowned upon.

It looks like the result of our last deploy when we introduced some changes to our virtualization.

This works on my local machine, but I can't get this to work on my paid site I am using Python 3.7 on system image glastonbury via Jupyter Notebook in a virtualenv (venv). I have tried with both selenium 4.3.1 and 4.4.3, but neither of them work. I am using your exact code from the link above to start, but I'm getting the error after the code:

from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--no-sandbox") chrome_options.add_argument("--headless") chrome_options.add_argument("--disable-gpu")

browser = webdriver.Chrome(options=chrome_options)

try: browser.get("https://www.google.com") print("Page title was '{}'".format(browser.title)) finally: browser.quit()


WebDriverException Traceback (most recent call last) /tmp/ipykernel_3757117/2970306774.py in <module> 4 chrome_options.add_argument("--headless") 5 chrome_options.add_argument("--disable-gpu") ----> 6 browser = webdriver.Chrome(options=chrome_options) 7 try: 8 browser.get("https://www.google.com")

~/.virtualenvs/venv/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py in init(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive)

~/.virtualenvs/venv/lib/python3.7/site-packages/selenium/webdriver/chromium/webdriver.py in init(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive) 112 113 :Returns: --> 114 A dict. For example: 115 {'latency': 4, 'download_throughput': 2, 'upload_throughput': 2, 116 'offline': False}

~/.virtualenvs/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py in init(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options) 286 287 Example: --> 288 289 with webdriver.file_detector_context(UselessFileDetector): 290 someinput.send_keys('/etc/hosts')

~/.virtualenvs/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py in start_session(self, capabilities, browser_profile) 379 elif isinstance(value, self._shadowroot_cls): 380 return {'shadow-6066-11e4-a52e-4f735466cecf': value.id} --> 381 elif isinstance(value, list): 382 return list(self._wrap_value(item) for item in value) 383 else:

~/.virtualenvs/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params) 442 443 :Usage: --> 444 :: 445 446 title = driver.title

~/.virtualenvs/venv/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 247 raise exception_class(message, screen, stacktrace) 248 --> 249 def _value_or_default(self, obj: Mapping[_KT, _VT], key: _KT, default: _VT) -> _VT: 250 return obj[key] if key in obj else default

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace:

0 0x55bac4fd3e89 <unknown>

Chrome works in notebooks only in newest "haggis" system image.