I'm breaking my head here trying to get the Selenium Driver/Chromedriver to work on a Flask project on Ubuntu server 20.04, Python3.8.
The application runs perfectly when on stand alone, and on Debug mode.
But when I run it behind the web server, Apache2 with the WSGI module, it does not work right.
the message I'm greeting is "Chromedriver quite unexpectedly".
Again Chromedriver works well, path is correct and when I run it on debub on the server or even standalone remotely it work really great.
I'm runing out of options here if anyone could help I woud really appreciate it.
This is how I'm opening Chromedriver on my code:
options = Options()
options.add_argument("--headless")
options.add_argument("--disable-gpu")
options.add_argument("--no-sandbox")
options.add_argument("enable-automation")
options.add_argument("--disable-infobars")
options.add_argument("--disable-dev-shm-usage")
driver = webdriver.Chrome(executable_path="/usr/lib/chromium-browser/chromedriver", options=options)
Looking at the log from Apache this is the message I'm getting
WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.15.0-66-generic x86_64)
question from:
https://stackoverflow.com/questions/65640769/flask-selenium-ubuntu-apache 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…