Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

selenium - WebDriverException: unknown error: unable to discover open pages error with ChromeDriver 80.0.3987.106 and Chrome 80.0.3987.122

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

I use https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_win32.zip

but now I have this error:

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]

How to fix this problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This error message...

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]

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

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

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

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...