microsoft / microsoft/Dual-write-automations

WebDriver timeout error when running in pipeline.

Open
#53 3 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #56 by @Hax1337 — merged
Dominant language
C#
Stars
47
Forks
12
Avg merge
4d 4h
Merged PRs (30d)
3

Description

Hi,

I'm setting up automated DW mappings refresh for multiple environments via ADO pipelines, and occasionally getting following timeout error. It appears randomly for different environments/runs with no specific pattern. Tooling is executed via "Command line" task on MS hosted agent.
Why this error might be happening? Can some re-try mechanism be implemented?

Also even if errors occur during execution logs always say "Application stopped successful without errors!", which is quite misleading.

info: DWHelper.DWHostedService[0]
      Your Edge version: 134
info: DWHelper.DWHostedService[0]
      Matching edge version with edge driver
info: DWHelper.DWHostedService[0]
      Current version , Edge Version 134.0.3124.51 - downloading matching driver...
info: DWHelper.DWHostedService[0]
      Edge driver download completed.
Starting Microsoft Edge WebDriver 134.0.3124.51 (10e0bb621722da8f1133fefb3a86b7b71bd83fbf) on port 50764
To submit feedback, report a bug, or suggest new features, please visit https://github.com/MicrosoftEdge/EdgeWebDriver

Only local connections are allowed.
Please see https://aka.ms/WebDriverSecurity for suggestions on keeping Microsoft Edge WebDriver safe.

msedgedriver was started successfully on port 50764.
fail: DWHelper.DWHostedService[0]
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:50764/session 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.InitialFillAsync(Boolean async)
         at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
         --- End of inner exception stack trace ---
         at System.Net.Http.HttpConnection.SendAsyncCore(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.StartSession(ICapabilities capabilities)
         at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
         at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout)
         at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout)
         at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options)
         at DWLibary.EdgeUniversal.getToken() in C:\Users\maxhentschel\source\repos\Dual-write-automationsv2\DWLibary\EdgeUniversal.cs:line 114
         at DWHelper.AppExecution.checkEdgeVersionAndRetrieveToken() in C:\Users\maxhentschel\source\repos\Dual-write-automationsv2\DualWriteHelper\AppExecution.cs:line 181
         at DWHelper.AppExecution.run() in C:\Users\maxhentschel\source\repos\Dual-write-automationsv2\DualWriteHelper\AppExecution.cs:line 89
info: Microsoft.Hosting.Lifetime[0]
      Application is shutting down...
info: DWHelper.DWHostedService[0]
      Application stopped successful without errors!
info: Microsoft.Hosting.Lifetime[0]
      Waiting for the host to be disposed. Ensure all 'IHost' instances are wrapped in 'using' blocks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DWLibary/EdgeUniversal.cs at line 114 and DualWriteHelper/AppExecution.cs at lines 181 and 89, then inspect the merged pull request linked to this issue. Reproduce the WebDriver timeout in an ADO pipeline and verify that retries, when applicable, and the final application status accurately reflect failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devops, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.