haq / microsoft-rewards-bot

docker image for Microsoft-Rewards-Farmer by charlesbel
103 stars 12 forks source link

Cannot Connect To Chrome #14

Closed royaltongue closed 1 year ago

royaltongue commented 1 year ago

Hey there, just pulled the latest image and I'm getting this error when trying to run python main.py --discord https://discord.com/api/webhooks/[redacted]

2023-10-12 05:13:44,294 [INFO] ********************[redacted]********************
2023-10-12 05:13:45,134 [INFO] Using default request storage
2023-10-12 05:13:45,138 [INFO] Created proxy listening on 127.0.0.1:34957
2023-10-12 05:13:45,138 [INFO] Using undetected_chromedriver
2023-10-12 05:13:52,899 [INFO] patching driver executable /root/.local/share/undetected_chromedriver/undetected_chromedriver
2023-10-12 05:13:53,553 [ERROR] WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:48351
from session not created: This version of ChromeDriver only supports Chrome version 118
Current browser version is 117.0.5938.149
Stacktrace:
#0 0x55b33819efb3 <unknown>
#1 0x55b337e724a7 <unknown>
#2 0x55b337eaa95b <unknown>
#3 0x55b337ea9c1a <unknown>
#4 0x55b337ea12a9 <unknown>
#5 0x55b337ee4ac6 <unknown>
#6 0x55b337edb713 <unknown>
#7 0x55b337eae18b <unknown>
#8 0x55b337eaef7e <unknown>
#9 0x55b3381648d8 <unknown>
#10 0x55b338168800 <unknown>
#11 0x55b338172cfc <unknown>
#12 0x55b338169418 <unknown>
#13 0x55b33813642f <unknown>
#14 0x55b33818d4e8 <unknown>
#15 0x55b33818d6b4 <unknown>
#16 0x55b33819e143 <unknown>
#17 0x7f4ccda3e044 <unknown>

