flathunters / flathunter

A bot to help people with their rental real-estate search. 🏠🤖

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with Chromedriver in gcloud "executable may have wrong permissions"

friedrichtroescher opened this issue · comments

When deploying using

gcloud app deploy
gcloud app deploy cron.yaml

flathunter crashes with the following error code:

2023-07-11 03:40:00 default[20230711t053010] [2023-07-11 03:40:00 +0000] [11] [INFO] Starting gunicorn 20.1.0
2023-07-11 03:40:00 default[20230711t053010] [2023-07-11 03:40:00 +0000] [11] [INFO] Listening at: http://0.0.0.0:8081 (11)
2023-07-11 03:40:00 default[20230711t053010] [2023-07-11 03:40:00 +0000] [11] [INFO] Using worker: gthread
2023-07-11 03:40:01 default[20230711t053010] [2023-07-11 03:40:01 +0000] [20] [INFO] Booting worker with pid: 20
2023-07-11 03:40:01 default[20230711t053010] [2023-07-11 03:40:01 +0000] [23] [INFO] Booting worker with pid: 23
2023-07-11 03:40:01 default[20230711t053010] [2023-07-11 03:40:01 +0000] [24] [INFO] Booting worker with pid: 24
2023-07-11 03:40:01 default[20230711t053010] [2023-07-11 03:40:01 +0000] [25] [INFO] Booting worker with pid: 25
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [23] [ERROR] Exception in worker process
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 800, in init restore_signals, start_new_session) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 1567, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: ''
2023-07-11 03:40:07 default[20230711t053010] During handling of the above exception, another exception occurred:
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process super().init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app mod = importlib.import_module(module) File "/layers/google.python.runtime/python/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/srv/main.py", line 9, in config = Config() File "/srv/flathunter/config.py", line 32, in init self.searchers = [CrawlImmobilienscout(self), File "/srv/flathunter/crawl_immobilienscout.py", line 42, in init self.driver = self.configure_driver(self.driver_executable_path, self.driver_arguments) File "/srv/flathunter/abstract_crawler.py", line 57, in configure_driver driver = webdriver.Chrome(executable_path=driver_path, options=chrome_options) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 88, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: '' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [25] [ERROR] Exception in worker process
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 800, in init restore_signals, start_new_session) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 1567, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: ''
2023-07-11 03:40:07 default[20230711t053010] During handling of the above exception, another exception occurred:
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process super().init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app mod = importlib.import_module(module) File "/layers/google.python.runtime/python/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/srv/main.py", line 9, in config = Config() File "/srv/flathunter/config.py", line 32, in init self.searchers = [CrawlImmobilienscout(self), File "/srv/flathunter/crawl_immobilienscout.py", line 42, in init self.driver = self.configure_driver(self.driver_executable_path, self.driver_arguments) File "/srv/flathunter/abstract_crawler.py", line 57, in configure_driver driver = webdriver.Chrome(executable_path=driver_path, options=chrome_options) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 88, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: '' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [20] [ERROR] Exception in worker process
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 800, in init restore_signals, start_new_session) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 1567, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: ''
2023-07-11 03:40:07 default[20230711t053010] During handling of the above exception, another exception occurred:
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process super().init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app mod = importlib.import_module(module) File "/layers/google.python.runtime/python/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/srv/main.py", line 9, in config = Config() File "/srv/flathunter/config.py", line 32, in init self.searchers = [CrawlImmobilienscout(self), File "/srv/flathunter/crawl_immobilienscout.py", line 42, in init self.driver = self.configure_driver(self.driver_executable_path, self.driver_arguments) File "/srv/flathunter/abstract_crawler.py", line 57, in configure_driver driver = webdriver.Chrome(executable_path=driver_path, options=chrome_options) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 88, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: '' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [24] [ERROR] Exception in worker process
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 800, in init restore_signals, start_new_session) File "/layers/google.python.runtime/python/lib/python3.7/subprocess.py", line 1567, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: ''
2023-07-11 03:40:07 default[20230711t053010] During handling of the above exception, another exception occurred:
2023-07-11 03:40:07 default[20230711t053010] Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process super().init_process() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app mod = importlib.import_module(module) File "/layers/google.python.runtime/python/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/srv/main.py", line 9, in config = Config() File "/srv/flathunter/config.py", line 32, in init self.searchers = [CrawlImmobilienscout(self), File "/srv/flathunter/crawl_immobilienscout.py", line 42, in init self.driver = self.configure_driver(self.driver_executable_path, self.driver_arguments) File "/srv/flathunter/abstract_crawler.py", line 57, in configure_driver driver = webdriver.Chrome(executable_path=driver_path, options=chrome_options) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/layers/google.python.pip/pip/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 88, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: '' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [23] [INFO] Worker exiting (pid: 23)
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [20] [INFO] Worker exiting (pid: 20)
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [25] [INFO] Worker exiting (pid: 25)
2023-07-11 03:40:07 default[20230711t053010] [2023-07-11 03:40:07 +0000] [24] [INFO] Worker exiting (pid: 24)
2023-07-11 03:40:08 default[20230711t053010] [2023-07-11 03:40:08 +0000] [11] [WARNING] Worker with pid 20 was terminated due to signal 15
2023-07-11 03:40:08 default[20230711t053010] [2023-07-11 03:40:08 +0000] [11] [WARNING] Worker with pid 24 was terminated due to signal 15
2023-07-11 03:40:08 default[20230711t053010] [2023-07-11 03:40:08 +0000] [11] [WARNING] Worker with pid 25 was terminated due to signal 15
2023-07-11 03:40:08 default[20230711t053010] [2023-07-11 03:40:08 +0000] [11] [INFO] Shutting down: Master
2023-07-11 03:40:08 default[20230711t053010] [2023-07-11 03:40:08 +0000] [11] [INFO] Reason: Worker failed to boot.

does anyone have an idea how this could be resolved? I would very much appreciate any help!

Taking a look into the errror it says: "executable may have wrong permissions."

maybe check your permissions and set it accordingly to https://sites.google.com/a/chromium.org/chromedriver/home.

Hope that helps

@friedrichtroescher Did this resolve your issue?

Yes, it did! Thank you.