Skip to content

[🐛 Bug]: Can't connect to Chrome service after update to 136 #15715

Open
@mgelberg

Description

@mgelberg

Description

Getting the following error on my Mac: selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service /Users/michaelgelberg/.wdm/drivers/chromedriver/mac64/136.0.7103.92/chromedriver-mac-x64/chromedriver

It was working fine last week, tried to update to the latest version of Selenium/WebDriver as well, no dice.

Reproducible Code

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager

def test_selenium():
    print("Setting up Chrome options...")
    chrome_options = Options()
    chrome_options.add_argument("--headless")
    chrome_options.add_argument("--no-sandbox")
    chrome_options.add_argument("--disable-dev-shm-usage")
    
    print("Initializing Chrome driver...")
    driver = webdriver.Chrome(
        service=Service(ChromeDriverManager().install()),
        options=chrome_options
    )
    
    try:
        print("Attempting to access a test website...")
        driver.get("https://www.google.com")
        print("Successfully loaded Google!")
        print(f"Page title: {driver.title}")
    except Exception as e:
        print(f"Error occurred: {str(e)}")
    finally:
        print("Closing browser...")
        driver.quit()

if __name__ == "__main__":
    test_selenium()

ℹ️ Last known working version: 4.31

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsD-chromeI-defectSomething is not working as intendedI-regressionSomething was working but we "fixed" itOS-mac

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions