omkarcloud/g2-scraper

Getting issue of opening and closing Chrome Web Browser repeatedly

AKASHSE-123 opened this issue · 1 comments

Getting Error in terminal

Traceback (most recent call last):
File "/Users/akash/PycharmProjects/SCRAPPER/g2-scraper/main.py", line 5, in
launch_tasks(*tasks_to_be_run)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/launch_tasks.py", line 54, in launch_tasks
current_output = task.begin_task(current_data, task_config)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/base_task.py", line 249, in begin_task
final = run_task(False, 0)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/base_task.py", line 196, in run_task
driver = self.create_driver(config)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/base_task.py", line 73, in create_driver
driver = create_driver(config)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/create_driver.py", line 288, in create_driver
driver = retry_if_is_error(
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/utils.py", line 96, in retry_if_is_error
raise e
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/utils.py", line 81, in retry_if_is_error
created_result = func()
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/bose/create_driver.py", line 254, in run
driver = BoseUndetectedDriver(
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 453, in init
super(Chrome, self).init(
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in init
super().init(DesiredCapabilities.CHROME['browserName'], "goog",
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 92, in init
super().init(
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 272, in init
self.start_session(capabilities, browser_profile)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 716, in start_session
super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 364, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "/Users/akash/PycharmProjects/SCRAPPER/venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:56374
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 119.0.6045.105
Stacktrace:
0 undetected_chromedriver 0x000000010dcfc6b8 undetected_chromedriver + 4937400
1 undetected_chromedriver 0x000000010dcf3b73 undetected_chromedriver + 4901747
2 undetected_chromedriver 0x000000010d8b1616 undetected_chromedriver + 435734
3 undetected_chromedriver 0x000000010d8e3d10 undetected_chromedriver + 642320
4 undetected_chromedriver 0x000000010d8daf98 undetected_chromedriver + 606104
5 undetected_chromedriver 0x000000010d922a08 undetected_chromedriver + 899592
6 undetected_chromedriver 0x000000010d921ebf undetected_chromedriver + 896703
7 undetected_chromedriver 0x000000010d918de3 undetected_chromedriver + 859619
8 undetected_chromedriver 0x000000010d8e6d7f undetected_chromedriver + 654719
9 undetected_chromedriver 0x000000010d8e80de undetected_chromedriver + 659678
10 undetected_chromedriver 0x000000010dcb82ad undetected_chromedriver + 4657837
11 undetected_chromedriver 0x000000010dcbd130 undetected_chromedriver + 4677936
12 undetected_chromedriver 0x000000010dcc3def undetected_chromedriver + 4705775
13 undetected_chromedriver 0x000000010dcbe05a undetected_chromedriver + 4681818
14 undetected_chromedriver 0x000000010dc9092c undetected_chromedriver + 4495660
15 undetected_chromedriver 0x000000010dcdb838 undetected_chromedriver + 4802616
16 undetected_chromedriver 0x000000010dcdb9b7 undetected_chromedriver + 4802999
17 undetected_chromedriver 0x000000010dcec99f undetected_chromedriver + 4872607
18 libsystem_pthread.dylib 0x00007ff815e56202 _pthread_start + 99
19 libsystem_pthread.dylib 0x00007ff815e51bab thread_start + 15

Fixes