WebDriverException:未知错误:ChromeDriver 80.0.3987.106 和 Chrome 80.0.3987.122 无法发现打开的页面错误 [英] WebDriverException: unknown error: unable to discover open pages error with ChromeDriver 80.0.3987.106 and Chrome 80.0.3987.122

查看:72
本文介绍了WebDriverException:未知错误:ChromeDriver 80.0.3987.106 和 Chrome 80.0.3987.122 无法发现打开的页面错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的本​​地 Windows 10 计算机将自动 chrome 版本更新为 80.0.3987.122(构建官方)(64 位)

My local windows 10 computer update auto chrome version to 80.0.3987.122 (Build officiel) (64 bits)

我使用 https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_win32.zip

但现在我有这个错误:

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'WX-PC123456', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_211'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
    Ordinal0 [0x013A0C83+1707139]
    Ordinal0 [0x013068F1+1075441]
    Ordinal0 [0x0127DFC9+516041]
    Ordinal0 [0x012104C2+66754]
    Ordinal0 [0x0120CCE2+52450]
    Ordinal0 [0x0122BFD7+180183]
    Ordinal0 [0x0122BDDD+179677]
    Ordinal0 [0x01229D4B+171339]
    Ordinal0 [0x01211D4A+73034]
    Ordinal0 [0x01212DC0+77248]
    Ordinal0 [0x01212D59+77145]
    Ordinal0 [0x0131BB67+1162087]
    GetHandleVerifier [0x0143A966+508998]
    GetHandleVerifier [0x0143A6A4+508292]
    GetHandleVerifier [0x0144F7B7+594583]
    GetHandleVerifier [0x0143B1D6+511158]
    Ordinal0 [0x0131402C+1130540]
    Ordinal0 [0x0131D4CB+1168587]
    Ordinal0 [0x0131D633+1168947]
    Ordinal0 [0x01335B35+1268533]
    BaseThreadInitThunk [0x757E8674+36]
    RtlGetAppContainerNamedObjectPath [0x77475E17+311]
    RtlGetAppContainerNamedObjectPath [0x77475DE7+263]

如何解决这个问题?

推荐答案

这个错误信息...

org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'WX-PC123456', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_211'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
    Ordinal0 [0x013A0C83+1707139]

...暗示 ChromeDriver 无法启动/生成新的浏览上下文,即 Chrome 浏览器 会话.

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.

似乎问题出在 ChromeDriver安全功能 沙盒.要绕过此功能,您可以使用以下参数:

It seems the issue is with ChromeDriver,s security feature of Sandboxing. To bypass this feature you can use the argument:

--no-sandbox

所以你的有效代码块将是:

So your effective code block will be:

  • Java

  • Java

options.addArguments("--no-sandbox"); # Bypass OS security model

  • Python

  • Python

    options.add_argument('--no-sandbox') # Bypass OS security model
    

  • 这篇关于WebDriverException:未知错误:ChromeDriver 80.0.3987.106 和 Chrome 80.0.3987.122 无法发现打开的页面错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