Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome not reachable? #363

Open
2 tasks done
nowerrrrr opened this issue Sep 24, 2023 · 8 comments
Open
2 tasks done

chrome not reachable? #363

nowerrrrr opened this issue Sep 24, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@nowerrrrr
Copy link

nowerrrrr commented Sep 24, 2023

Before submitting a bug report...

  • This bug wasn't already reported.
    (I have checked every bug report on GitHub)

Title

  • The title is no longer "[BUG] Title" and I edited it with the right error name.

Describe the bug

idk what it could be rlly maybe the ver of chrome compared to the driver?

Copy and paste your error

py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at ******************
from chrome not reachable
Stacktrace:
GetHandleVerifier [0x00CDCEB3+45171]
(No symbol) [0x00C69101]
(No symbol) [0x00B5BCE0]
(No symbol) [0x00B50D21]
(No symbol) [0x00B83A38]
(No symbol) [0x00B7D73C]
(No symbol) [0x00B7D56F]
(No symbol) [0x00BB1AA6]
(No symbol) [0x00BB163C]
(No symbol) [0x00BAAE46]
(No symbol) [0x00B8675E]
(No symbol) [0x00B878FD]
GetHandleVerifier [0x00F954B9+2897529]
GetHandleVerifier [0x00FDDC6B+3194411]
GetHandleVerifier [0x00FD7A41+3169281]
GetHandleVerifier [0x00D66130+606960]
(No symbol) [0x00C72E7C]
(No symbol) [0x00C6F008]
(No symbol) [0x00C6F12F]
(No symbol) [0x00C61827]
BaseThreadInitThunk [0x770700C9+25]
RtlGetAppContainerNamedObjectPath [0x772F7B4E+286]
RtlGetAppContainerNamedObjectPath [0x772F7B1E+238]

Screenshots

browser dosent open

Value of dashboard variable

none

@nowerrrrr nowerrrrr added the bug Something isn't working label Sep 24, 2023
@OmegaBowser
Copy link

Same here...

@naughty00shortie
Copy link

Chrome is not closing correctly after switching accounts. It works for the first account and then the second account gets the error. if you manually close all chrome tabs it should work again.

@naughty00shortie
Copy link

naughty00shortie commented Sep 30, 2023

It looks like this is fixed by editing /src/utils.py

change self.webdriver.close() to self.webdriver.quit() on line 73

@RikiCatte
Copy link

It looks like this is fixed by editing /src/utils.py

change self.webdriver.close() to self.webdriver.quit() on line 73

It's not good because with quit() method you will close all selenium tabs and you don't have to do that, so you have to keep using close() method.

@RikiCatte
Copy link

RikiCatte commented Oct 15, 2023

I've changed the sleep value between () on lines 72 & 74 from 0.5 to 2 and it's working fine.
before: time.sleep(0.5) after: time.sleep(2)

P.S. always in utils.py

@rakosi2
Copy link

rakosi2 commented Oct 16, 2023

I have tried both line 73 and 72,74 edits and neither fixed my error, I have same error message but my Traceback is different. This is on a Headless Ubuntu Server 23.04

2023-10-16 14:16:05,665 [INFO] Using default request storage
2023-10-16 14:16:05,675 [INFO] Created proxy listening on 127.0.0.1:42559
2023-10-16 14:16:05,676 [INFO] Using undetected_chromedriver
2023-10-16 14:16:06,324 [INFO] patching driver executable /home/rakosi2/.local/share/undetected_chromedriver/undetected_chromedriver
2023-10-16 14:17:06,883 [ERROR] WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:35535
from chrome not reachable
Stacktrace:
#0 0x561148aa1fb3 <unknown>
#1 0x5611487752f6 <unknown>
#2 0x561148760ffa <unknown>
#3 0x5611487aca3c <unknown>
#4 0x5611487a42a9 <unknown>
#5 0x5611487e7ac6 <unknown>
#6 0x5611487de713 <unknown>
#7 0x5611487b118b <unknown>
#8 0x5611487b1f7e <unknown>
#9 0x561148a678d8 <unknown>
#10 0x561148a6b800 <unknown>
#11 0x561148a75cfc <unknown>
#12 0x561148a6c418 <unknown>
#13 0x561148a3942f <unknown>
#14 0x561148a904e8 <unknown>
#15 0x561148a906b4 <unknown>
#16 0x561148aa1143 <unknown>
#17 0x7f3c0d88f6ba <unknown>

