Closed sescandell closed 5 years ago
We've got the same issue here.
Same here. Stopped working a few days ago. If I go to the agent myself and run from the command line it works, but not when the pipeline is running.
Hi, was there a change in how the agent was configured on the machines? Any change of credentials (admin account vs non-admin account)?
The specified versions do not look like compatible versions. http://chromedriver.chromium.org/downloads lists 2.46 as supported version for chrome version 73. Have you tried using newer drier version?
Hi,
Well... I thought I doubled check versions collisions... but it seems I misconfused myself. Indeed, the version used while running through DevOps is not the same as the one when I ran the command from the CLI.
I'll double check all of this and let you know (and close the ticket if required).
Thanks,
Hi,
TL;DR: it still not working when launched from DevOps while working on CLI with the same configuration.
Details:
I double checked versions, command executed etc: when we launche the task from Azure DevOps this is the Output of the execution:
2019-04-05T16:02:25.5592518Z ##[section]Starting: Run Tests
2019-04-05T16:02:25.5610932Z ==============================================================================
2019-04-05T16:02:25.5611125Z Task : Visual Studio Test
2019-04-05T16:02:25.5611245Z Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2).
2019-04-05T16:02:25.5611400Z Version : 2.149.6
2019-04-05T16:02:25.5611570Z Author : Microsoft Corporation
2019-04-05T16:02:25.5611699Z Help : [More information](https://go.microsoft.com/fwlink/?LinkId=835764)
2019-04-05T16:02:25.5611841Z ==============================================================================
2019-04-05T16:02:26.6938924Z SystemVssConnection exists true
2019-04-05T16:02:26.8678970Z SystemVssConnection exists true
2019-04-05T16:02:27.0620380Z SystemVssConnection exists true
2019-04-05T16:02:27.2110582Z Running tests using vstest.console.exe runner.
2019-04-05T16:02:27.2112933Z ======================================================
2019-04-05T16:02:27.2114027Z Test selector : Test assemblies
2019-04-05T16:02:27.2114396Z Test filter criteria : null
2019-04-05T16:02:27.2115355Z Search folder : D:\agent-01\_work\r19\a
2019-04-05T16:02:27.2124785Z VisualStudio version selected for test execution : 15.0
2019-04-05T16:02:27.3394738Z Run in parallel : false
2019-04-05T16:02:27.3395402Z Run in isolation : false
2019-04-05T16:02:27.3396389Z Path to custom adapters : null
2019-04-05T16:02:27.3404610Z Other console options : null
2019-04-05T16:02:27.3449135Z Code coverage enabled : false
2019-04-05T16:02:27.3450502Z Diagnostics enabled : true
2019-04-05T16:02:27.3451883Z SystemVssConnection exists true
2019-04-05T16:02:27.3482043Z Run the tests locally using vstest.console.exe
2019-04-05T16:02:27.3484437Z ========================================================
2019-04-05T16:02:27.3507610Z Test selector : Test assemblies
2019-04-05T16:02:27.3514247Z Test assemblies : **\Awesome.UI.Tests.dll
2019-04-05T16:02:27.3515288Z Test filter criteria : null
2019-04-05T16:02:27.3524630Z Search folder : D:\agent-01\_work\r19\a
2019-04-05T16:02:27.3528015Z Run settings file : D:\agent-01\_work\r19\a
2019-04-05T16:02:27.3532319Z Run in parallel : false
2019-04-05T16:02:27.3536240Z Run in isolation : false
2019-04-05T16:02:27.3584145Z Path to custom adapters : null
2019-04-05T16:02:27.3584596Z Other console options : null
2019-04-05T16:02:27.3588722Z Code coverage enabled : false
2019-04-05T16:02:27.3589433Z Diagnostics enabled : false
2019-04-05T16:02:27.3598286Z Rerun failed tests: false
2019-04-05T16:02:27.3603653Z VisualStudio version selected for test execution : 15.0
2019-04-05T16:02:27.7124227Z ========================================================
2019-04-05T16:02:27.8085660Z ======================================================
2019-04-05T16:02:28.0128313Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @D:\agent-01\_work\_temp\35a2f151-57bc-11e9-9931-777582184583.txt
2019-04-05T16:02:28.4113521Z Microsoft (R) Test Execution Command Line Tool Version 15.8.0
2019-04-05T16:02:28.4119124Z Copyright (c) Microsoft Corporation. All rights reserved.
2019-04-05T16:02:28.4119677Z
2019-04-05T16:02:28.4174514Z vstest.console.exe
2019-04-05T16:02:28.4176346Z "D:\agent-01\_work\r19\a\_Projet - UI Tests 2\drop\Release\Awesome.UI.Tests.dll"
2019-04-05T16:02:28.4177100Z /logger:"trx"
2019-04-05T16:02:28.4177365Z /TestAdapterPath:"D:\agent-01\_work\r19\a"
2019-04-05T16:02:28.7579828Z Starting test execution, please wait...
2019-04-05T16:02:31.8142048Z Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 16064
2019-04-05T16:02:31.8142287Z Only local connections are allowed.
2019-04-05T16:02:31.8143569Z Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
2019-04-05T16:05:57.9742663Z Failed ConnectionViaForm_UserWithLoginAndMdp_LogOnTheWall
2019-04-05T16:05:57.9774895Z Error Message:
2019-04-05T16:05:57.9775660Z Assert.Fail failed. Unexpected Error : The HTTP request to the remote WebDriver server for URL http://localhost:16064/session/f53a5f4d05c533f44f5fe805ace7ccf5/window/current/maximize timed out after 60 seconds.
2019-04-05T16:05:57.9776724Z Stack Trace:
2019-04-05T16:05:57.9778267Z at Awesome.UI.Tests.common.UITestHelper.ManageException(Exception e, String source) in D:\agent-07\_work\16\s\Awesome.UI.Tests\Common\UITestHelper.cs:line 118
2019-04-05T16:05:57.9778945Z at Awesome.UI.Tests.Connection.ConectionTests.ConnectionViaForm_UserWithLoginAndMdp_LogOnTheWall() in D:\agent-07\_work\16\s\Awesome.UI.Tests\Connection\ConnectionTests.cs:line 39
2019-04-05T16:05:57.9780013Z
2019-04-05T16:05:57.9802195Z Standard Output Messages:
2019-04-05T16:05:57.9802509Z
2019-04-05T16:05:57.9802982Z
2019-04-05T16:05:57.9803267Z Debug Trace:
2019-04-05T16:05:57.9803450Z vstest.console.exe Error: 0 : Awesome.UI.Tests.Connection.ConectionTests - Unexpected Error
2019-04-05T16:05:57.9804392Z OpenQA.Selenium.WebDriverException=WebDriverException
2019-04-05T16:05:57.9804708Z Message=The HTTP request to the remote WebDriver server for URL http://localhost:16064/session/f53a5f4d05c533f44f5fe805ace7ccf5/window/current/maximize timed out after 60 seconds.
2019-04-05T16:05:57.9804893Z Source=WebDriver
2019-04-05T16:05:57.9805427Z StackTrace:
2019-04-05T16:05:57.9805577Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-05T16:05:57.9805745Z at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
2019-04-05T16:05:57.9805890Z at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
2019-04-05T16:05:57.9806061Z at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2019-04-05T16:05:57.9806198Z at OpenQA.Selenium.Remote.RemoteWindow.Maximize()
2019-04-05T16:05:57.9806370Z at Awesome.ServicesTests.TestBase.TargetBrowser(String browser) in D:\agent-07\_work\16\s\Awesome.UI.Tests\TestBase.cs:line 146
2019-04-05T16:05:57.9806534Z at Awesome.UI.Tests.Connection.ConectionTests.ConnectionViaForm_UserWithLoginAndMdp_LogOnTheWall() in D:\agent-07\_work\16\s\Awesome.UI.Tests\Connection\ConnectionTests.cs:line 29
2019-04-05T16:05:57.9806693Z Inner Exception=WebException
2019-04-05T16:05:57.9806853Z Message=The operation has timed out
2019-04-05T16:05:57.9806991Z Source=System
2019-04-05T16:05:57.9807186Z StackTrace:
2019-04-05T16:05:57.9807322Z at System.Net.HttpWebRequest.GetResponse()
2019-04-05T16:05:57.9807485Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-05T16:05:57.9807602Z
2019-04-05T16:05:57.9807742Z ============================================================
2019-04-05T16:05:57.9807885Z vstest.console.exe Error: 0 : Awesome.UI.Tests.Connection.ConectionTests - Unable to make a screeshoot
2019-04-05T16:05:57.9808039Z OpenQA.Selenium.WebDriverException=WebDriverException
2019-04-05T16:05:57.9808193Z Message=The HTTP request to the remote WebDriver server for URL http://localhost:16064/session/f53a5f4d05c533f44f5fe805ace7ccf5/screenshot timed out after 60 seconds.
2019-04-05T16:05:57.9808329Z Source=WebDriver
2019-04-05T16:05:57.9808515Z StackTrace:
2019-04-05T16:05:57.9808656Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-05T16:05:57.9808798Z at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
2019-04-05T16:05:57.9808958Z at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
2019-04-05T16:05:57.9810436Z at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2019-04-05T16:05:57.9810578Z at OpenQA.Selenium.Remote.RemoteWebDriver.GetScreenshot()
2019-04-05T16:05:57.9810726Z at Awesome.ServicesTests.TestBase.SaveScreenshotOnFailure() in D:\agent-07\_work\16\s\Awesome.UI.Tests\TestBase.cs:line 119
2019-04-05T16:05:57.9810889Z Inner Exception=WebException
2019-04-05T16:05:57.9811020Z Message=The operation has timed out
2019-04-05T16:05:57.9811143Z Source=System
2019-04-05T16:05:57.9811268Z StackTrace:
2019-04-05T16:05:57.9811451Z at System.Net.HttpWebRequest.GetResponse()
2019-04-05T16:05:57.9811597Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-05T16:05:57.9811687Z
2019-04-05T16:05:57.9811819Z ============================================================
2019-04-05T16:05:57.9811906Z
2019-04-05T16:05:57.9812007Z
2019-04-05T16:05:58.5324030Z Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 16084
2019-04-05T16:05:58.5324377Z Only local connections are allowed.
2019-04-05T16:05:58.5324473Z Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
2019-04-05T16:07:28.6849296Z ##[error]The operation was canceled.
2019-04-05T16:07:28.6923953Z ##[section]Finishing: Run Tests
As you can see from the logs, ChromeDriver version used is 73.0.3683.68
While the task was running, connected on the machine, I copied / pasted the file 35a2f151-57bc-11e9-9931-777582184583.txt. Still connected on the machine, I open a CMD and run the following command (exactly the same as visible in logs):
]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @D:\copied-file.txt
And here, everything is working as expected:
Any other idea?
While writing this post, I see that I'm executing the command as an administrator. That is probably not the situation from Azure DevOps. Could it be the reason of this failure (as suggested @kaadhina) ? Nothing have been changed about admin / non-admin credentials on the machine and the machine is running for almost 100 days.
I tried the below versions and this works (tried both using vstest.console and dtaexecutionhost) chrome=73.0.3683.75 chromedriver=73.0.3683 The agent was setup as non-admin. It could be possible that the issue appears only for admin agents. So please try as non-admin as well.
Can you please confirm the above setup does not work for you.
I have the same issue. Tests has stopped working at all six build agents at the same time. The problem started about two weeks ago.
I've just tested with ChromeDriver 2.45.615291 and ChromeDriver 73.0.3683.68. Result is the same. But the test works well if I run it from command line.
Agent log.
2019-04-09T13:31:50.2220518Z ##[section]Starting: Tests
2019-04-09T13:31:50.2577537Z ==============================================================================
2019-04-09T13:31:50.2577731Z Task : Visual Studio Test
2019-04-09T13:31:50.2577845Z Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2).
2019-04-09T13:31:50.2578007Z Version : 2.149.6
2019-04-09T13:31:50.2578092Z Author : Microsoft Corporation
2019-04-09T13:31:50.2578228Z Help : [More information](https://go.microsoft.com/fwlink/?LinkId=835764)
2019-04-09T13:31:50.2578372Z ==============================================================================
2019-04-09T13:32:02.0244169Z SystemVssConnection exists true
2019-04-09T13:32:02.2272629Z SystemVssConnection exists true
2019-04-09T13:32:02.4285983Z SystemVssConnection exists true
2019-04-09T13:32:02.6092015Z Running tests using vstest.console.exe runner.
2019-04-09T13:32:02.6092805Z ======================================================
2019-04-09T13:32:02.6118974Z Test selector : Test assemblies
2019-04-09T13:32:02.6127739Z Test filter criteria : TestCategory=VstsApiGameTests
2019-04-09T13:32:02.6150739Z Search folder : C:\vsts-agent\_work\r915\a\qa-arena-5.0-tests\build
2019-04-09T13:32:02.6223226Z VisualStudio version selected for test execution : latest
2019-04-09T13:32:03.1208761Z Run in parallel : false
2019-04-09T13:32:03.1217328Z Run in isolation : false
2019-04-09T13:32:03.1218877Z Path to custom adapters : null
2019-04-09T13:32:03.1231603Z Other console options : null
2019-04-09T13:32:03.1238960Z Code coverage enabled : false
2019-04-09T13:32:03.1253620Z Diagnostics enabled : true
2019-04-09T13:32:03.1281914Z SystemVssConnection exists true
2019-04-09T13:32:03.1364824Z Run the tests locally using vstest.console.exe
2019-04-09T13:32:03.1365886Z ========================================================
2019-04-09T13:32:03.1396680Z Test selector : Test assemblies
2019-04-09T13:32:03.1408059Z Test assemblies : **\*qa-arena5.0-tests.dll
2019-04-09T13:32:03.1414956Z Test filter criteria : TestCategory=VstsApiGameTests
2019-04-09T13:32:03.1443188Z Search folder : C:\vsts-agent\_work\r915\a\qa-arena-5.0-tests\build
2019-04-09T13:32:03.1443893Z Run settings file : C:\vsts-agent\_work\r915\a
2019-04-09T13:32:03.1444299Z Run in parallel : false
2019-04-09T13:32:03.1450832Z Run in isolation : false
2019-04-09T13:32:03.1575462Z Path to custom adapters : null
2019-04-09T13:32:03.1577878Z Other console options : null
2019-04-09T13:32:03.1585682Z Code coverage enabled : false
2019-04-09T13:32:03.1588132Z Diagnostics enabled : false
2019-04-09T13:32:03.1624628Z Rerun failed tests: false
2019-04-09T13:32:03.1638094Z VisualStudio version selected for test execution : latest
2019-04-09T13:32:04.1893978Z ========================================================
2019-04-09T13:32:04.2485298Z ======================================================
2019-04-09T13:32:04.3826458Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @C:\vsts-agent\_work\_temp\dcd7c561-5acb-11e9-aa95-c9612ba7a8dc.txt
2019-04-09T13:32:07.0726986Z Microsoft (R) Test Execution Command Line Tool Version 15.7.2
2019-04-09T13:32:07.0735245Z Copyright (c) Microsoft Corporation. All rights reserved.
2019-04-09T13:32:07.0735798Z
2019-04-09T13:32:07.0819261Z vstest.console.exe
2019-04-09T13:32:07.0820065Z "C:\vsts-agent\_work\r915\a\qa-arena-5.0-tests\build\qa-arena5.0-tests.dll"
2019-04-09T13:32:07.0821448Z /TestCaseFilter:"TestCategory=VstsApiGameTests"
2019-04-09T13:32:07.0821780Z /logger:"trx"
2019-04-09T13:32:07.0822006Z /TestAdapterPath:"C:\vsts-agent\_work\r915\a\qa-arena-5.0-tests\build"
2019-04-09T13:32:07.8443801Z Starting test execution, please wait...
2019-04-09T13:32:08.8336773Z NUnit VS Adapter 2.1.1.0 executing tests is started
2019-04-09T13:32:09.6258740Z Loading tests from C:\vsts-agent\_work\r915\a\qa-arena-5.0-tests\build\qa-arena5.0-tests.dll
2019-04-09T13:32:10.0577751Z TFS Filter detected: LoadedTestCases 86, Filterered Test Cases 1
2019-04-09T13:32:10.0794847Z Run started: C:\vsts-agent\_work\r915\a\qa-arena-5.0-tests\build\qa-arena5.0-tests.dll
2019-04-09T13:32:10.7310018Z Starting on the PC in Chrome browser
2019-04-09T13:32:11.7955120Z Starting ChromeDriver 2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387) on port 13423
2019-04-09T13:32:11.7955742Z Only local connections are allowed.
2019-04-09T13:35:15.5693411Z OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:13423/session/3a97f32e15c7e5c89254717e6db7ba44/window/current/maximize timed out after 180 seconds. ---> System.Net.WebException: The operation has timed out
2019-04-09T13:35:15.5694414Z at System.Net.HttpWebRequest.GetResponse()
2019-04-09T13:35:15.5697118Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-09T13:35:15.5697767Z --- End of inner exception stack trace ---
2019-04-09T13:35:15.5698052Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-09T13:35:15.5698203Z at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
2019-04-09T13:35:15.5698882Z at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
2019-04-09T13:35:15.5700414Z at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2019-04-09T13:35:15.5700841Z at OpenQA.Selenium.Remote.RemoteWindow.Maximize()
2019-04-09T13:35:15.5701863Z at qa_arena5_tests.Framework.BrowserFactory.Chrome.InitBrowser(Boolean proxyStatus) in C:\vsts-agent\_work\1497\s\Framework\BrowserFactory\Chrome.cs:line 18
2019-04-09T13:35:15.5702234Z at qa_arena5_tests.Framework.Driver.StartWebDriver() in C:\vsts-agent\_work\1497\s\Framework\Driver.cs:line 76
2019-04-09T13:35:15.5702474Z at qa_arena5_tests.Framework.Driver.Start() in C:\vsts-agent\_work\1497\s\Framework\Driver.cs:line 42
2019-04-09T13:35:15.5702634Z at qa_arena5_tests.Tests.PC.TestBase.StartBrowser() in C:\vsts-agent\_work\1497\s\Tests\PC\TestBase.cs:line 24
2019-04-09T13:35:16.6928043Z Can't Kill Process
2019-04-09T13:35:16.6928722Z Can't Kill ProcessObject reference not set to an instance of an object.
2019-04-09T13:35:16.6930398Z Start new driver: Object reference not set to an instance of an object.
2019-04-09T13:35:16.7867130Z Starting on the PC in Chrome browser
2019-04-09T13:35:16.8636092Z Starting ChromeDriver 2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387) on port 13450
2019-04-09T13:38:20.4744992Z Only local connections are allowed.
2019-04-09T13:38:20.4745734Z Can't Kill Process
2019-04-09T13:38:20.4746173Z Can't Kill ProcessObject reference not set to an instance of an object.
2019-04-09T13:38:20.4746575Z Dismiss Freezed Driver: Object reference not set to an instance of an object.
2019-04-09T13:38:20.6131885Z NUnit VS Adapter 2.1.1.0 executing tests is finished
2019-04-09T13:38:21.1554536Z Failed http://arenax-challenges_arkadium_com/en/games/bridge?version=0_50
2019-04-09T13:38:21.1596211Z Error Message:
2019-04-09T13:38:21.1597162Z SetUp : OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:13450/session/a81b38d21b4de5789a185b3df67b4d65/window/current/maximize timed out after 180 seconds.
2019-04-09T13:38:21.1597805Z ----> System.Net.WebException : The request was aborted: The operation has timed out.
2019-04-09T13:38:21.1600826Z TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
2019-04-09T13:38:21.1606996Z Stack Trace:
2019-04-09T13:38:21.1607672Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-09T13:38:21.1609956Z at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
2019-04-09T13:38:21.1610545Z at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
2019-04-09T13:38:21.1611126Z at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2019-04-09T13:38:21.1615069Z at OpenQA.Selenium.Remote.RemoteWindow.Maximize()
2019-04-09T13:38:21.1616149Z at qa_arena5_tests.Framework.BrowserFactory.Chrome.InitBrowser(Boolean proxyStatus) in C:\vsts-agent\_work\1497\s\Framework\BrowserFactory\Chrome.cs:line 18
2019-04-09T13:38:21.1616710Z at qa_arena5_tests.Framework.Driver.StartWebDriver() in C:\vsts-agent\_work\1497\s\Framework\Driver.cs:line 76
2019-04-09T13:38:21.1617410Z at qa_arena5_tests.Framework.Driver.ReStartDriver() in C:\vsts-agent\_work\1497\s\Framework\Driver.cs:line 111
2019-04-09T13:38:21.1617903Z at qa_arena5_tests.Tests.PC.TestBase.StartBrowser() in C:\vsts-agent\_work\1497\s\Tests\PC\TestBase.cs:line 30
2019-04-09T13:38:21.1618400Z --WebException
2019-04-09T13:38:21.1618915Z at System.Net.HttpWebRequest.GetResponse()
2019-04-09T13:38:21.1619407Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-09T13:38:21.1619831Z --TearDown
2019-04-09T13:38:21.1620313Z at qa_arena5_tests.Framework.Driver.DismissDriver() in C:\vsts-agent\_work\1497\s\Framework\Driver.cs:line 176
2019-04-09T13:38:21.1620640Z at qa_arena5_tests.Tests.PC.TestBase.CloseOtherWindowsAfterFb() in C:\vsts-agent\_work\1497\s\Tests\PC\TestBase.cs:line 41
2019-04-09T13:38:21.1620825Z
2019-04-09T13:38:21.1639416Z Standard Output Messages:
2019-04-09T13:38:21.1639779Z Starting on the PC in Chrome browser
2019-04-09T13:38:21.1640131Z OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:13423/session/3a97f32e15c7e5c89254717e6db7ba44/window/current/maximize timed out after 180 seconds. ---> System.Net.WebException: The operation has timed out
2019-04-09T13:38:21.1640318Z at System.Net.HttpWebRequest.GetResponse()
2019-04-09T13:38:21.1640463Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-09T13:38:21.1640671Z --- End of inner exception stack trace ---
2019-04-09T13:38:21.1640814Z at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2019-04-09T13:38:21.1640951Z at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
2019-04-09T13:38:21.1641152Z at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
2019-04-09T13:38:21.1641298Z at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2019-04-09T13:38:21.1641449Z at OpenQA.Selenium.Remote.RemoteWindow.Maximize()
2019-04-09T13:38:21.1643450Z at qa_arena5_tests.Framework.BrowserFactory.Chrome.InitBrowser(Boolean proxyStatus) in C:\vsts-agent\_work\1497\s\Framework\BrowserFactory\Chrome.cs:line 18
2019-04-09T13:38:21.1643722Z at qa_arena5_tests.Framework.Driver.StartWebDriver() in C:\vsts-agent\_work\1497\s\Framework\Driver.cs:line 76
2019-04-09T13:38:21.1643963Z at qa_arena5_tests.Framework.Driver.Start() in C:\vsts-agent\_work\1497\s\Framework\Driver.cs:line 42
2019-04-09T13:38:21.1644111Z at qa_arena5_tests.Tests.PC.TestBase.StartBrowser() in C:\vsts-agent\_work\1497\s\Tests\PC\TestBase.cs:line 24
2019-04-09T13:38:21.1644228Z Can't Kill Process
2019-04-09T13:38:21.1644405Z Can't Kill ProcessObject reference not set to an instance of an object.
2019-04-09T13:38:21.1644537Z Start new driver: Object reference not set to an instance of an object.
2019-04-09T13:38:21.1646293Z Starting on the PC in Chrome browser
2019-04-09T13:38:21.1646484Z Can't Kill Process
2019-04-09T13:38:21.1646615Z Can't Kill ProcessObject reference not set to an instance of an object.
2019-04-09T13:38:21.1648139Z Dismiss Freezed Driver: Object reference not set to an instance of an object.
2019-04-09T13:38:21.1648229Z
2019-04-09T13:38:21.1648299Z
2019-04-09T13:38:21.7097595Z Results File: C:\vsts-agent\_work\r915\a\TestResults\tfsservice_NY-VSOBUILD02_2019-04-09_06_38_21.trx
2019-04-09T13:38:21.7235055Z
2019-04-09T13:38:21.7239852Z Total tests: 1. Passed: 0. Failed: 1. Skipped: 0.
2019-04-09T13:38:21.7254927Z Test Run Failed.
2019-04-09T13:38:21.7272226Z Test execution time: 6.2200 Minutes
2019-04-09T13:38:31.7997221Z The STDIO streams did not close within 10 seconds of the exit event from process 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe'. This may indicate a child process inherited the STDIO streams and has not yet exited.
2019-04-09T13:38:31.8345028Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2019-04-09T13:38:31.9132161Z ##[error]Error: The process 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe' failed with exit code 1
2019-04-09T13:38:34.3433382Z ##[error]VsTest task failed.
2019-04-09T13:38:34.6729422Z Publishing test results to test run '1013604'
2019-04-09T13:38:34.6729786Z Test results remaining: 1. Test run id: 1013604
2019-04-09T13:38:35.9982899Z Published Test Run : https://tfsprodweusu4.visualstudio.com/A7ca298fe-0375-43ed-a418-90a0ad2a198a/Phoenix%20Games/_TestManagement/Runs#runId=1013604&_a=runCharts
2019-04-09T13:38:39.3752830Z ##[section]Async Command Start: Publish test results
2019-04-09T13:38:39.3753144Z ##[section]Async Command End: Publish test results
2019-04-09T13:38:39.3755772Z ##[section]Finishing: Tests
I found that the tests work when VSTS agent is running from command line (not as Windows Service). But all was Ok with working as the service for a years.
Hi, thank you for the info. I am able to reproduce this issue with agent running as service. I understand this did not use to require an interactive session. I'm trying to find what changed that caused this break in behaviour. I tried this with an older agent (but newer browser) and can still reproduce the issue. Can you please confirm what changed between before and after the break? Was there a browser update? (I will also try to repro this on older version to confirm this, but if you already have this info, it will help)
Meanwhile to workaround this for now, as mentioned above, you can set up the agent to run in interactive mode (not as service)
Hi! The browsers are updating automatically on the agents. I can share release logs before and after the problem had appeared. Would it be helpful?
As workaround I switched the tests to Firefox. It works without any problem.
Can you please confirm what changed between before and after the break? Was there a browser update? (I will also try to repro this on older version to confirm this, but if you already have this info, it will help)
Nothing as changed about agent configuration. So we can probably think a browser update happened.
Thanks for your time
Hi, thank you for the info. I am able to reproduce this issue with agent running as service. I understand this did not use to require an interactive session. I'm trying to find what changed that caused this break in behaviour. I tried this with an older agent (but newer browser) and can still reproduce the issue. Can you please confirm what changed between before and after the break? Was there a browser update? (I will also try to repro this on older version to confirm this, but if you already have this info, it will help)
Meanwhile to workaround this for now, as mentioned above, you can set up the agent to run in interactive mode (not as service)
Hello @kaadhina,
Do you have any updates on the issue?
Thanks!
Hi, I've confirmed that the differentiating factor is the browser version. The issue reproduces with older version of agent, driver but a newer version of chrome. At the moment I have no clue about what might have changed in the browser. The workarounds I can think of for the time being are:
Thanks for your participation here!
So what we can do except a workaround? Is Microsoft going to work on it? Or should we report the issue to Chrome or Selenium team?
Since this is not a change from the agent side and the breaking change is confined to Chrome/Selenium, we think it would be best for you to report this directly to the concerned owners. Thank you.
Confirmed I get the same result with headless mode.
Can we not force the dotnet test to stop?
+1
@kaadhina why was this closed?
Hi! The browsers are updating automatically on the agents. I can share release logs before and after the problem had appeared. Would it be helpful?
As workaround I switched the tests to Firefox. It works without any problem.
I had the same problem as you had. Using FireFox now too. It solves my problem too. Too bad Microsoft haven't solve this problem yet.
is solution to above problem available? I have been struggling for many days
TBC.
This issue has come back now we are using Windows 2019, Agent v3.220.1 Chrome 113.0.5672.63, ChromeDriver 4/25/2023, net6 "--headless=new"
Error Message:
OneTimeSetUp: OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:52610/session/9c26c9e692e3ae6742f4eda76f195f4c/refresh timed out after 180 seconds.
----> System.Threading.Tasks.TaskCanceledException : The request was canceled due to the configured HttpClient.Timeout of 180 seconds elapsing.
Tasks
Still an issue here, now the test runs correctly the first time (has been working for years), now after first run, the second run triggers the error:
An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://localhost:50016/session/d53c8019d289a7676ddb886636f524a6/element/005E894875B459B920B051F9F5D9BE12_element_125/click. The exception message was: An error occurred while sending the request.: at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebElement.Execute(String commandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebElement.Click()
Restarting the VM where the build agent runs will reset the issue, after first run it will trigger the error again.
Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: VSTestV2 Version: 2.149.6
Environment
Issue Description
We have a Visual Studio test suite running Selenium tests on Chrome (MSTest).
Starting two weeks ago, all our automated tests ran from Azure Devops stopped to pass. It seems something doesn't succeed anymore to communicate between Chromedriver <=> Chrome and/or the "tests runner" <=> chromedriver. Error is
Assert.Fail failed. Unexpected Error : The HTTP request to the remote WebDriver server for URL http://localhost:3723/session/c121c86b25ece8424dbb8771c2ef16b3/window/current/maximize timed out after 60 seconds.
If I remote connect to the host, and run the command in CLI via
vstest.console.exe MyTestSuite.dll
everything is working and passing well (so not issue about chromedriver and Chrome version apparently).If I run tests from Azure Pipelines DTAExecutionHost is run and tests are timing out (see logs below).
Task logs
For information, when logged in to the host, I can see in task manager all the 3 processes (DTAExecutionHost, chromedriver and Chrome, but no "activity" like CPU or memory moving):![image](https://user-images.githubusercontent.com/1559970/55389760-26428780-5536-11e9-8abe-e06b701fed07.png)
Troubleshooting
Using system.debug flag, there is no interesting additional log.
Please, advice what could be wrong :)