I am trying to run this application: https://github.com/flathunters/flathunter
I installed this on a fresh Ubuntu 18.04.6 LTS installation. The package requires Python v3.6+. I am using pipenv install
and pipenv shell
as recommended in the install instructions.
Additionally a chrome-web-driver is required.
I tried to install globally install it on my VPS as explained in https://stackoverflow.com/a/32139981/2311074 and point it to /usr/lib/chromium-browser/chromedriver
.
I start the script every day for 14 hours. The application works for a couple of days and then it will always exit with a selenium.common.exceptions.SessionNotCreatedException
Traceback (most recent call last):
File "/home/adam/flathunter/flathunt.py", line 95, in <module>
main()
File "/home/adam/flathunter/flathunt.py", line 68, in main
config = Config(config_handle.name)
File "/home/adam/flathunter/flathunter/config.py", line 29, in __init__
self.__searchers__ = [CrawlImmobilienscout(self),
File "/home/adam/flathunter/flathunter/crawl_immobilienscout.py", line 43, in __init__
self.driver = self.configure_driver(self.driver_executable_path, self.driver_arguments)
File "/home/adam/flathunter/flathunter/abstract_crawler.py", line 53, in configure_driver
driver = webdriver.Chrome(executable_path=driver_path, options=chrome_options)
File "/home/adam/.local/share/virtualenvs/flathunter-SBM5Nxub/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/home/adam/.local/share/virtualenvs/flathunter-SBM5Nxub/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/home/adam/.local/share/virtualenvs/flathunter-SBM5Nxub/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/adam/.local/share/virtualenvs/flathunter-SBM5Nxub/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/adam/.local/share/virtualenvs/flathunter-SBM5Nxub/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from tab crashed
(Session info: headless chrome=98.0.4758.80)
Same issue if I download the chrome driver directly from https://chromedriver.chromium.org/
I have chrome and chrome-driver v98 installed.
When I reinstall the machine, it will work again for a few days and then fail at some day forever.
What am I doing wrong here?