HOOK-ERROR in after_step: TimeoutException: Message: timeout - selenium

Sometimes, when my script is run by jenkins i get an error:
HOOK-ERROR in after_step: TimeoutException: Message: timeout
(Session info: chrome=69.0.3497.92)
(Driver info: chromedriver=2.35.528139
(47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.4.0-128-generic x86_64)
i cannot reproduce this situation on my local machine. Do you have any idea how can i check and fix it?

This error message...
HOOK-ERROR in after_step: TimeoutException: Message: timeout
(Session info: chrome=69.0.3497.92)
(Driver info: chromedriver=2.35.528139
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.35
Release Notes of chromedriver=2.35 clearly mentions the following :
Supports Chrome v62-64
You are using chrome=69.0
Release Notes of ChromeDriver v2.43 clearly mentions the following :
Supports Chrome v69-71
So there is a clear mismatch between the ChromeDriver v2.35 and the Chrome Browser v69.0
Solution
Upgrade JDK to recent levels JDK 8u191.
Upgrade Selenium to current levels Version 3.14.0.
Upgrade ChromeDriver to current ChromeDriver v2.42 level.
Keep Chrome version between Chrome v69-71 levels. (as per ChromeDriver v2.43 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Execute your #Test.

Related

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 97 using Selenium and ChromeDriver

Installed selenium chromedriver and it shows this:
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 97
you are using a wrong version of chrome driver go to chrome://version in your chrome browser and take the chromedriver version that is equal to your chrome browser version.
This error message...
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 97
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=97.0
Release Notes of chromedriver=97.0 clearly mentions the following :
Supports Chrome version 97
Possibly you are using the latest chrome=96.0.4664.93
Release Notes of ChromeDriver v96.0 clearly mentions the following :
Supports Chrome version 96
So there is a clear mismatch between chromedriver=91.0 and the chrome=96.0.4664.45
Solution
Ensure that:
ChromeDriver is updated to current ChromeDriver v96.0 level.
Chrome is updated to current chrome=96.0.4664.45 (as per chrome=96.0.4664.45 release notes).

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80

when i go to command prompt and type chromedriver -v:
ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945#{#614})
but when i try to run this code :
from selenium import webdriver
class InstaBot:
def __init__(self):
self.driver=webdriver.Chrome()
self.driver.get("www.instagram.com")
InstaBot()
it gives me error like this:
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80
why this is happening i tried to remove selenium as well as chromedriver
and reinstall of version 79.0.3945 but when i run it ,it show this can only be run on version 80
my chrome version is 79.0.3945 which is lastest ,and version 80 chrome is chrome beta
This error message...
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80
...implies that the ChromeDriver v80.0 was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You mentioned about using chromedriver=79.0.3945.36 and the release notes of chromedriver=79.0 clearly mentions the following :
Supports Chrome v79
Presumably you are using chrome v79.0 browser.
So, it's quite evident your have chromedriver=80.0 present within your system which is also within the system PATH variable and is invoked while you:
self.driver=webdriver.Chrome()
Solution
There are two solutions:
Either you upgrade chrome to Chrome Version 80.0 level. (as per ChromeDriver v80.0 release notes)
Or you can override the default chromedriver v80.0 binary location with chromedriver v79.0 binary location as follows:
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe')
driver.get('http://google.com/')
You can find a detailed discussion in Ubuntu: selenium.common.exceptions: session not created: This version of ChromeDriver only supports Chrome version 79
Additional Considerations
Ensure to:
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test as non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
Reference
You can find a relevant detailed discussion in:
How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium
Use Bonigarcia plugin in project. After that it will manage all driver by itself.It reads chrome version and instantiate driver accordingly.
for help follow my post :
https://www.linkedin.com/pulse/webdrivermanager-bonigarcia-rohan-ravi-yadav/
or original git link/post
https://github.com/bonigarcia/webdrivermanager
If any help required , Let me know

InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 76 with ChromeDriver Selenium in AzureDevOPS

I have Ux Automation test project where in I am using the NuGet for Selenium.Chrome.WebDriver. The Agent in the release pipeline has below versions of chrome & WebDriver
Google Chrome
version:
75.0.3770.100
Selenium Web Drivers
Chrome Driver
version:
75.0.3770.90
Environment:
ChromeWebDriver: location of chromedriver.exe
I have tried check-in the project with 75 & 76 NuGet reference. However, I am getting below error in both cases.
System.InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 76 (SessionNotCreated)
Which version it is complaining for?
This error message...
System.InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 76 (SessionNotCreated)
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Though you mentioned about using chromedriver=75.0.3770.90 there may be multiple instances of chromedriver being present in your system and the the version of the chromedriver which is effective in your tests is chromedriver=76.0
Release Notes of chromedriver=76.0 clearly mentions the following :
Supports Chrome version 76
Presumably you are using chrome= 75.0.
Release Notes of ChromeDriver v75.0 clearly mentions the following :
Supports Chrome 75
So there is a clear mismatch between the ChromeDriver v76.0 and the Chrome Browser v75.0
Solution
Ensure that:
Selenium is upgraded to current levels Version 3.141.59.
ChromeDriver is updated to current ChromeDriver v79.0.3945.36 level.
Chrome is updated to current Chrome Version 79.0 level. (as per ChromeDriver v79.0 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test as non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
Reference
You can find a relevant detailed discussion in:
How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium

How to fix this issue " chrome browser compatibilty issue in selenium webdriver"?

I am just trying to automate a piece of code for automating the contact form, it was working fine a month ago but right now it's showing the below mention error
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: Chrome version must be between 70 and 73
(Driver info: chromedriver=73.0.3683.20 (8e2b610813e167eee3619ac4ce6e42e3ec622017),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.19 seconds
version compatibility issue, my chrome version is 74.** something and selenium is supporting 70-73
Issue : Your Chrome Browser Version is 74 and Your framework is having ChromeDriver Binary v73.0.3683.20 which supports Chrome Browser v73
Solution : Update your ChromeDriver Binary Version to v74.0.3729.6
Please have a look at Chrome Browser Release Section : Chrome Browser vs ChromeDriver Binary and follow below information -
If you are using Chrome version 75, please download ChromeDriver 75.0.3770.8
If you are using Chrome version 74, please download ChromeDriver 74.0.3729.6 (You shall follow this)
If you are using Chrome version 73, please download ChromeDriver 73.0.3683.68
For older version of Chrome, please see this discussion for the version of ChromeDriver that supports it.
Hope following above would resolve your issue.

Error number: 33: SessionNotCreatedError session not created exception from unknown error while trying to simulate chrome browser using SeleniumBasic

I have been using the COM interface provided by Internet Explorer but, since some sites have now moved on and don't support IE, I have been looking to substitute this with SeleniumBasic.
As this is completely new to me, I'm at the very basic level - I've downloaded the
Selenium Type Library (I've downloaded the Selenium library reference from Github, and referenced is in the module).
I've put in a very basic bit of code to test it out but I'm getting the following error:
Error number: 33
Error description:
SessionNotCreatedError session not created exception from unknown
error: Runtime.executionContextCreated has invalid 'context':
{"auxData":{"frameId":"AE85B634088DDFB4B8E7D65A145ADA0F","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=69.0.3497.100) (Driver info:
chromedriver=2.21.371459
(36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0
x86_64)
The code is;
Sub TestCode()
Dim driver as New Selenium.Chrome
driver.get "www.Google.com"
End Sub
I've tried this with firefox and Edge browsers too but am getting the same issues - any suggestions on what might be going wrong?
This error message...
SessionNotCreatedError session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"AE85B634088DDFB4B8E7D65A145ADA0F","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=69.0.3497.100)
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0 x86_64)
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.21
Release Notes of chromedriver=2.21 clearly mentions the following :
Supports Chrome v46-50
You are using chrome=69.0
Release Notes of ChromeDriver v2.42 clearly mentions the following :
Supports Chrome v68-70
So there is a clear mismatch between ChromeDriver v2.21 and the Chrome Browser v69.0
Solution
Upgrade Selenium to current levels Version 3.14.0.
Upgrade ChromeDriver to current ChromeDriver v2.42 level.
Keep Chrome version between Chrome v68-70 levels. (as per ChromeDriver v2.42 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Execute your #Test.
Update A
As per florentbr/SeleniumBasic the last version of SeleniumBasic (A Selenium based browser automation framework for VB.Net, Visual Basic Applications and VBScript) seems to be Release v2.0.9.0 only.
As per the CHANGELOG of Release v2.0.9.0 the underlying components are:
Firefox driver version 2.52.0
IE driver version 2.52.1
Update B
If you intend to use GeckoDriver with Firefox you can following the matrix below: