[americanexpress] issue with selenium in docker
With latest version commited (ed040a1b) my americanexpress backend fails when running within docker with following error:
boobank -b americanexpress ls
Account Balance Coming
---------------------------------------------------------+----------+----------
Bug(americanexpress): Message: unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Use --debug option to print backtraces
---------------------------------------------------------+----------+----------
Current setup being:
- Host OS: Ubuntu 18.04.3 LTS (Bionic Beaver)
- Docker version: 1.5-1build1 from standard repository
- Guest OS: Ubuntu 18.04.4 LTS (Bionic Beaver)
- Python version: 3.6.9
- Selenium-python version: 3.141.0 (from pip)
- ChromeDriver version: 80.0.3987.87 (from package chromium-chromedriver@80.0.3987.87-0ubuntu0.18.04.1)
- Chrome version: 80.0.3987.106 (from package google-chrome-stable@80.0.3987.106-1)
Refering to following post: here adding bellow code in browser.py is solving the issue
# within AmericanExpressLoginBrowser class (line 60)
def _build_options(self):
ops = super(AmericanExpressLoginBrowser, self)._build_options()
# not needed as set within selenium.py
#ops.add_argument("--headless")
ops.add_argument('--no-sandbox')
return ops
Edited by Woob Import