Traceback (most recent call last):
  File "/app/main.py", line 24, in main
    executeBot(currentAccount, notifier, args)
  File "/app/main.py", line 127, in executeBot
    with Browser(mobile=False, account=currentAccount, args=args) as desktopBrowser:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/browser.py", line 41, in __init__
    self.webdriver = self.browserSetup()
                     ^^^^^^^^^^^^^^^^^^^
  File "/app/src/browser.py", line 77, in browserSetup
    driver = webdriver.Chrome(
             ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/seleniumwire/undetected_chromedriver/webdriver.py", line 61, in __init__    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.12/site-packages/undetected_chromedriver/__init__.py", line 466, in __init__
    super(Chrome, self).__init__(
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 56, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 205, in __init__
    self.start_session(capabilities)
  File "/usr/local/lib/python3.12/site-packages/undetected_chromedriver/__init__.py", line 724, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 289, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, 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:48351
from session not created: This version of ChromeDriver only supports Chrome version 118
Current browser version is 117.0.5938.149
Stacktrace:
#0 0x55b33819efb3 <unknown>
#1 0x55b337e724a7 <unknown>
#2 0x55b337eaa95b <unknown>
#3 0x55b337ea9c1a <unknown>
#4 0x55b337ea12a9 <unknown>
#5 0x55b337ee4ac6 <unknown>
#6 0x55b337edb713 <unknown>
#7 0x55b337eae18b <unknown>
#8 0x55b337eaef7e <unknown>
#9 0x55b3381648d8 <unknown>
#10 0x55b338168800 <unknown>
#11 0x55b338172cfc <unknown>
#12 0x55b338169418 <unknown>
#13 0x55b33813642f <unknown>
#14 0x55b33818d4e8 <unknown>
#15 0x55b33818d6b4 <unknown>
#16 0x55b33819e143 <unknown>
#17 0x7f4ccda3e044 <unknown>
haq commented 1 year ago

I pushed a new version of the image, try pulling it to see if it's working.

royaltongue commented 1 year ago

New error saying that dashboard is not defined:

2023-10-13 00:48:11,854 [INFO] ********************[redacted]********************
2023-10-13 00:48:16,677 [INFO] patching driver executable /root/.local/share/undetected_chromedriver/undetected_chromedriver
2023-10-13 00:48:17,239 [INFO] Screen size: 1141x940
2023-10-13 00:48:17,239 [INFO] Device size: 1086x789
2023-10-13 00:48:17,253 [INFO] [LOGIN] Logging-in...
2023-10-13 00:48:19,882 [INFO] [LOGIN] Writing email...
2023-10-13 00:48:21,163 [INFO] [LOGIN] Writing password...
2023-10-13 00:48:45,108 [INFO] [LOGIN] Logged-in !
2023-10-13 00:49:05,916 [INFO] [LOGIN] Ensuring login on Bing...
2023-10-13 00:49:12,103 [INFO] [LOGIN] Logged-in successfully !
2023-10-13 00:49:12,104 [INFO] [POINTS] You have 31737.00 points on your account !
2023-10-13 00:49:12,104 [INFO] [DAILY SET] Trying to complete the Daily Set...
2023-10-13 00:49:47,037 [INFO] [DAILY SET] Completing search of card 1
2023-10-13 00:50:01,682 [INFO] [DAILY SET] Completing quiz of card 2
2023-10-13 00:58:34,787 [INFO] [DAILY SET] Completed the Daily Set successfully !
2023-10-13 00:58:34,787 [INFO] [PUNCH CARDS] Trying to complete the Punch Cards...
2023-10-13 00:58:35,063 [ERROR] JavascriptException: Message: javascript error: dashboard is not defined
  (Session info: chrome=118.0.5993.70)
Stacktrace:
#0 0x5585ce805fb3 <unknown>
#1 0x5585ce4d94a7 <unknown>
#2 0x5585ce4de509 <unknown>
#3 0x5585ce4e040a <unknown>
#4 0x5585ce55c6ef <unknown>
#5 0x5585ce542942 <unknown>
#6 0x5585ce55bc02 <unknown>
#7 0x5585ce542713 <unknown>
#8 0x5585ce51518b <unknown>
#9 0x5585ce515f7e <unknown>
#10 0x5585ce7cb8d8 <unknown>
#11 0x5585ce7cf800 <unknown>
#12 0x5585ce7d9cfc <unknown>
#13 0x5585ce7d0418 <unknown>
#14 0x5585ce79d42f <unknown>
#15 0x5585ce7f44e8 <unknown>
#16 0x5585ce7f46b4 <unknown>
#17 0x5585ce805143 <unknown>
#18 0x7fa9e113b044 <unknown>

Traceback (most recent call last):
  File "/app/main.py", line 24, in main
    executeBot(currentAccount, notifier, args)
  File "/app/main.py", line 134, in executeBot
    PunchCards(desktopBrowser).completePunchCards()
  File "/app/src/punchCards.py", line 54, in completePunchCards
    punchCards = self.browser.utils.getDashboardData()["punchCards"]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/utils.py", line 116, in getDashboardData
    return self.webdriver.execute_script("return dashboard")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 404, in execute_script
    return self.execute(command, {"script": script, "args": converted_args})["value"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: javascript error: dashboard is not defined
  (Session info: chrome=118.0.5993.70)
Stacktrace:
#0 0x5585ce805fb3 <unknown>
#1 0x5585ce4d94a7 <unknown>
#2 0x5585ce4de509 <unknown>
#3 0x5585ce4e040a <unknown>
#4 0x5585ce55c6ef <unknown>
#5 0x5585ce542942 <unknown>
#6 0x5585ce55bc02 <unknown>
#7 0x5585ce542713 <unknown>
#8 0x5585ce51518b <unknown>
#9 0x5585ce515f7e <unknown>
#10 0x5585ce7cb8d8 <unknown>
#11 0x5585ce7cf800 <unknown>
#12 0x5585ce7d9cfc <unknown>
#13 0x5585ce7d0418 <unknown>
#14 0x5585ce79d42f <unknown>
#15 0x5585ce7f44e8 <unknown>
#16 0x5585ce7f46b4 <unknown>
#17 0x5585ce805143 <unknown>
#18 0x7fa9e113b044 <unknown>
haq commented 1 year ago

https://github.com/charlesbel/Microsoft-Rewards-Farmer/issues/275

royaltongue commented 1 year ago

Ah I'm sorry, hard to remember you're not the one maintaining the script itself. Thank you!