Forums

Chrome drive is crashing on Pythonanywhere

Hello, I have a working selenium script (tested on local and EC2), but somehow it is crashing on pythonanywhere after the first iteration of my scraping task. I ensured I maintained just one driver session to avoid memory issues. Please could someone explain to me why the chrome driver is crashing?

Message: unknown error: session deleted because of page crash
from tab crashed
(Session info: headless chrome=90.0.4430.212)
Stacktrace:
#0 0x55c20e785e89 <unknown>

For more info, I am using chrome driver version 90.0.4430.212 (that is the latest and I can't update it because I don't have root access)

Can you show exactly what kind of errors are you getting? Also -- is the code sample from this page working for you?

I got it to work, I had to tweak my selenium driver setting when I realized I hadn't gone past my CPU usage.

OK, glad to hear that you got it working!

Hello again

I have had to perform an automated test on PythonAnywhere using ssh. Basically, the same command I ran using pythonanywhere console didn't work over ssh. Please, what am I missing?

PS: this has to do with selenium + I am using a premium account and below is the error message over ssh

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
  (chrome not reachable)
  (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x55f62fb99e89 <unknown>

Currently selenium will not work via ssh on PythonAnywhere.

I had a lot of issues with it and timeout, maybe try giving it 30 or 40 seconds and then see if it solves your issue!

@avipars -- but using selenium over SSH on PythonAnywhere will not work.