Forums

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

can You please switch me to new virtualization so that i can run selenium with chrome. pls help

No problem. I have switched your account. The new system will be used in new consoles and by your web app when it is reloaded.

Glenn,

The same thing is happening to me

Traceback is below

`

Traceback (most recent call last):
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
Traceback (most recent call last):
  File "/home/mattwelter/insta/users/nycforest/lcf.py", line 229, in <module>
    driver = webdriver.Chrome(options=opts)
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
Traceback (most recent call last):
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
Traceback (most recent call last):
  File "/home/mattwelter/insta/users/nycforest/lcf.py", line 229, in <module>
    driver = webdriver.Chrome(options=opts)
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
Traceback (most recent call last):
  File "/home/mattwelter/insta/users/nycforest/lcf.py", line 230, in <module>
    driver = webdriver.Chrome(options=opts)
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/mattwelter/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/mattwelter/.local/lib/python3.8/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: exited abnormally
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)

`

Make sure you're using the correct options and selenium - like in this post: https://www.pythonanywhere.com/forums/topic/27202/#id_post_78144

Also, there seems to be some sort of thing where you're starting multiple subprocesses and multiple webdrivers. First try doing it directly and with only one, before you try doing it multiple times through subprocesses.

Okay I made sure I'm using the correct options and Selenium version like the post you sent, but I'm not sure where I'm starting multiple subprocesses. I searched through the script and I'm only calling only one webdriver. Maybe I'm looking for the wrong thing? Thoughts?

Got my answer, found out I wasn't running headless. All I had to do was uncomment opts.add_argument('--headless')

Good to see that you sorted it out!

hello ! i got the same error. could you please switch my account too. Thanks

No problem I have enabled it for your account.

Thank you for your quick and kind reply.

Can you enable the same for my account as well. I am facing the same error.

No problem, I've switched on the new virtualization system for your account. Any new consoles you start will have the new features; any scheduled/always-on tasks and websites will pick it up the next time they're (re)started.

To use Chrome, you'll also need to upgrade Selenium for your account -- for example, if you're using Python 3.7, run this in Bash:

pip3.7 install --user --upgrade selenium

...and then you can run Selenium with Chrome using code like this:

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)

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

finally:
    browser.quit()

Thank you for your prompt response!!

Hi, can you please switch me to new virtualization so that i can run selenium with chrome. thank a lot in advance

Sure, no problem -- that's done now.

(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64) please help me in this

Hi @hiralnandaniya. We're currently in the process of enabling the new virtualization system for all accounts on PythonAnywhere, which unfortunately may take a week or two to complete. We'll let you know when that has been done for your account; I've made a note to make sure that you're in one of the first batches to be moved over to it.

@hiralnandaniya It's done for you. You should be able to use Chrome now.

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-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

please suggest what to do?

WebDriverException at / Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

I see that you've posted about this in another forum thread so I've answered there.

hello i have same problem.

Have you followed the advice posted by @giles above?

hello ! i got the same error. could you please switch my account too. Thanks

All accounts already have it enabled by default now.