Getting “The chromedriver version cannot be discovered” error when i follow install chrome in render using
build command:
./render-build.sh && pip install -r requirements.txt
start command:
export PATH=“${PATH}:/opt/render/project/.render/chrome/opt/google/chrome” && uvicorn flipkart_app:app --host 0.0.0.0 --port $PORT
# Wait for the page to fully load (adjust the delay as needed)
driver.implicitly_wait(6)
# Get the page source after the JavaScript has rendered
html = driver.page_source
soup = BeautifulSoup(html, "html.parser")
…
if name == “main”:
uvicorn.run(app, host=“0.0.0.0”, port=8080)
Please help to fix error
raise SeleniumManagerException(f"Selenium Manager failed for: {command}.\n{result}{stderr}")
How are you including the Chromedriver in your service? For Python, the easiest way is to use this: https://pypi.org/project/webdriver-manager/. Note that you will also need to install Chorme if you are not already doing so.
I wasn’t sure about this, but it does look like Selenium’s version of Web Driver Manager is included in their package, so you shouldn’t need the package I suggested in my previous response. They both do the same thing.
Checking the output from the Selenium Manager on your current service it seems to work fine, though it is possible the output from opt/render/project/src/.venv/lib/python3.11/site-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --output json is what is expected.
Can you try updating Selenium to the latest version? If this doesn’t help, please open a ticket directly with us. I would like to share some specific details of the failure with you, but I don’t want to post them in a public forum.