OS: Win 10 c64
Selenium Version: 3.9.0.0
Selenium.WebDriver.ChromeDriver version="2.35.0" targetFramework="net47"
Browser: Chrome Version 64.0.3282.140 (Official Build) (64-bit)
Get data back.
It is the same code I use in my unit test. My unit test passes successfully, but when running in IIS I get the error below.
Throws exception when hitting the chromeDriver constructor.
Strange exception message is: http://localhost:42607/session timed out after 60 seconds.
I do not do a request to this url? I don't know where it comes from?!
When I open this url in chrome, it displays: Unknown command.
{
"Message": "An error has occurred.",
"ExceptionMessage": "The HTTP request to the remote WebDriver server for URL http://localhost:42607/session timed out after 60 seconds.",
"ExceptionType": "OpenQA.Selenium.WebDriverException",
"StackTrace": " at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)\r\n at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)\r\n at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)\r\n at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters)\r\n at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)\r\n at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)\r\n at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)\r\n at Web.Scraping.WebApi.ScrapeController.Post(List1 listDTO) in C:\Users\Admin\Documents\Visual Studio 2017\Projects\Phantomjs.UnitTests\Web.Scraping.WebApi\ScrapeController.cs:line 45\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker. d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult. d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher. d__1.MoveNext()",
"InnerException": {
"Message": "An error has occurred.",
"ExceptionMessage": "The request was aborted: The operation has timed out.",
"ExceptionType": "System.Net.WebException",
"StackTrace": " at System.Net.HttpWebRequest.GetResponse()\r\n at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)"
}
}
This code works fine in my unit test and also worked fine in IIS before, but out of sudden it is broken.
```
var co = new ChromeOptions();
co.AddArgument("headless");
co.AcceptInsecureCertificates = true;
co.PageLoadStrategy = PageLoadStrategy.Normal;
Dictionary<string, bool> dic = new Dictionary<string, bool>();
using (var driver = new ChromeDriver(co))
{
try
{
var urls = new string[] { paypalUrl, noPaypalUrl, paypalUrl1 };
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
for (int i = 0; i < urls.Length; i++)
{
var url = urls[i];
var exists = driver.CheckElementExists(url,
wt => !string.IsNullOrWhiteSpace(wt.FindElement(By.CssSelector("ul.payment-type-list")).Text), "li.pt-paypal");
dic.Add(url, exists);
}
driver.Close();
....
static IWebElement TryFindElementByCssSelector(this ChromeDriver self, string cssSelector)
{
try
{
return self.FindElementByCssSelector(cssSelector);
}
catch (Exception) { }
return null;
}
public static bool CheckElementExists(this ChromeDriver driver, string url, Func<IWebDriver, bool> waitCondition, string cssSelectorToLookFor)
{
driver.Navigate().GoToUrl(url);
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
wait.Until(waitCondition);
var liPaypal = driver.TryFindElementByCssSelector(cssSelectorToLookFor);
return liPaypal == null ? false : true;
}
```
There's probably something about running in the context of an IIS process that's either preventing chromedriver.exe from launching or from receiving HTTP traffic from the language bindings. Since the language bindings (your C# code) uses HTTP to communicate with chromedriver.exe (that's where the "http://localhost:
It worked fine before, as I can remember, I have changed nothing..
I also cannot see anything in EventViewer.
The exception is thrown during construction of ChromeDriver. I will analyze it further...
DefaultAppPool and current user have full access to ChromeDriver.exe, so it is not related to security.
The question is:
Where does this url "http://localhost:45157/session" from the exception message come from?
Adding this line, prevents the exception from happening:
co.AddArgument("no-sandbox");
Wonder how it worked before???
Dangerous, yes, but EventViewer and the api itself don't provide me with usable information that I could analyze further. If you have any suggestions what further to check? The exe itself has full permissions!
No Firewall issue. As I metnioned, it worked before...
Feel free to point me in any direction I should investigate in.
I have one mor question about correctly disposing ChromeDriver instance.
I use Postman to execute a web api request, which then in turn creates a ChromeDriver instance in a using block.
After the request has finished, ChromeDriver.exe is still active (Task manager)??
It should be disposed, even when an exception occurs, right?!
using (var driver = new ChromeDriver(co))
{
try
{...
And where does this url "http://localhost:45157/session" from the exception message come from?
I've hosted my web api in IIS and I have no binding on this port.
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards. No user action is required.
DETAIL -
36 user registry handles leaked from \Registry\User\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_Classes:
Process 6276 (\Device\HarddiskVolume2\Users\Admin\Documents\Visual Studio 2017\Projects\UnitTests\Web.WebApi\binchromedriver.exe) has opened key \REGISTRY\USER\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_Classes\Local Settings\Software\Microsoft
Once again, the language bindings (your C# code) use HTTP to communicate with the browser driver (chromedriver.exe, geckodriver.exe, IEDriverServer.exe, etc.). It initiates a session with the driver by sending a POST to http://localhost:(some port value)/session. The WebDriver wire protocol is JSON-over-HTTP, so every command issues an HTTP call to localhost.
As for why sessions aren’t being created, I do not know. It’s unlikely that the Selenium project will be able to narrow down what the issue is. I’m certain it’s entirely dependent on the environment, being run under IIS. Beyond that, I do not have the ability or environment to narrow it down further.
Thanks for your reply, I will consult with the ChromeDriver guys, perhaps they know what the issue is...
Hi Team
I am getting this issue again while running my scripts against chrome.
I am using the latest version of Selenium & Chrome Driver.

We had this issue using Selenium in a windows service. I found a resident console app living with the credential of the service's credential. I shut down our service, ended that task (i.e this console app linked to selenium) and made sure no Firefox instances (i.e. yup, we use Firefox) were not running and then started our service back up again. Everything worked as before. You may want to check your running tasks. Otherwise, if possible, restart the server your running your code on. Bottom line, there something resident causing it to happen, or at least, that was our issue. Hope this may help.
I am facing the same issue.
I tried updating Chrome, ChromeDriver and Selenium Nuget Package to the latest. Still the same failure
The error is below
The HTTP request to the remote WebDriver server for URL http://localhost:57322/session/1f6d9bf08336f880804a69bff68f15fc/element/0.798790339877028-9/value timed out after 60 seconds.
I am facing the same issue.
I can add more info: that error occurs when Chrome is already opened on my computer and I am running chromeDriver with Profile from "%appData\Local\Google\Chrome\User Data\Some profile" But if Chrome is closed (and all the processes are killed) and I am running chromeDriver with that Profile - this error doesn't occur.
Selenium Version: 3.13.0.0
Selenium.WebDriver.ChromeDriver version="2.40" targetFramework="net47"
Browser: Chrome Version 67.0.3396.99 (Official Build) (64-bit)
I am facing the same issue, Is there any updates on this one?
I did notes that if I run my test local with VS 2017 it do past, but on 2015 still failing, can it be related?
Hey Daria, I think one contributor mentioned a way to fix this issue for Chrome. Please see the responses from Legend above. The way I am able to fix this issue is to review running process on the server where selenium code is executing. You should see running processes that belong to your code. Then, just kill those processes. It requires a bit of review. If this happens a lot, you may need to look closer at the optional arguments. I wish I had more, but for us, I was able to identify and fix by killing the rouge processes. More of a support issue we see once in a great while. We use FireFox, and I have not tried the solution that Legend mentions. My thought is that it should work.
thank you so much for your replay. I will try and see if its helps
On Mon, Jul 16, 2018 at 6:04 PM PMSIInterview notifications@github.com
wrote:
Hey Daria, I think one contributor mentioned a way to fix this issue for
Chrome. Please see the responses from Legend above. The way I am able to
fix this issue is to review running process on the server where selenium
code is executing. You should see running processes that belong to your
code. Then, just kill those processes. It requires a bit of review. If this
happens a lot, you may need to look closer at the optional arguments. I
wish I had more, but for us, I was able to identify and fix by killing the
rouge processes. More of a support issue we see once in a great while. We
use FireFox, and I have not tried the solution that Legend mentions. My
thought is that it should work.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SeleniumHQ/selenium/issues/5457#issuecomment-405278200,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AjLwZPh3n6B_cobn6NOMbmOIdL3t9WToks5uHKt3gaJpZM4R89NH
.
No one have a solution?
I'm still having this problem with headless chrome and I've tried everything including:
I'm still having this problem with headless chrome
please open a new issue and include failing code and a stacktrace
Has a new issue been opened? Is someone trying to figure this out?
I face the same issue. Failures are happening only in remote test runs. Tests go all pass in Local runs and in debug mode. However, on remote server as well, the failures are intermittent. The same builds with no changes is passing in the next immediate run. This is leaving my tests as flaky and uncertain.
Have tried all the suggestions above and the falky failures still remain.
Please post the solution if any for this. Thank you.
I am experiencing similar issue with IEDriver (3.5.1.0 (64-bit)) when trying to get elements by name. I am opening a local HTML file to measure width and height of some texts. I have tried terminating all ie processes; didn't help.
Here is the exception
org.openqa.selenium.WebDriverException: java.net.SocketTimeoutException: Read timed out
t org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:443)
at org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName(RemoteWebDriver.java:490)
at org.openqa.selenium.By$ByTagName.findElements(By.java:327)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:404)
and here is the some relevant information from Event viewer
_Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards. No user action is required.
IEDriverServer.exe) has opened key \REGISTRY\USER_
Can any body advice any direction to get this issue resolved? Where should I investigate; the same code worked before and still does on the test system but not anymore on prod. Can Windows update have an effect?
One thing you could try is to reset your TCPIP stack and restart the server. We had seen where the issue lays in TCPIP settings being unusable by the drivers. Once we clear the stack and restart, the issue seems to be resolved. We still see it occasionally where the driver cannot get internet access, but very seldom. Resetting the stack helped also. As for as prevention via code, those suggestions are offered above, but that is only from the code side.
I've got this issue with a Selenium process that I've set up to run automatically on my work desktop via Task Scheduler. It seems to work just fine when I run the project manually from inside Visual Studio (it's a .NET project), but throws this error when Task Scheduler runs the .exe. It would be great to just have this run automatically.
When googling on this, I only find hacks like kill processes, try some more command line arguments, increase the number of tcp entries in the stack and the like. None of those has worked for me. Is there any chance the real problem will be adressed some time near? Is TCP/IP necessary or can pipes be used instead? Or what about reusing connections?
I'm seeing the same issue. Tried everything in this thread and haven't been able to figure it out...
I had the same issue and disabling the firewall helped me resolve this error
I am having the same issue but with Azure Dev Ops on a hosted agent.
Some delays in updates (to complicate to explain), will know the week of
the 19th.
On Wed, Nov 7, 2018 at 2:19 PM Huffman17 notifications@github.com wrote:
I am having the same issue but with Azure Dev Ops on a hosted agent.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SeleniumHQ/selenium/issues/5457#issuecomment-436743679,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ao0tUG-ZG9dIugQKW3r-Dmwq-z54PZWEks5uszIkgaJpZM4R89NH
.
I am having the same issue but with Azure Dev Ops on a hosted agent.
I'm running into this with Azure DevOps too. Pretty basic test task, mostly default settings:
2018-11-12T11:11:39.2044622Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @D:\a_temp\ba029261-e66b-11e8-9fd0-959fc44c2e65.txt
2018-11-12T11:11:48.0377524Z Microsoft (R) Test Execution Command Line Tool Version 15.8.0
2018-11-12T11:11:48.0378292Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-11-12T11:11:48.0378696Z
2018-11-12T11:11:48.3169548Z vstest.console.exe
2018-11-12T11:11:48.3169831Z "D:\a\r1\a\SamSmithNZ2017Web\drop\UITests\SamSmithNZ2018.UITests.dll"
2018-11-12T11:11:48.3170111Z /TestCaseFilter:"TestCategory=SmokeTest"
2018-11-12T11:11:48.3170220Z /Settings:"D:\a\r1\a\SamSmithNZ2017Web\drop\UITests\test.runsettings"
2018-11-12T11:11:48.3170303Z /logger:"trx"
2018-11-12T11:11:48.3172353Z /TestAdapterPath:"D:\a\r1\a"
2018-11-12T11:11:54.0972455Z Starting test execution, please wait...
2018-11-12T11:12:02.4032139Z Starting ChromeDriver 2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a) on port 1721
2018-11-12T11:12:02.4032504Z Only local connections are allowed.
2018-11-12T11:13:06.5707122Z Failed GotoSSNZHomePage
2018-11-12T11:13:06.5707372Z Error Message:
2018-11-12T11:13:06.5707488Z Test method SamSmithNZ2018.UITests.SSNZWebTest.GotoSSNZHomePage threw exception:
2018-11-12T11:13:06.5707832Z OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:1721/session timed out after 60 seconds. ---> System.Net.WebException: The operation has timed out
Having the same issue in Azure DevOps. Posted this in the Developer Forum for Azure DevOps: https://developercommunity.visualstudio.com/content/problem/382742/selenium-tests-webdriver-session-timed-out-after-6.html
@samsmithnz @Huffman17
I am having the same problem. I followed this instruction: https://docs.microsoft.com/en-us/azure/devops/pipelines/test/continuous-test-selenium?view=vsts
It works fine on my local development environment, but in our build it does not. Is it because i am trying to access a website that resides on a different server then where the deployed website is?
I am using this package setup in Visual Studio 2017:
<package id="MSTest.TestAdapter" version="1.3.2" targetFramework="net461" />
<package id="MSTest.TestFramework" version="1.3.2" targetFramework="net461" />
<package id="Selenium.Firefox.WebDriver" version="0.22.0" targetFramework="net461" />
<package id="Selenium.WebDriver" version="3.141.0" targetFramework="net461" />
<package id="Selenium.WebDriver.ChromeDriver" version="2.43.0" targetFramework="net461" />
<package id="Selenium.WebDriver.IEDriver" version="3.141.0" targetFramework="net461" />
This is happening for us as well. It's happening on certain machines and works fine for the others. I have tried turning off Win Firewall or setting ChromeDrivers 'no-sandbox' param but haven't resolved the problem!
Can anyone please explain why http communication is requiring http://localhost server! Can the port be changed using some settings? Its become a big problem when using selenium in our team and the problem has been here for some time.
Hope we have a solution soon. It’s getting a bit out of control. We are seeing upwards of a 50 percent failure rate.
same error here, happens when i update chromedriver:

reset it back to 2.40.0 it works fine
Thanks, chxylucy the downgrade to version 2.40.0 worked for me as well.
Has anyone tried one of the other versions - 2.41 or 2.42?
Will try to reuse chromedriver (browser) between tests (not an ideal solution).
I am using the chrome driver that is already installed on the azure vm with new ChromeDriver(Environment.GetEnvironmentVariable("ChromeWebDriver")
The VM uses ChromeDriver 2.40.565498. Vs 2.43
Folks, the issues with Azure DevOps aren’t issues with Selenium. As such, I’m not sure this issue report is the correct forum for getting things resolved to your satisfaction.
It might be useful to review how WebDriver works under the hood. Remember that WebDriver communicates between the language bindings (or “local end,” in W3C spec parlance) and the browser driver (chromedriver.exe, or “remote end”) via HTTP on the localhost loopback adapter. This is normal and by design. This, incidentally, is why you see the “Only local connections are allowed” message output by chromedriver.exe.
It _is_ possible in the language bindings to specifically set the port that chromedriver.exe listens on. In C#, this is done via the Port property of the ChromeDriverService class, and there is a constructor overload for ChromeDriver that takes an instance of this class.
Finally, if you’re using a NuGet package to retrieve the chromedriver.exe (or any other browser driver) binary, you should be aware that the Selenium project does not maintain those packages. We have no insight into the maintenance of them, nor of how they manage the binaries contained within.
As for what the exception message actually means, it means the same thing it’s meant since the driver was architected to use HTTP. There is a blog post that, while six years old at the time of this writing, still accurately describes what’s happening in the driver, and why you receive the error you do.
@jimevans We had made an issue on the Azure Dev Ops forum already, we know its a chrome driver issue as we have been discussing fixed versions. The newer versions 2.42 and 2.43 should have the fix for this issue as it says in their patch notes. In fact, it has been "fixed" numerous times. I feel it is is also necessary to let them know we are facing the issue still in their newest versions. It would seem you did not know seleniumHQ collaborated to create the chromedriver so we are in the right place.
We weren't asking why it communicates with the browser via HTTP.
@Huffman17 I'd like to note that chromedriver developers don't usually read this issue tracker. If you want chromedriver devs to hear you please report issues to https://bugs.chromium.org/p/chromedriver/issues/list
@barancev If you look at their list, this issue has been flagged as fixed several times, using 2.4 works. Not 2.42 or 2.43. Thanks anyways.
@Huffman17 I think you may be mistaken on several fronts. I’m well aware of the level of collaboration (or lack thereof) between the Selenium project and the maintainers of chromedriver.exe (the Google-sponsored Chromium project). The two projects are dependent on one another to be sure, but they share virtually no contributors between them. Moreover, as @barancev mentioned, the Chromium contributors do not routinely monitor the Selenium project’s issue tracker.
The comment about why HTTP is being used is, in fact, a direct response to a question posed in a comment in this issue. Specifically, where @Enielezi asked, “Can anyone please explain why http communication is requiring http://localhost server.”
I’ll be the first to admit that there are a number of things I do not know about; the workings of the .NET bindings (of which I’m the primary author), and the governance and maintenance of the Selenium project itself (of which I’ve been a core contributor for over eight years, and been a part of the project leadership committee for over two years) are not among those things. The implication that I am unclear on these details is simply incorrect, and frankly, insulting.
@jimevans I am not interested in trying to cause drama on github.
We have our fix and it's an earlier version, like I mentioned, they have this in their patch notes. If they have it in their patch notes, its certainly something they know about. Much like I found this post and a fix, perhaps someone can see this and find it works for them.
I was having a similar issue running a console app in Visual Studio. I noticed when I removed the headless option, Chrome opened and the automation extension immediately crashed. I googled and found this post. https://stackoverflow.com/questions/34164831/selenium-crashing-chrome-automation-extension-has-crashed
I was running VS as Administrator. Once I switched to a normal user context, it started working again. Hopefully this helps someone.
Hi friends, I decided this problem like this:
instead of using:
var options = new ChromeOptions();
options.AddArgument("-no-sandbox");
driver = new ChromeDriver(options);
I Using;
ChromeOptions option = new ChromeOptions();
option.AddArgument("no-sandbox");
driver = new ChromeDriver("full path to the directory containing ChromeDriver.exe", option, TimeSpan.FromSeconds(130));
Hi friends, I decided this problem like this:
instead of using:
var options = new ChromeOptions();
options.AddArgument("-no-sandbox");
driver = new ChromeDriver(options);
I Using;
ChromeOptions option = new ChromeOptions();
option.AddArgument("no-sandbox");
driver = new ChromeDriver("full path to the directory containing ChromeDriver.exe", option, TimeSpan.FromSeconds(130));
I can tentatively say this is working for me (it's worked the first couple of times I tried it). Thanks!
Ran into this issue but it was because I was trying to run ChromeDriver 2.44 against Chrome vers 68 when 2.44 only supports 69-71. Downgrading to ChromeDriver 2.40 solved my problem.
@Legends You saved my day! this solutions works and confirmed with the following version:
ChromeDriver 2.45.615355
Selenium 3.141.0
Python 3.7.1
I am also having an issue that sounds just like this with the InternetExplorerDriver. Each person seems to have the issue to various levels, those who flat out are not working at all can usually tweak some setting to get things going again. In my case it is a random issue that crops up, almost as if the service call simply never made it to the driver, or the Driver locked up for an extended period.
One helpful solution would be for Selenium to be able to kill and re-start a given driver if it got locked up.
From searches on the Internet, this issue seems to be common to all the various browsers drivers. Which would indicate a more central problem, so I am not ready to let Selenium itself off the hook for this one.
As near as I can tell, Selenium is timing out while it is calling whichever driver it is using. This issue could be caused by a lot of different things, but if Selenium were capable of retrying the call, or even restarting the driver service if it got hung, that might solve the issue. Blaming the developers of all the drivers for an issue common to calls made to all of them doesn't seem super logical.
@jeremeguenther ...
Blaming the developers of all the drivers for an issue common
to calls made to all of them doesn't seem super logical.
Neither does adding a reply to a closed issue and providing no additional information.
I am also having an issue that sounds just like this with the InternetExplorerDriver.
This issue was specific Chromedriver. If you think you have an issue with InternetExplorerDriver, please file a new issue and include all required information. Issues must contain specific details about the failing software and environment... you included nothing.
so I am not ready to let Selenium itself off the hook for this one.
Unfortunately... Anecdotal evidence, vague mentions about having "similar issues", and appealing to arbitrary "searches on the internet" gives the maintainers absolutely nothing to work with and no chance of helping or fixing anything.
You are right, my last post was colored by my frustration at Microsoft for dropping CodedUI, I apologize for that.
I replied to a closed thread because I do not actually expect anyone to fix the issue. Maybe if enough people bring up the same issue something will finally move forward with it.
This thread was started for the Chromedriver, but is not specific to it:
Here it is happening on FireFox with no solution.
Again with Firefox:
And again with Firefox:
I am getting the same error in the IE Driver. So it is not specific to Chromedriver. Unless we are calling the code calling the Webdriver by the same name as well. The consensus in this thread seems to be that if any misbehavior happens between Selenium and the Driver then it is the drivers fault, and Selenium has no reason to try and create more stability between itself and the driver.
I have started a separate thread for actual assistance. It would be nice if based on the evidence from this thread that a more general solution were to be considered.
Copies of errors I am getting just like the others in this and the other threads:
Message: The HTTP request to the remote WebDriver server for URL http://localhost:24478/session/07896235-84ea-465e-a361-cb0ef5885ef2/window/rect timed out after 60 seconds.
StackTrace: at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWindow.get_Position()
And another one:
Message: The HTTP request to the remote WebDriver server for URL http://localhost:24478/session/07896235-84ea-465e-a361-cb0ef5885ef2/url timed out after 60 seconds.
StackTrace: at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.get_Url()
This issue is so prevalent that the entire first two pages of search results return people having the same issue. A couple of the drivers seem to know there is an issue, and are trying to work on it, but there is no generalized solution or proposal to handle this common issue inside Selenium.
I already gave the solution I would like to see inside Selenium "retrying the call, or even restarting the driver service if it got hung". Again, not something I am expecting to actually happen because the re-attach feature has been asked for for years, and was finally shot down as not going to happen; and it would be required for this solution.
I’ve been called both ignorant (@Huffman17) and incompetent (@jeremeguenther) in this issue’s comments, if not by name, then by function. I’ve had my suggestions scoffed at and not taken seriously. There seems to be some expectation that because I’m an unpaid volunteer for a project that no one else seems to be willing to make substantive contributions to, and with no attempt whatsoever to understand the underlying architectural issues, that it’s acceptable to be abusive in these ways. When it comes to this issue, we’re done here.
Most helpful comment
Adding this line, prevents the exception from happening:
co.AddArgument("no-sandbox");Wonder how it worked before???