Jump to content

Chromedriver issues August 2024


Go to solution Solved by Danp2,

Recommended Posts

This morning I started to get some feedback my Chrome scripts (using chromedriver) were not working anymore.

I have not determined that on computers with the problem the Chromedriver has the 20-8-2024 19:17 date (august 8, 7:17 PM 😉
Sofar I have done the following things:

  • deleted chromedriver.exe to automatically download a "new" one
  • updated the chromedriver manually to the BETA version and DEV version
  • updated Chrome to the newest via internal Chrome update to v128.0.6613.84

The version of Chrome and the chromdriver are the same version.
https://googlechromelabs.github.io/chrome-for-testing/#stable

I am glad not everyone seems to have the problem yet.
If any one has an idea what might be to problem, please share🙂
Meanwhile I keep looking for more information.
 

Thanks.

 

 

 

Link to comment
Share on other sites

Posted (edited)

Tested this example: https://www.autoitscript.com/wiki/WebDriver#Chrome with the latest Webdriver UDF form @Danp2 https://github.com/Danp2/WebDriver/releases/latest

When my Chrome version was: 127.0.6533.120 , the example downloaded the v127.x.x Chromedriver and worked.
Agter updating my Chrome to version:128.0.6613.85 and downloading the Chromedriver v128.0.6613.84 the example is not working any more.

Running the console I get the following:
 

_WD_UpdateDriver ==> Success [0 / 0] : DriverCurrent = 128.0.6613.84 : DriverLatest = 128.0.6613.84
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=chromedriver.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="..\Autoit\Chromedriver Webdriver Tester\chrome.log"
_WD_GetFreePort ==> Success [0 / 9515] : Parameters:   MinPort=9515   MaxPort=Default
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 X64 19045 
_WD_Startup: AutoIt:    3.3.16.0
_WD_Startup: Webdriver UDF: 1.3.1 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.1 (Download latest source at <https://raw.githubusercontent.com/dragana-r/autoit-winhttp/master/WinHttp.au3>)
_WD_Startup: Driver:    chromedriver.exe (32 Bit)
_WD_Startup: Params:    --verbose --log-path="..\Autoit\Chromedriver Webdriver Tester\chrome.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "chromedriver.exe" --verbose --log-path="..\Autoit\Chromedriver Webdriver Tester\chrome.log" 
_WD_Startup ==> Success [0]
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: chrome
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
__WD_Post ==> Send / Recv error [6] : HTTP status = 0
_WD_CreateSession ==> Webdriver Exception [10]

Reading the console output, I would say webdriver hits an exeption and crashes, when using the combination v128 Chrome and webdriver...

 

Edited by Jemboy
Edit for privacy reasons
Link to comment
Share on other sites

Posted (edited)

Using Chrome v128.0.6613.85 with Chromedriver 127.0.6533.120 works, so this combination could be used as temporary workaround.
For me however this only a potential workaround because all my scripts automatically check and download the newest Chromedriver paired with Chrome automatically when executed ☹️

Console ouput using the v127 webdriver:
 

_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=chromedriver.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="..\Autoit\Chromedriver Webdriver Tester\chrome.log"
_WD_GetFreePort ==> Success [0 / 9515] : Parameters:   MinPort=9515   MaxPort=Default
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 X64 19045 
_WD_Startup: AutoIt:    3.3.16.0
_WD_Startup: Webdriver UDF: 1.3.1 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.1 (Download latest source at <https://raw.githubusercontent.com/dragana-r/autoit-winhttp/master/WinHttp.au3>)
_WD_Startup: Driver:    chromedriver.exe (64 Bit)
_WD_Startup: Params:    --verbose --log-path="..\Chromedriver Webdriver Tester\chrome.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "chromedriver.exe" --verbose --log-path="..\Autoit\Chromedriver Webdriver Tester\chrome.log" 
_WD_Startup ==> Success [0]
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: chrome
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
__WD_Post ==> Success [0] : HTTP status = 200
_WD_CreateSession ==> Success [0] : 67aa435790af892f26341bd9b796f6de
__WD_Post ==> Invalid argument [5] : HTTP status = 400
_WD_Navigate ==> Invalid argument [5] : Parameters:   URL=******

 

Edited by Jemboy
Edit for privacy reasons
Link to comment
Share on other sites

@Danp2Would you consider a function for the future webdriver update, to keep or force the driver to be lastmainversion browser minus 1 or last mainversion browser with an earlier minor version.
 

This way I might could make a switch in my scripts to force a downgrade based on the webbrowser version.
At least with Chrome not all computers have the same Chrome version at the same time and I believe if the webdriver is one version off the webdriver,
scripts will still run.

This way we would be able to (temprarely) downgrade to an older webdriver if a newer webdriver or webbrowser upgrade breaks existing scripts.

Link to comment
Share on other sites

@Danp2Don't know how the 32 bit version came there. But I just re-tested just know to be sure and I see I am using the x64 version now 🙂
I also update WinHTTP.au3 to the newest version 1.6.4.2 (was v1.6.4.1).
As you can see it is still not working on my computer.
If with  chromedriver log file, you mean the  chrome.log in the script folder, there is no error there (see attachment).

_WD_UpdateDriver ==> Success [0 / 0] : DriverCurrent = 128.0.6613.84 : DriverLatest = 128.0.6613.84
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=chromedriver.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path=".\Autoit\Chromedriver Webdriver Tester\chrome.log"
_WD_GetFreePort ==> Success [0 / 9515] : Parameters:   MinPort=9515   MaxPort=Default
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 X64 19045 
_WD_Startup: AutoIt:    3.3.16.0
_WD_Startup: Webdriver UDF: 1.3.1 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    chromedriver.exe (64 Bit)
_WD_Startup: Params:    --verbose --log-path=".\Autoit\Chromedriver Webdriver Tester\chrome.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "chromedriver.exe" --verbose --log-path=".\Autoit\Chromedriver Webdriver Tester\chrome.log" 
_WD_Startup ==> Success [0]
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: chrome
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
__WD_Post ==> Send / Recv error [6] : HTTP status = 0
_WD_CreateSession ==> Webdriver Exception [10]

 

chrome.log

Link to comment
Share on other sites

19 minutes ago, CYCho said:

I tested with 64 bit Stable version(128.0.6613.84) and 32 bit Beta version(128.0.6613.36) and both worked with Chrome.exe version 128.0.6613.85.

@CYChoThe above test, did you do it with your own script or the script below found at https://www.autoitscript.com/wiki/WebDriver#Chrome  ?

#include "wd_helper.au3"
#include "wd_capabilities.au3"

_Example()

Func _Example()
    # REMARK
    #   This is not functional script
    #   It only shows the concept how to use WebDriver UDF

    #Region ; initialize webdriver sesion

    ; you should take care about download/update dirver
    If $IDYES = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON1, "Question", _
            "Do you want to download/update driver ?") Then
        _WD_UpdateDriver('chrome')
    EndIf

    ; specify driver, port and other options
    _WD_Option('Driver', 'chromedriver.exe')
    _WD_Option('Port', 9515)
    _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"')

    ; start the driver
    _WD_Startup()
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's

    ; create capabilites for session
    _WD_CapabilitiesStartup()
    _WD_CapabilitiesAdd('alwaysMatch', 'chrome')
    _WD_CapabilitiesAdd('w3c', True)
    _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation')
    Local $sCapabilities = _WD_CapabilitiesGet()

    ; create session with given Capabilities
    Local $WD_SESSION = _WD_CreateSession($sCapabilities)
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's


    #EndRegion ; initialize webdriver sesion

    #Region ; do your's stuff

    ; navigate to some website
    Local $sURL = '******'
    _WD_Navigate($WD_SESSION, $sURL)
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's

    ; wait for loading process ends
    _WD_LoadWait($WD_SESSION, 1000)
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's

    ; for example find element
    Local $sXPath = "*****"
    Local $sElement = _WD_FindElement($WD_SESSION, $_WD_LOCATOR_ByXPath, $sXPath)
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's

    ; get element text
    Local $sText = _WD_ElementAction($WD_SESSION, $sElement, 'text')
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's
    ConsoleWrite($sText & @CRLF)

    ; or click the element
    _WD_ElementAction($WD_SESSION, $sElement, 'click')
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's

    #EndRegion ; do your's stuff

    #Region ; Clean Up

    ; on the end session should be deleted
    _WD_DeleteSession($WD_SESSION)
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's

    ; and driver should be closed
    _WD_Shutdown()
    If @error Then Return SetError(@error, @extended, 0) ; always remember to check and handle error's

    #EndRegion ; Clean Up

EndFunc   ;==>_Example

 

Link to comment
Share on other sites

hi all,

I am having the exact same issue with the log below in which Chrome browser was never opened. If I am using 127, it will lauch the Chrome Browser but most of the time _WD_FindElement and _WD_ElementAction won't work in Chrome V128 with WebDriver V127. Any suggestion to get this fix would be very appreciated! 

 

_WD_UpdateDriver ==> Success [0 / 0] : DriverCurrent = 128.0.6613.84 : DriverLatest = 128.0.6613.84
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=chromedriver.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="C:\Users\ITITEXAS\Documents\Houston\Shipping IE\chrome.log"
_WD_GetFreePort ==> Success [0 / 9515] : Parameters:   MinPort=9515   MaxPort=Default
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 X64 19044 
_WD_Startup: AutoIt:    3.3.14.5
_WD_Startup: Webdriver UDF: 1.3.1 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.2
_WD_Startup: Driver:    chromedriver.exe (64 Bit)
_WD_Startup: Params:    --verbose --log-path="C:\Users\ITITEXAS\Documents\Houston\Shipping IE\chrome.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "chromedriver.exe" --verbose --log-path="C:\Users\ITITEXAS\Documents\Houston\Shipping IE\chrome.log" 
_WD_Startup ==> Success [0]
__WD_Post ==> Send / Recv error [6] : HTTP status = 0
_WD_CreateSession ==> Webdriver Exception [10]
__WD_Post ==> Send / Recv error [6] : HTTP status = 0
_WD_Navigate ==> Send / Recv error [6] : Parameters:   URL=https://copilot.maersk.com/login.aspx
__WD_Post ==> Send / Recv error [6] : HTTP status = 0
_WD_FindElement ==> Send / Recv error [6] : Parameters:   Strategy=xpath   Selector=//input[@id='ctl00_body_rpLogin_formLogin_txtEmail_I']   StartNodeID=Default   Multiple=Default   ShadowRoot=Default
__WD_Post ==> Send / Recv error [6] : HTTP status = 0
_WD_FindElement ==> Send / Recv error [6] : Parameters:   Strategy=xpath   Selector=//input[@id='ctl00_body_rpLogin_formLogin_txtEmail_I']   StartNodeID=Default   Multiple=Default   ShadowRoot=Default

===========================================================

Also The Port is showing 0 instead of Port 9515 below

Starting ChromeDriver 128.0.6613.84 (606aa55c7d687518d34b55accc5a71ea0bd28727-refs/branch-heads/6613@{#1335}) on port 0
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully on port 50017.



Starting ChromeDriver 127.0.6533.88 (a2d0cb026721e4644e489b8ebb07038ca4e4351c-refs/branch-heads/6533@{#1846}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.

 

Link to comment
Share on other sites

13 hours ago, PnD said:

hi all,

I am having the exact same issue with the log below in which Chrome browser was never opened. If I am using 127, it will lauch the Chrome Browser but most of the time _WD_FindElement and _WD_ElementAction won't work in Chrome V128 with WebDriver V127. Any suggestion to get this fix would be very appreciated! 

@PnDJust checked, all my scripts use _WD_FindElement and _WD_ElementAction.
Could it be that your page has not been fully loaded yet ?
 

Just after navigating to the URL, I do a _WD_LoadWait($sSession) just to be sure I am not looking for elements before they appear.

$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//input[@id="Nutzername"]')
$sRes= @error
If $sRes=$_WD_ERROR_Success then
    _WD_ElementAction($sSession, $sElement, 'value', $sNutzername)
EndIf

The above is a typical field search for my scripts and filling it with a value.


For now I have disabled  _WD_UpdateDriver and I manually copy the new scripts with Chromedriver v127 to the user's computer.
Hopefully I Chromedriver is fixed before I have to do the above workaround for all my users☹️
 

Link to comment
Share on other sites

On 8/22/2024 at 7:06 AM, Jemboy said:

Using Chrome v128.0.6613.85 with Chromedriver 127.0.6533.120 works, so this combination could be used as temporary workaround.
For me however this only a potential workaround because all my scripts automatically check and download the newest Chromedriver paired with Chrome automatically when executed ☹️

Console ouput using the v127 webdriver:
 

_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=chromedriver.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--verbose --log-path="..\Autoit\Chromedriver Webdriver Tester\chrome.log"
_WD_GetFreePort ==> Success [0 / 9515] : Parameters:   MinPort=9515   MaxPort=Default
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS:    WIN_10 X64 19045 
_WD_Startup: AutoIt:    3.3.16.0
_WD_Startup: Webdriver UDF: 1.3.1 (Up to date)
_WD_Startup: WinHTTP:   1.6.4.1 (Download latest source at <https://raw.githubusercontent.com/dragana-r/autoit-winhttp/master/WinHttp.au3>)
_WD_Startup: Driver:    chromedriver.exe (64 Bit)
_WD_Startup: Params:    --verbose --log-path="..\Chromedriver Webdriver Tester\chrome.log"
_WD_Startup: Port:  9515
_WD_Startup: Command:   "chromedriver.exe" --verbose --log-path="..\Autoit\Chromedriver Webdriver Tester\chrome.log" 
_WD_Startup ==> Success [0]
_WD_CapabilitiesAdd ==> Success [0] : Successfully used [alwaysMatch]  with specified browser: chrome
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
_WD_CapabilitiesAdd ==> Success [0] : Successfully added capability
__WD_Post ==> Success [0] : HTTP status = 200
_WD_CreateSession ==> Success [0] : 67aa435790af892f26341bd9b796f6de
__WD_Post ==> Invalid argument [5] : HTTP status = 400
_WD_Navigate ==> Invalid argument [5] : Parameters:   URL=******

 

Using Chrome v128.0.6613.85 with Chromedriver 127.0.6533.120 worked for me for now also.  I turned off the auto update of the Chromedriver until this gets figured out.

Link to comment
Share on other sites

Posted (edited)

@Danp2YEESSSSSSSSSSSSSSS you did it Danp2!!!!!
Adding    --port=9515  to the DriverParams gets Chromedriver v128 working with Chrome v128. 
I would expect WD_Option('Port', 9515)  doing the same thing, NOTTTTTT!!! Very strange!!! Somehow this line is ALSO needed according to Danp2!!!
So leave it in your script!

Thank for finding the solution.

_WD_Option('Driver', 'chromedriver.exe')
    _WD_Option('Port', 9515)    ;<====Leave this line in (see comment below Danp2)
    _WD_Option('DriverParams', '--port=9515 --verbose --log-path="' & @ScriptDir & '\chrome.log"')

 

Edited by Jemboy
Edit after comment from Danp2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...