Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with creating the driver #672

Open
marchqbismart opened this issue Jul 31, 2024 · 5 comments
Open

Problem with creating the driver #672

marchqbismart opened this issue Jul 31, 2024 · 5 comments

Comments

@marchqbismart
Copy link

Hello,

I'm using selenium and the webdriver_manager package for a bot. I'm currently using it in a function app with python in docker, locally. I had the problem of the THIRD_PARTY file but it's already solved.

Now, if I run the function locally (without docker) it goes okey, but runnig it in docker, it keeps running in the driver creation and keeps 10 minutes charging untill it stops automatically. The function was working some days ago before the version of Chrome changed...

There's someone with the same problem?

Code here:

user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.88 Safari/537.36 Edg/95.0.1020.30"

    chrome_options = webdriver.ChromeOptions()
    download_directory = os.path.join(os.getcwd(), 'files')
    download_directory2 = os.path.join(os.getcwd(), 'screenshots')

    if not os.path.exists(download_directory):
        os.makedirs(download_directory)

    if not os.path.exists(download_directory2):
        os.makedirs(download_directory2)

    prefs = {'download.default_directory': download_directory}
    chrome_options.add_experimental_option('prefs', prefs)
    chrome_options.add_argument("--headless")
    chrome_options.add_argument("--no-sandbox")
    chrome_options.add_argument("--disable-dev-shm-usage")
    chrome_options.add_argument("--window-size=1920x1080")
    chrome_options.add_argument(f"user-agent={user_agent}")

    service = Service(ChromeDriverManager().install())
    driver = webdriver.Chrome(service=service, options=chrome_options)

The problem is in the last line, the service is correctly created.

@glsch
Copy link

glsch commented Aug 1, 2024

I have the same issue. Hard-coding the driver path, the one of the previous version of the driver, and skipping installation step altogether helped.

@SacrilegeTx
Copy link

Where can I find the chromedriver for chrome version=127?
ERROR - Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 127.0.6533.73 with binary path

@glsch
Copy link

glsch commented Aug 4, 2024

I was running my script every day and I had quite a collection of older drivers stored in a specific folder (YOUR_USER_FOLDER/.wdm/drivers/chromedriver/... on Mac).

@praditik
Copy link

praditik commented Aug 5, 2024

Same error. This needs resolution OR the chrome is not usable by webdriver_manager anymore as of this version.

@CalebePrates
Copy link

chrome_path = ChromeDriverManager().install()
if "THIRD_PARTY_NOTICES.chromedriver" in chrome_path:
    chrome_path = chrome_path.replace("THIRD_PARTY_NOTICES.chromedriver", "chromedriver")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants