Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[🐛 Bug]: WebDriverException with Chrome V133 when switching windows or getting handle count #15321

Open
user93485938459 opened this issue Feb 21, 2025 · 2 comments

Comments

@user93485938459
Copy link

user93485938459 commented Feb 21, 2025

What happened?

.NET

Upgraded to Chrome V133 and whenever I switch window or get driver.WindowHandles.Count, I get the below error

OpenQA.Selenium.WebDriverException: 'An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://localhost:56483/session/fa6f1ad1d57bb1ef5fc9060fd540420d/window/handles. The exception message was: No connection could be made because the target machine actively refused it. (localhost:56483)

Has been driving me crazy since Google forced the update on me. Have had to manually re-install V132 to work on and run automated tests.

How can we reproduce the issue?

.NET

Chrome V133

Selenium 4.29.0

Use these commands (after web driver declared and init)

`driver.WindowHandles.Count;`

or

`driver.SwitchTo().Window(driver.WindowHandles[0]);`

Relevant log output

Last 10 or so lines in Output

`Exception thrown: 'OpenQA.Selenium.WebDriverTimeoutException' in WebDriver.dll
'testhost.exe' (CoreCLR: clrhost): Loaded 'C:\blank\blank\bin\Debug\net6.0\System.IdentityModel.Tokens.Jwt.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.exe' (CoreCLR: clrhost): Loaded 'C:\blank\blank\bin\Debug\net6.0\Microsoft.IdentityModel.Tokens.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.exe' (CoreCLR: clrhost): Loaded 'C:\blank\blank\bin\Debug\net6.0\Microsoft.IdentityModel.Logging.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.exe' (CoreCLR: clrhost): Loaded 'C:\blank\blank\bin\Debug\net6.0\Microsoft.IdentityModel.JsonWebTokens.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.exe' (CoreCLR: clrhost): Loaded 'C:\blank\blank\bin\Debug\net6.0\Microsoft.IdentityModel.Abstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'OpenQA.Selenium.WebDriverTimeoutException' in WebDriver.dll
The thread 22308 has exited with code 0 (0x0).
Exception thrown: 'OpenQA.Selenium.WebDriverException' in System.Private.CoreLib.dll
The thread '.NET ThreadPool Worker' (56408) has exited with code 0 (0x0).
Exception thrown: 'OpenQA.Selenium.WebDriverException' in System.Private.CoreLib.dll
The thread 24120 has exited with code 0 (0x0).
Exception thrown: 'OpenQA.Selenium.WebDriverException' in System.Private.CoreLib.dll
An exception of type 'OpenQA.Selenium.WebDriverException' occurred in System.Private.CoreLib.dll but was not handled in user code
An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://localhost:56483/session/fa6f1ad1d57bb1ef5fc9060fd540420d/window/handles. The exception message was: No connection could be made because the target machine actively refused it. (localhost:56483)`

Operating System

Windows 11

Selenium version

4.29.0

What are the browser(s) and version(s) where you see this issue?

Chrome 133 (133.0.6943.127)

What are the browser driver(s) and version(s) where you see this issue?

Chromedriver 133.0.6943.126

Are you using Selenium Grid?

N/A

Copy link

@user93485938459, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@user93485938459
Copy link
Author

user93485938459 commented Feb 21, 2025

Aware this is likely a Google/chromedriver issue

Similar issue (different exception) raised by someone else here #15318

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant