ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

chrome not reachable,help

Open andysdc opened this issue 2 years ago • 17 comments

'unknown error: cannot connect to chrome at 127.0.0.1:52302 from chrome not reachable'

chrome版本:版本 109.0.5414.119(正式版本) (x86_64) chromedriver -> /usr/local/Caskroom/chromedriver/109.0.5414.74/chromedriver

andysdc avatar Feb 06 '23 13:02 andysdc

Are you in a virtual environment such as conda?

acheong08 avatar Feb 06 '23 13:02 acheong08

Also, please note that the Official API is available. The unofficial API is no longer actively supported by myself due to IP blocks

acheong08 avatar Feb 06 '23 13:02 acheong08

Are you in a virtual environment such as conda?

yes

andysdc avatar Feb 07 '23 01:02 andysdc

Also, please note that the Official API is available. The unofficial API is no longer actively supported by myself due to IP blocks

Tried. Unfortunately, the chatgpt version is too low.

andysdc avatar Feb 07 '23 01:02 andysdc

Are you in a virtual environment such as conda?

yes

Conda blocks Python from accessing Chrome in my experience

acheong08 avatar Feb 07 '23 02:02 acheong08

Also, please note that the Official API is available. The unofficial API is no longer actively supported by myself due to IP blocks

Tried. Unfortunately, the chatgpt version is too low.

What do you mean? If there is a bug with the official version, I will try to fix it.

acheong08 avatar Feb 07 '23 02:02 acheong08

Also, please note that the Official API is available. The unofficial API is no longer actively supported by myself due to IP blocks

Tried. Unfortunately, the chatgpt version is too low.

What do you mean? If there is a bug with the official version, I will try to fix it.

No bug, but the the official version is "text-chat-davinci-002-20221122", not the latest version

andysdc avatar Feb 07 '23 02:02 andysdc

Are you in a virtual environment such as conda?

yes

Conda blocks Python from accessing Chrome in my experience

Hello, I don't use conda, but appeared same error.

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:37674

chenlikun avatar Feb 07 '23 02:02 chenlikun

You might have to define the chromedriver path manually in the config

acheong08 avatar Feb 07 '23 02:02 acheong08

any sample with this? sorry noob question 😂🙏 i was using browserless but cost money 😰 want to try browser version but having this same error

hafidzaini avatar Feb 10 '23 06:02 hafidzaini

on unofficial.py contain : self.session = tls_client.Session( client_identifier="chrome_108", )

is the error happen because we use latest chrome 110 ?

toor@chatgpt:~$ google-chrome --version Google Chrome 110.0.5481.77

🤔

hafidzaini avatar Feb 10 '23 06:02 hafidzaini

Install chrome driver

acheong08 avatar Feb 10 '23 07:02 acheong08

oh ok, i thought it was already installed by requirement.txt

hafidzaini avatar Feb 10 '23 07:02 hafidzaini

Python cannot install drivers automatically

acheong08 avatar Feb 10 '23 07:02 acheong08

i see. latest Selenium suggest using webdriver-manager to auto install the driver. https://pypi.org/project/webdriver-manager/ i will try install it manually.

hafidzaini avatar Feb 10 '23 07:02 hafidzaini

spec OS : debian 11 python : Python 3.9.2 selenium : Version: 4.8.0 undetected-chromedriver : Version: 3.4.5 google chrome : Google Chrome 110.0.5481.77 chrome driver : ChromeDriver 104.0.5112.20

config json { "email": "xxx@xxx", "password": "xxxx", "driver_exec_path": "/home/xuser/chromedriver" }

still no luck raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:47045 from chrome not reachable

hafidzaini avatar Feb 10 '23 09:02 hafidzaini

apt install xvfb -y (or what ever your OS is) export DISPLAY=:1 Xvfb $DISPLAY -screen $DISPLAY 1280x1024x16 &

no problem with chrome connection but stuck on browser spawned.

toor@chatgpt:~$ python3 test.py Spawning browser... Browser spawned.

😰

hafidzaini avatar Feb 10 '23 09:02 hafidzaini