You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Chrome更新后ChromeDriver脚本连接失败求助(版本110.0.5481.77)

Chrome更新后ChromeDriver 110.0.5481.77无法连接Chrome的解决方案

Chrome浏览器完成最近一次更新后,使用ChromeDriver 110.0.5481.77的脚本无法正常运行,抛出如下错误:

Retrieving novel info...
Exception in thread Thread-1 (read_novel_info):
Traceback (most recent call last):
  File "lncrawl\templates\browser\basic.py", line 88, in read_novel_info
  File "C:\Users\Byzz\AppData\Local\Temp\_MEI138682\sources\en\w\webnovel.py", line 112, in read_novel_info_in_scraper
    raise FallbackToBrowser()
lncrawl.core.exeptions.FallbackToBrowser

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "lncrawl\templates\browser\basic.py", line 95, in read_novel_info
  File "C:\Users\Byzz\AppData\Local\Temp\_MEI138682\sources\en\w\webnovel.py", line 116, in read_novel_info_in_browser
    self.visit(f"{self.home_url}{path}/catalog")
  File "lncrawl\templates\browser\basic.py", line 65, in visit
  File "lncrawl\core\browser.py", line 155, in visit
  File "lncrawl\core\browser.py", line 62, in _init_browser
  File "lncrawl\webdriver\__init__.py", line 35, in create_new
  File "lncrawl\webdriver\local.py", line 115, in create_local
  File "undetected_chromedriver\__init__.py", line 431, in __init__
  File "selenium\webdriver\chrome\webdriver.py", line 80, in __init__
  File "selenium\webdriver\chromium\webdriver.py", line 104, in __init__
  File "selenium\webdriver\remote\webdriver.py", line 286, in __init__
  File "undetected_chromedriver\__init__.py", line 693, in start_session
  File "selenium\webdriver\remote\webdriver.py", line 378, in start_session
  File "selenium\webdriver\remote\webdriver.py", line 440, in execute
  File "selenium\webdriver\remote\errorhandler.py", line 245, in check_response
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:65428
from unknown error: unable to discover open pages
Stacktrace:
Backtrace:
        (No symbol) [0x00E537D3]
        (No symbol) [0x00DE8B81]
        (No symbol) [0x00CEB36D]
        (No symbol) [0x00D0ED6D]
        (No symbol) [0x00D070F0]
        (No symbol) [0x00D06EE1]
        (No symbol) [0x00D41ED5]
        (No symbol) [0x00D41B2C]
        (No symbol) [0x00D3B216]
        (No symbol) [0x00D10D97]
        (No symbol) [0x00D1253D]
        GetHandleVerifier [0x010CABF2+2510930]
        GetHandleVerifier [0x010F8EC1+2700065]
        GetHandleVerifier [0x010FC86C+2714828]
        GetHandleVerifier [0x00F03480+645344]
        (No symbol) [0x00DF0FD2]
        (No symbol) [0x00DF6C68]
        (No symbol) [0x00DF6D4B]
        (No symbol) [0x00E00D6B]
        BaseThreadInitThunk [0x75C100F9+25]
        RtlGetAppContainerNamedObjectPath [0x77D37BBE+286]
        RtlGetAppContainerNamedObjectPath [0x77D37B8E+238]

以下是针对该问题的具体解决方法:

  • 严格匹配Chrome与ChromeDriver版本:ChromeDriver的主版本号必须和本地安装的Chrome浏览器完全一致。比如Chrome版本为110.x.x.x,就下载对应110分支的ChromeDriver,避免跨版本混用。
  • 清理残留进程:打开任务管理器,结束所有chrome.exe和chromedriver.exe进程后重新运行脚本。旧进程可能占用端口或资源,导致新驱动无法建立连接。
  • 调整undetected_chromedriver启动参数:
    • 显式指定Chrome二进制路径,避免驱动找不到浏览器:
      import undetected_chromedriver as uc
      driver = uc.Chrome(executable_path="C:/Program Files/Google/Chrome/Application/chrome.exe")
      
    • 添加禁用沙箱、GPU加速等参数,提升兼容性:
      options = uc.ChromeOptions()
      options.add_argument("--no-sandbox")
      options.add_argument("--disable-gpu")
      options.add_argument("--disable-dev-shm-usage")
      driver = uc.Chrome(options=options)
      
  • 更新undetected_chromedriver:旧版本的undetected_chromedriver可能对新Chrome版本支持不足,执行命令更新到最新版:
    pip install --upgrade undetected-chromedriver
    
  • 检查lncrawl配置:确认lncrawl的浏览器驱动配置是否指向正确的ChromeDriver路径,必要时尝试切换到远程驱动模式(如果环境支持)。
  • 暂时关闭Chrome自动更新:若不想频繁处理版本兼容问题,可以关闭Chrome的自动更新功能,避免浏览器版本突然变更导致驱动失效。

内容的提问来源于stack exchange,提问作者lockdown

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 04:31:01