Forums

Update Chrome & Chrome driver to latest version

Disregard the title. What's the path of the chromedriver ?

If you are on the latest system image (fishnchips), you should have a /usr/bin/chromium-browser

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 87
Current browser version is 78.0.3904.70 with binary path /usr/bin/chromium-browser

Is there any option to update the chrome version to latest ?

You could install it, but it would use up a lot of your disk space and it's not something we could actively support. Our next system image will likely upgrade Chrome.

It looks like you've installed your own chromedriver binary; if you delete it and just use the one that is installed by default, if will be compatible with the installed Chrome binary.

How can i resolve this, how to install our own chrome, how much disk space i may take

Error: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 102 Current browser version is 90.0.4430.212 with binary path /usr/bin/chromium

We are not able to help you with that, as it is possible, but not something we support. Use pre-installed Chromium and Chromedriver.

Facing the same issue as above, please let me know how to solve it.

@votice Are you able to run example code from https://help.pythonanywhere.com/pages/selenium ?

Hello I Installed the Chrome Driver but it is not working.

It is showing the error. Traceback (most recent call last):

File "/home/Powerdxcv/20.py", line main()

55,

in

<module>

File "/home/Powerdxcv/20.py", line 44, in main driver login(email, password) File "/home/Powerdxcv/20.py", line 7, in login driver = webdriver. Chrome (options-chrome_options)

File "/usr/local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py",

line

70,

in

ini

super(WebDriver, self).__init_(DesiredCapabilities.CHROME [ 'browserName'], "goog". File "/usr/local/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 92, in __i

nit

RemoteWebDriver.init(

File "/usr/local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py it

",

line 275

, in __in

self.start_session (capabilities, browser_profile)

File "/usr/local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line

365,

in star

t_session

response = self.execute(Command. NEW SESSION, parameters) File "/usr/local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 430, in exec ute

self.error_handler.check_response(response) File "/usr/local/lib/python3, 10/site-packages/selenium/webdriver/remote/errorhandler.py

", line 247, in c

heck response

raise exception_class(message, screen, stacktrace)

selenium.common.exceptions. WebDriver Exception: Message: unknown error: Chrome failed to start: exited abno

risally.

(unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is ass uming that Chrome has crashed.)

Stacktrace: #0 0x555ce9c0de89 <unknown>

@Powerdxcv You don't need to install chromedriver. Use the pre-installed one. Are you able to run example code from https://help.pythonanywhere.com/pages/selenium ?

Hi I am trying to use undetected-chrome driver: cannot connect to chrome at 127.0.0.1:33783 from session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 90.0.4430.212 Stacktrace: #0 0x55ebea5a64e3 <unknown> #1 0x55ebea2d5c76 <unknown> #2 0x55ebea30304a <unknown> #3 0x55ebea2fa884 <unknown> #4 0x55ebea339ccc <unknown> #5 0x55ebea33947f <unknown> #6 0x55ebea330de3 <unknown> #7 0x55ebea3062dd <unknown> #8 0x55ebea30734e <unknown> #9 0x55ebea5663e4 <unknown> #10 0x55ebea56a3d7 <unknown> #11 0x55ebea574b20 <unknown> #12 0x55ebea56b023 <unknown> #13 0x55ebea5391aa <unknown> #14 0x55ebea58f6b8 <unknown> #15 0x55ebea58f847 <unknown> #16 0x55ebea59f243 <unknown> #17 0x7f5d57e0c609 start_thread

Looks like you are not using pre-installed chromedriver but some other one.

how can i solve this error

** Message: session not created: This version of ChromeDriver only supports Chrome version 90 Current browser version is 117.0.5938.88 with binary path /home/Eyas1988p/.cache/selenium/chrome/linux64/117.0.5938.88/chrome Stacktrace: /#0 0x564bf3ce8e89 <unknown> **

Don't use whatever version of chromedriver that you appear to be using. If you do not specify a chromdriver, it will use the one that we already have installed that will work with the version of chrome that we have installed.

this is the code i use
what should i do?
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
driver = webdriver.Chrome(options=chrome_options)

What do you get when you run "which chromedriver" in a Bash console?

i get this
/usr/local/bin/chromedriver

Have you recently changed your system image and are you running that in a console that was created before the change?

15:37 ~ $ python telegram_bot.py selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED (Session info: headless chrome=90.0.4430.212) Stacktrace:

0 0x557934be5e89 <unknown>

On a free account, you can only access websites on our allowlist

I have the same issue as Eyas1988p. Exact same code and when I run the Bash console I also get /usr/local/bin/chromedriver. How do I proceed? I have not changed my system image

Could yo try running the example code from https://help.pythonanywhere.com/pages/selenium ?

I am getting the following error: {"error":"Message: \n"}

Where are you running the example code?

code:

def function():
           try: 
                 # other code here
                 chrome_options = webdriver.ChromeOptions()
                 chrome_options.add_argument("--no-sandbox")
                 chrome_options.add_argument('--headless')  # Run Chrome in headless mode
                 chrome_options.add_argument("--disable-gpu")
                 browser = webdriver.Chrome(options=chrome_options)

                for row in data: 
                     # other code here 
                     browser.get("https://www.google.com")
                     print("Page title was '{}'".format(browser.title))

                     if xyz not in browser.current_url:
                               # misc code
                     else: 
                            browser.quit()

                browser.quit()

I meant where is this code being executed (e.g. in a console)?

Honestly, I don't know. I wrote the code on PyCharm, put it in a Git repository, and then pulled the files into PythonAnywhere. The {"error":"Message: \n"} error message occurs when running the code on PythonAnywhere. The code will successfully function on PyCharm as well as port 5000

But how do you run it? What do you mean by "running the code on PythonAnywhere". That could be in the console, in the web app, ins the scheduled task etc

Run it through the web app. Sorry for the confusion

Your code appears to be catching the exception and then not providing it in the response from the web app. Find where that response is generated and include the traceback in the response so you can use that to debug it.

Appreciate it. I was able to make progress.

Now my issue is that the code doesn't work on PythonAnywhere. For example, in my code there is a button that will be pressed to connect to a Google Form. When I run this code in PythonAnywhere and press the button everything appears as though the Google Form data would be added, however, when I check the Google Form, nothing is filled out.

Then, if I use the exact same code on PyCharm it will run and execute exactly as intended. How do I fix this?

Use screenshots on PythonAnywhere at strategic points so you can see if the filling in and button pressing are going as you expect.

Could it be an issue with not using the proxy? How do I integrate the proxy into my code? Would docs.google.com classify as a page on the allowed list?

Hard to say from the information you've provided. There must be some part of the code that's not working as expected. My advice would be to add some extra logging, check all returned values to track down what's not working. We can help much better if you were to provide some specific error

I am getting a TimeoutException error. The code executes through the driver.get("https://docs.google.com/forms/.....") line and the succeeding line: wait = WebDriverWait(driver, 30). However, at this point the error occurs and the following code does not execute:

 input_element = wait.until(EC.element_to_be_clickable(
            (By.XPATH,'//*[@id="mG61Hd"]/div[2]/div/div[2]/div[1]/div/div/div[2]/div/div[1]/div/div[1]/input')))

[edit by admin: formatting]

Perhaps it would be worth putting a screenshot call (browser.get_screenshot_as_file(filename)) just before that line to see if the page is showing any errors that might prevent that button from becoming clickable?

I have the same issue as Eyas1988p the chrome doesn't start

and give me this error
Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x55cfa293ee89 <unknown>

Can you please share your code?