Skip to content

[🐛 Bug]: WindowHandles: some Edge browser URLs causing timeout error #15277

@Pique7

Description

@Pique7

What happened?

Suddenly (obviously after recent MS Windows update) I get a timeout error when I try to access WindowHandles after creating a new tab and navigating to one of those Edge browser URLs:

edge://apps/
edge://browser-essentials/
edge://downloads/
edge://favorites/
edge://history/all

This error might also occur with other URLs, but I only had problems with these Edge browser URLs.

This happened with MS Edge v133.0.3065.59 for the first time (see exampe .NET/C# code to reproduce).

How can we reproduce the issue?

EdgeDriver edge = new();
edge.SwitchTo().NewWindow(OpenQA.Selenium.WindowType.Tab);
edge.Url = "edge://favorites";
System.Diagnostics.Debug.WriteLine(edge.WindowHandles.ElementAt(0));   // Timeout error after 60 seconds.

Relevant log output

OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:54417/session/66d656e5899627528703b2535d9b000f/window/handles timed out after 60 seconds.
 ---> System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 60 seconds elapsing.
 ---> System.TimeoutException: The operation was canceled.
 ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
 ---> System.IO.IOException: Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request..
 ---> System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
   at OpenQA.Selenium.Remote.HttpCommandExecutor.ExecuteAsync(Command commandToExecute)
   --- End of inner exception stack trace ---
   at OpenQA.Selenium.Remote.HttpCommandExecutor.ExecuteAsync(Command commandToExecute)
   at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.ExecuteAsync(Command commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.get_WindowHandles()
   at MyFunction()

Operating System

Windows 10 / 11

Selenium version

v4.28.0 (.NET)

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

MS Edge v133.0.3065.59

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

EdgeDriver v133.0.3065.59

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    G-msedgedriverRequires fixes in MSEdgeDriver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions