Home > Enterprise >  Incompatible chromedriver and chrome versions except they are both 96
Incompatible chromedriver and chrome versions except they are both 96

Time:12-19

I am using Selenium python with chromedriver and I got the usual error about incompatible chromedriver and chrome versions:

session not created
from disconnected: unable to connect to renderer
  (Session info: chrome=96.0.4664.110)

I went and downloaded chromedriver 96 but I keep getting that same error. Here is my output when i check the chromedriver version :

> chromedriver --version
ChromeDriver 96.0.4664.45 (76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947})

Here is how I initialize the driver in my code:

options = Options()
port = '8888'
options.add_argument('--remote-debugging-port='   port)
options.add_argument('headless')
try:
    driver = webdriver.Chrome(options=options)
except:
...

EDIT : After updating Selenium to ver. 4.1.0, I now get a stacktrace with the same error :

session not created
from disconnected: unable to connect to renderer
  (Session info: chrome=96.0.4664.110)
Stacktrace:
Backtrace:
    Ordinal0 [0x00916903 2517251]
    Ordinal0 [0x008AF8E1 2095329]
    Ordinal0 [0x007B2848 1058888]
    Ordinal0 [0x007A376E 997230]
    Ordinal0 [0x007B3A60 1063520]
    Ordinal0 [0x007FBA7A 1358458]
    Ordinal0 [0x007FA71A 1353498]
    Ordinal0 [0x007F639B 1336219]
    Ordinal0 [0x007D27A7 1189799]
    Ordinal0 [0x007D3609 1193481]
    GetHandleVerifier [0x00AA5904 1577972]
    GetHandleVerifier [0x00B50B97 2279047]
    GetHandleVerifier [0x009A6D09 534521]
    GetHandleVerifier [0x009A5DB9 530601]
    Ordinal0 [0x008B4FF9 2117625]
    Ordinal0 [0x008B98A8 2136232]
    Ordinal0 [0x008B99E2 2136546]
    Ordinal0 [0x008C3541 2176321]
    BaseThreadInitThunk [0x76ACFA29 25]
    RtlGetAppContainerNamedObjectPath [0x77A17A9E 286]
    RtlGetAppContainerNamedObjectPath [0x77A17A6E 238]

CodePudding user response:

I think the problem was related to the fact that I launched the driver in headless mode and that it doesn't stop itself when the program stops, which caused the program to crash when being started again.

Solution: use driver.quit() at the end of the program

  • Related