Traceback (most recent call last):
  File "/home/rakosi2/Microsoft-Rewards-Farmer/main.py", line 24, in main
    executeBot(currentAccount, notifier, args)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/main.py", line 127, in executeBot
    with Browser(mobile=False, account=currentAccount, args=args) as desktopBrowser:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/src/browser.py", line 41, in __init__
    self.webdriver = self.browserSetup()
                     ^^^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/src/browser.py", line 77, in browserSetup
    driver = webdriver.Chrome(
             ^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/seleniumwire/undetected_chromedriver/webdriver.py", line 61, in __init__
    super().__init__(*args, **kwargs)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 466, in __init__
    super(Chrome, self).__init__(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py", line 56, in __init__
    super().__init__(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 205, in __init__
    self.start_session(capabilities)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 724, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 289, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
    self.error_handler.check_response(response)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/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:35535
from chrome not reachable
Stacktrace:
#0 0x561148aa1fb3 <unknown>
...

@RikiCatte
Copy link

RikiCatte commented Oct 17, 2023

I have tried both line 73 and 72,74 edits and neither fixed my error, I have same error message but my Traceback is different. This is on a Headless Ubuntu Server 23.04

2023-10-16 14:16:05,665 [INFO] Using default request storage
2023-10-16 14:16:05,675 [INFO] Created proxy listening on 127.0.0.1:42559
2023-10-16 14:16:05,676 [INFO] Using undetected_chromedriver
2023-10-16 14:16:06,324 [INFO] patching driver executable /home/rakosi2/.local/share/undetected_chromedriver/undetected_chromedriver
2023-10-16 14:17:06,883 [ERROR] WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:35535
from chrome not reachable
Stacktrace:
#0 0x561148aa1fb3 <unknown>
#1 0x5611487752f6 <unknown>
#2 0x561148760ffa <unknown>
#3 0x5611487aca3c <unknown>
#4 0x5611487a42a9 <unknown>
#5 0x5611487e7ac6 <unknown>
#6 0x5611487de713 <unknown>
#7 0x5611487b118b <unknown>
#8 0x5611487b1f7e <unknown>
#9 0x561148a678d8 <unknown>
#10 0x561148a6b800 <unknown>
#11 0x561148a75cfc <unknown>
#12 0x561148a6c418 <unknown>
#13 0x561148a3942f <unknown>
#14 0x561148a904e8 <unknown>
#15 0x561148a906b4 <unknown>
#16 0x561148aa1143 <unknown>
#17 0x7f3c0d88f6ba <unknown>

Traceback (most recent call last):
  File "/home/rakosi2/Microsoft-Rewards-Farmer/main.py", line 24, in main
    executeBot(currentAccount, notifier, args)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/main.py", line 127, in executeBot
    with Browser(mobile=False, account=currentAccount, args=args) as desktopBrowser:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/src/browser.py", line 41, in __init__
    self.webdriver = self.browserSetup()
                     ^^^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/src/browser.py", line 77, in browserSetup
    driver = webdriver.Chrome(
             ^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/seleniumwire/undetected_chromedriver/webdriver.py", line 61, in __init__
    super().__init__(*args, **kwargs)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 466, in __init__
    super(Chrome, self).__init__(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py", line 56, in __init__
    super().__init__(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 205, in __init__
    self.start_session(capabilities)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 724, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 289, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
    self.error_handler.check_response(response)
  File "/home/rakosi2/Microsoft-Rewards-Farmer/.venv/lib/python3.11/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:35535
from chrome not reachable
Stacktrace:
#0 0x561148aa1fb3 <unknown>
...

Try initializing both desktopBrowser = None and mobileBrowser = None, after logging.info function at line 124, when you did this, paste this code after line 159

if mobileBrowser is not None:
mobileBrowser.closeBrowser()

    if desktopBrowser is not None:
        desktopBrowser.closeBrowser()

This way it should force the correct closing of both browsers (only if they are valorized). I'm running that on windows 11, but I don't think the problem is the different platform.

@rakosi2
Copy link

rakosi2 commented Oct 20, 2023

@RikiCatte I tried that on main.py and I still get same error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants