undetected-chromedriver icon indicating copy to clipboard operation
undetected-chromedriver copied to clipboard

Message: unknown error: cannot connect to chrome at 127.0.0.1:52125

Open snehalwagh opened this issue 2 years ago • 8 comments

I am facing this error. Tried setting different options in chrome but nothing works. Versions I am currently using are:

Chromedriver: 96.0.4664.18 Chrome: 96.0.4664.110-1 undetected-chromedriver: 3.1.0

Unexpected error: Message: unknown error: cannot connect to chrome at 127.0.0.1:52125 from chrome not reachable Stacktrace: #0 0x555dcc35c173 #1 0x555dcbe365df #2 0x555dcbe252b9 #3 0x555dcbe5cd8f #4 0x555dcbe54c86 #5 0x555dcbe90055 #6 0x555dcbe8a253 #7 0x555dcbe5fc6c #8 0x555dcbe60c75 #9 0x555dcc38deea #10 0x555dcc3a39e0 #11 0x555dcc38ee35 #12 0x555dcc3a4f88 #13 0x555dcc38338f #14 0x555dcc3bfe28 #15 0x555dcc3bffa8 #16 0x555dcc3dac6d #17 0x7fe427589fa3

snehalwagh avatar Apr 01 '22 08:04 snehalwagh

same error with

Google Chrome 94.0.4606.54 
ChromeDriver 94.0.4606.113
undetected-chromedriver==3.1.3

blackksheepp avatar Apr 01 '22 08:04 blackksheepp

this happened due to race condition, we need to provide different profile path in options.

options = undetected_chromedriver.ChromeOptions() options.path = <new temp folder path>

snehalwagh avatar Apr 01 '22 19:04 snehalwagh

Same error here too, but I have to say that I'm working with Docker (not sure if this is relevant).

I've tested with different versions of Chrome, from version 90 to 100. The same error occurs with all of them. The driver log is continually filled with this error until it fails:

[1648861215.668][DEBUG]: DevTools HTTP Request: http://127.0.0.1:38429/json/version
[1648861215.671][DEBUG]: DevTools HTTP Request failed
[1648861215.722][DEBUG]: DevTools HTTP Request: http://127.0.0.1:38429/json/version
[1648861215.724][DEBUG]: DevTools HTTP Request failed
[1648861215.775][DEBUG]: DevTools HTTP Request: http://127.0.0.1:38429/json/version
[1648861215.777][DEBUG]: DevTools HTTP Request failed

BlindOSX avatar Apr 02 '22 01:04 BlindOSX

@snehalwagh : there's no ChromeOptions.path attribute, maybe you're talking about ChromeOptions.user_data_dir ? In this case you're right, Chrome can't have shared running profile.

sebdelsol avatar Apr 06 '22 13:04 sebdelsol

It's very likely a duplicate of #572 which has been resolved (this was not a bug btw). Please check that your undetected-chromedriver package and your Chrome are both correctly updated.

sebdelsol avatar Apr 08 '22 17:04 sebdelsol

In the Ubuntu 20.04, I have the same problem with you. However, in my macOS Monterey, I don't have such problem. A little bit confusing for me.

Altman-S avatar Jun 25 '22 12:06 Altman-S

The same issue here with CentOS 8

hosam7080 avatar Jul 25 '22 00:07 hosam7080

The same issue here with CentOS 8

Ok, I figured out my problem when I tried to launch google chrome binary alone, and it gave an error saying that it should run with --no-sandbox option, so I add it to my code and it worked

hosam7080 avatar Jul 25 '22 15:07 hosam7080

The same issue here with CentOS 8

Ok, I figured out my problem when I tried to launch google chrome binary alone, and it gave an error saying that it should run with --no-sandbox option, so I add it to my code and it worked

It doesn't work for me.I always have --no-sandox option

thefreelight avatar Dec 16 '22 11:12 thefreelight