florentbr / SeleniumBasic

A Selenium based browser automation framework for VB.Net, VBA and VBScript
BSD 3-Clause "New" or "Revised" License
421 stars 197 forks source link

Unknown error: cannot determine loading status when using latest chrome webdriver #252

Open rackd opened 2 years ago

rackd commented 2 years ago

Chrome 103 was released yesterday alongside an updated chromedriver. This release has broke SeleniumBasic on my machine. A temporary fix is using an error-handling routine to resume next. However, if this is a valid issue, I think it should be addressed. This error only occurs on the latest version of chrome/chromedriver. When using the On Error Resume Next statement, SeleniumBasic works as intended. I have tried clearing the user data directory with no success.

Run-time error '13':

UnknownError
unknown error: cannot determine loading status
from unknown error: unexpected command response
  (Session info: chrome=103.0.5060.53)
  (Driver info: chromedriver=103.0.5060.53 (a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060@{#853}),platform=Windows NT 10.0.22000 x86_64)

Error is throw on WebDriver.get()

Sub a_startScript()
    driver.AddArgument ("--user-data-dir=C:\Users\usernname\Documents\work\workdirec")
    driver.Start "Chrome"

    driver.Get ("https://www.placeholderlink.com") 'Error is thrown here
    ...
End Sub
wolflash666 commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。 已经收到,等我看到了,立马回复。 

dornech commented 2 years ago

Hi, I cannot confirm. I checked with Chrome 103.0.5060.53 with the latest Chromedriver 103.0.5060.53 and cannot confirm an issue with SeleniumBasic. Works as before for me, just performance seems to have improved (which I do not complain about)

motos91 commented 2 years ago

I've got the same problem. Team member reported this last night and then I tried this morning, updating to Chrome 103 driver is breaking selenium right now.

motos91 commented 2 years ago

I've also tested a workaround that seems to be working. Adding a driver.wait before the driver.get is working to get rid of the error for now.

    Dim driver As Selenium.ChromeDriver
    Set driver = New ChromeDriver
    driver.AddArgument ("--user-data-dir=C:\Users\" & Environ("username") & "\Desktop\UserData-" & Environ("username"))
    driver.AddArgument ("profile-directory=Default")
    driver.AddArgument ("window-size=1100,800")
    driver.start "chrome"
    driver.Wait (1000)
    driver.Get "XXXX"
mogulman52 commented 2 years ago

motos91, thanks. Your fix worked for me.

dornech commented 2 years ago

This is an accepted error in ChromeDriver 103. According to changelog, It is already fixed in 104. Regression for version1 03 is under discussion. https://bugs.chromium.org/p/chromedriver/issues/detail?id=4121

allwynjose commented 2 years ago

I can confirm I'm facing the same issue.. Chrome 103.0.5060.53 with the latest Chromedriver 103.0.5060.53.. even tried updating chrome to latest version 103.0.5060.66.. also tried adding a driver.wait before the driver.get like motos91 suggested, but still issue persists "Unknown error: cannot determine loading status when using latest chrome webdriver".. Any other solution so far? Or any idea when chrome 104 will be released? Thanks.