Selenium.common.exceptions.WebDriverException:消息:未知错误:无法在127.0.0.1:36059 Ubuntu 20 LTS连接到Chrome

wz1wpwve  于 2022-10-27  发布在  其他
关注(0)|答案(1)|浏览(318)

因此,我的代码如下

  1. import undetected_chromedriver.v2 as uc2
  2. options = uc2.ChromeOptions()
  3. browser=uc2.Chrome(options=options,enable_cdp_event=True,executable_path='/home/pablo/Escritorio/chromedriver')

并抛出以下错误

  1. selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:34959
  2. from session not created: This version of ChromeDriver only supports Chrome version 100
  3. Current browser version is 99.0.4844.84

现在第一次发生这种情况时,我只是通过在ubuntu中运行来更新Chrome

  1. sudo apt-get update
  2. sudo apt-get upgrade

现在如果我这么做了

  1. google-chrome --version
  2. >>Google Chrome 100.0.4896.60

然而,完全相同的错误正在发生。为什么它指向一个不再存在的Chrome版本?

xxls0lw8

xxls0lw81#

出现这种情况是因为您尚未更新浏览器。更新Chrome。

相关问题