SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

OpenQA.Selenium.WebDriverException : No response from server for url #3719

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 3719

When using ChromeDriver via ChromeDriverService and RemoteDriver
and run multiple tests. They _sometimes_ fail with the exception above.

The tests run OK when I start individual ChromeDriver per each unit test.

The stack is as follows:

OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:50258/session/e58704878fbaecee8aaefabe64076eeb/element/:wdc:1334321221530/click
 at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) in
c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\HttpCommandExecutor.cs:line
115
 at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2
parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line
795

Selenium version: 2.21
OS: Windows 2008 R2 64 bit
Browser: ChromeDriver
Browser version: 19

Reported by Evgeny.Tukin on 2012-04-13 12:51:57

lukeis commented 8 years ago
I just wanted to say that, in response to post #42, this issue DOES still occur in IE.
I am using the latest version (2.41.0) of Selenium for C# and the 32-bit IEDriverServer,
and I have found a case in which clicking on a certain button produces this error ("The
HTTP request to the remote WebDriver server for URL [...] timed out after 60 seconds")
100% of the time. Unfortunately, this occurs in a web application that isn't publicly
available, but I am currently attempting to create a minimal test case to share publicly.
In the meantime, I at least wanted to point out that the problem still occurs in IE.

Reported by DanielCharles1988 on 2014-04-01 18:45:29

lukeis commented 8 years ago
#55 Hi Daniel,
 have you managed to make the test case to reproduce this issue? I am having this issue
in both FF & Chrome (everything in a latest version - selenium server 2.41, C# binding
2.41, ChromeDriver 2.10, latest version of chrome & ff). I'd be very grateful if you
could post the test case to Selenium devs to work this out.

Thanks,
  Marcel

Reported by marcellustrixus on 2014-05-26 16:28:06

lukeis commented 8 years ago
Marcel,

Sorry, I was never able to reproduce the issue, despite my best efforts. This issue
came up while I was working with a previous employer; unfortunately, I no longer have
access to that web application. All I can say is, I suspect that it either had something
to do with Classic ASP (the back end; I don't know much about ASP...), or, more likely,
due to the fact that we were clicking on an element which was located in a frame (and
the element had a Javascript "onclick" attribute). I'm sorry that I was unable to come
up with a test case; I hope that someone else succeeds and the issue gets resolved.

Daniel

Reported by DanielCharles1988 on 2014-05-27 20:44:07

lukeis commented 8 years ago
hi, this is crazy.
I put timestamp loging in to my code.
Times in my log not equals with times in chromedriver.log (I convert times in chromedriver.log
from relative times to absolute times)

Different times of call Title method:
By my code at 16.06.2014 00:22:35,030
by chormedriver at 16.06.2014 00:24:40,549

And
Why I dont get exception in navigate method? duration is 3 minutes, by chromedriver.log

CODE:

private static void TryGoToUrl(IWebDriver driver, string url)
{
    Trace trace = new Trace(); // Start trace
    try
    {
        trace.Append("Navigate");
        driver.Navigate().GoToUrl(url);

        trace.Append("Title");
        string title = driver.Title;

        trace.Append("Check results");
        // TODO
    }
    catch (Exception ex)
    {
        trace.Append("End trace");
        throw new Exception(String.Format("Exception when TryGoToUrl (params - url:
{0}) {1}", url, trace.ToString()), ex);
    }
}

EXCEPTION:

System.Exception: Fast refresh XXX - 187,125 secs --->
XXX.Module.ModuleException: FastRefresh --->
System.Exception: Exception when TryGoToUrl (params - url: http://www.XXX.com/live/en)
16.06.2014 00:21:35,001 - Start trace
16.06.2014 00:21:35,001 - Navigate
16.06.2014 00:22:35,030 - Title
16.06.2014 00:23:35,048 - End trace
 --->
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:2186/session/736835670a5852c26cce654834cbcb18/title timed
out after 60 seconds. --->
System.Net.WebException: The operation has timed out
   at System.Net.HttpWebRequest.GetResponse()
   at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
   --- End of inner exception stack trace ---
   at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
   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_Title()
   at XXX.Common.IWebDriverExtensions.TryGoToUrl(IWebDriver driver, String url, Int32
attempt)

CHROMEDRIVER LOG:

[16.06.2014 00:21:35,003][INFO]: COMMAND Navigate {
   "url": "http://www.betvictor.com/live/en"
}
[16.06.2014 00:21:35,003][INFO]: Waiting for pending navigations...
[16.06.2014 00:21:35,003][INFO]: Done waiting for pending navigations
[16.06.2014 00:21:35,003][DEBUG]: DEVTOOLS COMMAND Page.navigate (id=7371) {
   "url": "http://www.betvictor.com/live/en"
}
[16.06.2014 00:21:35,005][DEBUG]: DEVTOOLS RESPONSE Page.navigate (id=7371) {

}
[16.06.2014 00:21:35,005][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=7372) {
   "expression": "document.URL"
}
[16.06.2014 00:21:35,126][DEBUG]: DEVTOOLS EVENT Console.messageAdded {
   "message": {
      "column": 10991,
      "level": "log",
      "line": 13,
      "parameters": [ {
         "className": "Object",
         "description": "Object",
         "objectId": "{\"injectedScriptId\":170,\"id\":1}",
         "preview": {
            "lossless": false,
            "overflow": true,
            "properties": [ {
               "name": "readyState",
               "type": "number",
               "value": "0"
            }, {
               "name": "getResponseHeader",
               "type": "function",
               "value": ""
            }, {
               "name": "getAllResponseHeaders",
               "type": "function",
               "value": ""
            }, {
               "name": "setRequestHeader",
               "type": "function",
               "value": ""
            }, {
               "name": "overrideMimeType",
               "type": "function",
               "value": ""
            } ]
         },
         "type": "object"
      } ],
      "repeatCount": 1,
      "source": "console-api",
      "stackTrace": [ {
         "columnNumber": 10991,
         "functionName": "",
         "lineNumber": 13,
         "scriptId": "24391",
         "url": "http://www.gaming-assets.com/assets/manifests/live-0253aae285d4fd8096cd6f392a981c6d.js"
      }, {
         "columnNumber": 29270,
         "functionName": "fire",
         "lineNumber": 2,
         "scriptId": "24390",
         "url": "http://www.gaming-assets.com/assets/manifests/all-8c93384329d74eb6e76fd207cffd3cfe.js"
      }, {
         "columnNumber": 30477,
         "functionName": "self.fireWith",
         "lineNumber": 2,
         "scriptId": "24390",
         "url": "http://www.gaming-assets.com/assets/manifests/all-8c93384329d74eb6e76fd207cffd3cfe.js"
      }, {
         "columnNumber": 31209,
         "functionName": "done",
         "lineNumber": 4,
         "scriptId": "24390",
         "url": "http://www.gaming-assets.com/assets/manifests/all-8c93384329d74eb6e76fd207cffd3cfe.js"
      }, {
         "columnNumber": 7428,
         "functionName": "callback",
         "lineNumber": 5,
         "scriptId": "24390",
         "url": "http://www.gaming-assets.com/assets/manifests/all-8c93384329d74eb6e76fd207cffd3cfe.js"
      } ],
      "text": "[object Object]",
      "timestamp": 1402870895.223125,
      "type": "log",
      "url": "http://www.gaming-assets.com/assets/manifests/live-0253aae285d4fd8096cd6f392a981c6d.js"
   }
}
[16.06.2014 00:21:35,127][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading {
   "frameId": "3860.1"
}
[16.06.2014 00:21:35,127][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=7372) {
   "result": {
      "type": "string",
      "value": "http://www.betvictor.com/live/en#485636200_argentina_v_bosnia_and_herzegovina"
   },
   "wasThrown": false
}
[16.06.2014 00:21:35,127][INFO]: Waiting for pending navigations...
[16.06.2014 00:24:32,990][DEBUG]: DEVTOOLS EVENT Console.messagesCleared {

}
[16.06.2014 00:24:32,990][DEBUG]: DEVTOOLS EVENT Page.frameNavigated {
   "frame": {
      "id": "3860.1",
      "loaderId": "3860.172",
      "mimeType": "text/html",
      "securityOrigin": "http://www.betvictor.com",
      "url": "http://www.betvictor.com/live/en"
   }
}
[16.06.2014 00:24:32,991][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated {
   "context": {
      "frameId": "3860.1",
      "id": 171,
      "isPageContext": true,
      "name": ""
   }
}
[16.06.2014 00:24:33,019][DEBUG]: DEVTOOLS EVENT Page.frameScheduledNavigation {
   "delay": 0,
   "frameId": "3860.1"
}
[16.06.2014 00:24:33,019][DEBUG]: DEVTOOLS EVENT Page.loadEventFired {
   "timestamp": 1402871073.109
}
[16.06.2014 00:24:33,019][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated {

}
[16.06.2014 00:24:33,019][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7373) {

}
[16.06.2014 00:24:33,019][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired {
   "timestamp": 1402871073.109
}
[16.06.2014 00:24:33,025][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading {
   "frameId": "3860.1"
}
[16.06.2014 00:24:33,029][DEBUG]: DEVTOOLS EVENT Page.frameStartedLoading {
   "frameId": "3860.1"
}
[16.06.2014 00:24:33,030][DEBUG]: DEVTOOLS EVENT Page.frameClearedScheduledNavigation
{
   "frameId": "3860.1"
}
[16.06.2014 00:24:33,048][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7373) {
   "root": {
      "baseURL": "http://www.betvictor.com/live/en",
      "childNodeCount": 1,
      "children": [ {
         "attributes": [  ],
         "childNodeCount": 2,
         "children": [ {
            "attributes": [  ],
            "childNodeCount": 5,
            "localName": "head",
            "nodeId": 841,
            "nodeName": "HEAD",
            "nodeType": 1,
            "nodeValue": ""
         }, {
            "attributes": [ "onload", "test()" ],
            "childNodeCount": 1,
            "localName": "body",
            "nodeId": 842,
            "nodeName": "BODY",
            "nodeType": 1,
            "nodeValue": ""
         } ],
         "localName": "html",
         "nodeId": 840,
         "nodeName": "HTML",
         "nodeType": 1,
         "nodeValue": ""
      } ],
      "documentURL": "http://www.betvictor.com/live/en",
      "localName": "",
      "nodeId": 839,
      "nodeName": "#document",
      "nodeType": 9,
      "nodeValue": "",
      "xmlVersion": ""
   }
}
[16.06.2014 00:24:33,112][DEBUG]: DEVTOOLS EVENT Console.messagesCleared {

}
[16.06.2014 00:24:33,112][DEBUG]: DEVTOOLS EVENT Page.frameNavigated {
   "frame": {
      "id": "3860.1",
      "loaderId": "3860.173",
      "mimeType": "text/html",
      "securityOrigin": "http://www.betvictor.com",
      "url": "http://www.betvictor.com/live/en"
   }
}
[16.06.2014 00:24:33,112][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated {
   "context": {
      "frameId": "3860.1",
      "id": 172,
      "isPageContext": true,
      "name": ""
   }
}
[16.06.2014 00:24:33,361][DEBUG]: DEVTOOLS EVENT Console.messageAdded {
   "message": {
      "column": 0,
      "level": "error",
      "line": 0,
      "networkRequestId": "3860.21173",
      "repeatCount": 1,
      "source": "network",
      "text": "Failed to load resource: the server responded with a status of 404 (Not
Found)",
      "timestamp": 1402871073.47,
      "type": "log",
      "url": "http://www.gaming-assets.com/images/original/missing.png"
   }
}
[16.06.2014 00:24:36,142][DEBUG]: DEVTOOLS EVENT DOM.documentUpdated {

}
[16.06.2014 00:24:36,143][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=7374) {

}
[16.06.2014 00:24:36,143][DEBUG]: DEVTOOLS EVENT Page.domContentEventFired {
   "timestamp": 1402871076.245
}
[16.06.2014 00:24:36,230][DEBUG]: DEVTOOLS EVENT Console.messageAdded {
   "message": {
      "column": 0,
      "level": "error",
      "line": 0,
      "networkRequestId": "3860.21189",
      "repeatCount": 1,
      "source": "network",
      "text": "Failed to load resource: the server responded with a status of 404 (Not
Found)",
      "timestamp": 1402871076.309,
      "type": "log",
      "url": "http://www.gaming-assets.com/images/original/missing.png"
   }
}
[16.06.2014 00:24:36,230][DEBUG]: DEVTOOLS EVENT Console.messageAdded {
   "message": {
      "column": 0,
      "level": "error",
      "line": 0,
      "networkRequestId": "3860.21191",
      "repeatCount": 1,
      "source": "network",
      "text": "Failed to load resource: the server responded with a status of 404 (Not
Found)",
      "timestamp": 1402871076.315,
      "type": "log",
      "url": "http://www.gaming-assets.com/attachments/original/missing.png"
   }
}
[16.06.2014 00:24:39,611][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=7374) {
   "root": {
      "baseURL": "http://www.betvictor.com/live/en",
      "childNodeCount": 2,
      "children": [ {
         "internalSubset": "",
         "localName": "",
         "nodeId": 844,
         "nodeName": "html",
         "nodeType": 10,
         "nodeValue": "",
         "publicId": "",
         "systemId": ""
      }, {
         "attributes": [ "lang", "en", "ng-app", "Zaynar", "class", "ng-scope" ],
         "childNodeCount": 2,
         "children": [ {
            "attributes": [  ],
            "childNodeCount": 22,
            "localName": "head",
            "nodeId": 846,
            "nodeName": "HEAD",
            "nodeType": 1,
            "nodeValue": ""
         }, {
            "attributes": [ "class", " ", "data-allow-utf8", "false", "data-lang",
"en-gb", "data-pop-in-upgrade-browser", "false", "data-site", "live", "ontouchmove",
"BlockMove(event)", "style", "" ],
            "childNodeCount": 8,
            "localName": "body",
            "nodeId": 847,
            "nodeName": "BODY",
            "nodeType": 1,
            "nodeValue": ""
         } ],
         "localName": "html",
         "nodeId": 845,
         "nodeName": "HTML",
         "nodeType": 1,
         "nodeValue": ""
      } ],
      "documentURL": "http://www.betvictor.com/live/en#485636200_argentina_v_bosnia_and_herzegovina",
      "localName": "",
      "nodeId": 843,
      "nodeName": "#document",
      "nodeType": 9,
      "nodeValue": "",
      "xmlVersion": ""
   }
}
[16.06.2014 00:24:39,927][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated {
   "childNodeCount": 9,
   "nodeId": 847
}
[16.06.2014 00:24:39,928][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated {
   "childNodeCount": 10,
   "nodeId": 847
}
[16.06.2014 00:24:39,951][DEBUG]: DEVTOOLS EVENT DOM.childNodeCountUpdated {
   "childNodeCount": 11,
   "nodeId": 847
}
[16.06.2014 00:24:40,539][DEBUG]: DEVTOOLS EVENT Page.loadEventFired {
   "timestamp": 1402871080.633
}
[16.06.2014 00:24:40,549][DEBUG]: DEVTOOLS EVENT Page.frameStoppedLoading {
   "frameId": "3860.1"
}
[16.06.2014 00:24:40,549][INFO]: Done waiting for pending navigations
[16.06.2014 00:24:40,549][INFO]: RESPONSE Navigate
[16.06.2014 00:24:40,549][INFO]: COMMAND GetTitle {

}
[16.06.2014 00:24:40,549][INFO]: Waiting for pending navigations...
[16.06.2014 00:24:40,549][INFO]: Done waiting for pending navigations
[16.06.2014 00:24:40,550][DEBUG]: DEVTOOLS COMMAND Runtime.evaluate (id=7375) {
   "expression": "(function() { // Copyright (c) 2012 The Chromium Authors. All rights
reserved.\n// Use of this source code is governed by a BSD-style license that can be\n//
found in the LICENSE file.\n\n/**\n * Enum f...",
   "returnByValue": true
}
[16.06.2014 00:24:40,632][DEBUG]: DEVTOOLS RESPONSE Runtime.evaluate (id=7375) {
   "result": {
      "type": "object",
      "value": {
         "status": 0,
         "value": "Live In-Play Sports Betting - BetVictor"
      }
   },
   "wasThrown": false
}
[16.06.2014 00:24:40,632][INFO]: Waiting for pending navigations...
[16.06.2014 00:24:40,632][INFO]: Done waiting for pending navigations
[16.06.2014 00:24:40,632][INFO]: RESPONSE GetTitle "Live In-Play Sports Betting - BetVictor"

Reported by k.kopecek on 2014-06-17 16:30:05

lukeis commented 8 years ago
Can you try to run your test on virtual machine?

Reported by morg125@mail.ru on 2014-07-25 09:24:12

lukeis commented 8 years ago
I'm running my own tests on a virtual machine using Hyper-V.

The program crashes here all the time:

OpenQA.Selenium.Proxy proxy = new Proxy();
proxy.HttpProxy = "127.0.0.1:8877";

var options = new ChromeOptions();
options.Proxy = proxy;

return new ChromeDriver(options);

and the output is this:
OpenQA.Selenium.WebDriverException occurred
  HResult=-2146233088
  Message=The HTTP request to the remote WebDriver server for URL http://localhost:1506/session
timed out after 60 seconds.
  Source=WebDriver
  StackTrace:
       at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
       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.StartSession(ICapabilities desiredCapabilities)
       at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor,
ICapabilities desiredCapabilities)
       at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions
options, TimeSpan commandTimeout)
       at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)

Reported by maineparnisari on 2014-07-30 19:31:32

lukeis commented 8 years ago
Okay I ran the same tests on another VM and they worked - I'm assuming there's an issue
with the firewall here, specifically there's a popup window that comes up right after
you run the tests for the very very first time, I can't remember what it said now though,
something about vstest...

Reported by maineparnisari on 2014-07-30 21:16:30

lukeis commented 8 years ago
Hi all, 

I'm also getting this error from time to time. I was not able to find out where the
problem is but what I can tell for sure is that once we encounter this we can't run
tests against the nodes unless we restart them. 

We built a library for testing, basically a wrapper over Selenium with some other functionality
the we found useful. We also open sourced the library: https://github.com/AutoScout24/SeleniumTestLibrary

As I said, once the problem appears we must restart the java processes that start the
nodes. What is also interesting is that the problem appears while tests are running.
That is, from 200 tests, let's say, some will pass and some will not. 

As the nodes are useless once the problem appears and after some googleing, I suspect
that in my case there's a lock happening somewhere. The library that we are using is
reading the output file and almost instantly it continues with the next test suite,
so basically new request that can be on the same URI as the last one used. The last
change that we did and we are currently testing, is to continue with the testing only
after we are done reading the output file. We don't know yet whether this fixed our
problem or not. Test is in progress.

Do you have a similar scenario? Can you reuse, retry the request once the problem appears
or not? Maybe this is relevant, maybe not, but at least we know something more. 

Hope this helps! 
Mario. 

Reported by dctinmario on 2014-10-22 11:58:53

lukeis commented 8 years ago
Hi,

I found the following facts in my testing. If I run the test and the browser window
is visible, i.e. from the IDE or using a batch file it works fine. As soon as I run
the task in automated mode through a task then the test will not work. This happens
using either FF or Chrome drivers. You can verify this by trying this page https://www.horizonutilities.com/pages/login.aspx

Using the chrome driver i get the following error. Chrome doesn't even load this page
Exeption: WebDriver The HTTP request to the remote WebDriver server for URL http://localhost:65315/session/337172c9e02776077b2025d9aa16cf80/element
timed out after 60 seconds. ---------------

With the FF driver I get the following error
Exeption: WebDriver [JavaScript Error: "a.document.getElementsByTagName(...)[0].getButton
is not a function" {file: "file:///C:/Users/electrocrawler/AppData/Local/Temp/anonymous.6b519c69a3894ef9af8de966e29bc542.webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js"
line: 8877}]'[JavaScript Error: "a.document.getElementsByTagName(...)[0].getButton
is not a function" {file: "file:///C:/Users/electrocrawler/AppData/Local/Temp/anonymous.6b519c69a3894ef9af8de966e29bc542.webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js"
line: 8877}]' when calling method: [nsICommandProcessor::execute] ---------------

Again, this error will only happen when the test runs hidden, i.e. the browser window
not visible, otherwise it works fine.

I run the hidden tasks using Windows Task Manager with the option to 'run the task
whether the user is logged on or not'. It fails every time with this option. Switching
to 'run only when the user is logged on', works fine every time.

Daniel

Reported by dkaminski on 2014-10-27 13:38:37

lukeis commented 8 years ago
Hi, 

I can confirm Daniel's findings. 
When I start the Selenium clients in a background process I get the error mentioned.
If the processes run in foreground everything is fine. 

I also find out that version 36 from Chrome doesn't have this problem and so I downgraded
to this version. Now the tests run fine but not with the latest version. 

Mario. 

Reported by dctinmario on 2014-10-27 16:27:11

lukeis commented 8 years ago
One more thing: I use the latest binaries available at the moment for Selenium and Chrome
Driver.  

Reported by dctinmario on 2014-10-27 16:28:39

lukeis commented 8 years ago
My workaround is to fire up a chromedriver.exe in session and call it using remotedriver
on http://localhost:9515

This will work even if the user has disconnected from the remote terminal (but the
session is still active).

Reported by andrew.dotchin@solcada.com on 2014-10-28 04:24:57

lukeis commented 8 years ago
Andrew.d, Could you explain in more detail how to use your workaround?

Reported by dkaminski on 2014-11-02 21:25:16

lukeis commented 8 years ago
Closing the issue as it is related to old version of chromedriver.
If the issue is still actual raise an issue on the chromedriver tracker [1] and profice
a reproduction case (if possible)

[1] https://sites.google.com/a/chromium.org/chromedriver/help

Reported by barancev on 2014-11-04 17:58:15

lukeis commented 8 years ago
Actually this is happening with the latest chrome or firefox driver distributed with
Selenium 2.43.

For example this page will not open when running selenium in a background thread.
http://www.blueskysailing.org/comprehensive-weather

also this one

https://www.horizonutilities.com/pages/login.aspx

as explain my my earlier post.

Please keep this issue open and hopefully a resolution can be found

Thanks,
Daniel

Reported by dkaminski on 2014-11-04 19:09:45

lukeis commented 8 years ago
chromedriver is a separate project that has its own tracker (as stated above), please
report the issue there.

Also you should not expect a browser to work in headless environment (with no GUI).

Reported by barancev on 2014-11-04 19:41:20

lukeis commented 8 years ago
This issue affects both chrome driver and firefox driver. Out of 10 or so automated
testing sites that I support, 8 of them work great when running in a background task,
but the 2 sites I mention, will not. I am unable to understand why these site will
only work in an active session while the rest will work well either way.

Thanks,

Reported by dkaminski on 2014-11-04 21:18:56

lukeis commented 8 years ago
Write to the browser's issue tracker and request them to implement ability to work without
GUI :)

Or use headless browsers like PhantomJS. Or use xvfb to provide GUI. Or setup a virtual
lab with real GUI sessions to run browsers in.

Reported by barancev on 2014-11-04 21:27:20

lukeis commented 8 years ago
Thanks for the suggestions. I am not familiar with any of them. I will do some research
and see what I can find, but if you do have some links or resources that could help
I will really appreciated.

Reported by dkaminski on 2014-11-05 01:35:35

lukeis commented 8 years ago
If it can help people here.

I had the same problem with error messages like :
error: The HTTP request to the remote WebDriver server for URL http://localhost:62966/session/47a49deeba88be7092a9c435bd4c903e/window/current/maximize
timed out after 60 seconds

I had them only with chromeDriver (2.12) and on my CI server (Windows 2012R2, CruiseControl.NET
used as a Windows Service).
If I ran the tests locally I had no problem. I had no problem on the CI Server with
a graphic User Session too.

I think this is caused by request being sent too early to the driver, the driver does
not catch them and they are lost for everyone.

I work around this issue by using the ChromeDriverService and RemoteWebDriver. Either
instanciated outside the code or within the code before any test is run works fine.
You'll see examples at the end of 
https://sites.google.com/a/chromium.org/chromedriver/getting-started

Hope this helps.
Benjamin

Reported by benjamin@paradisia.net on 2014-11-07 14:32:53

lukeis commented 8 years ago
To elaborate.

Remote (RDP) on to your server.

Execute ChromeDriver.exe, it will open on port 9515.

Run your tests with Nunit (jenkins / teamcity agent)

The tests will open and run as long as there is a RDP session connected.

Its definitely not a glamorous solution, but it resolves the issue.

Reported by andrew.dotchin@solcada.com on 2014-11-16 22:27:21

lukeis commented 8 years ago
OpenQA.Selenium.WebDriverException : A exception with a null response was thrown sending
an HTTP request to the remote WebDriver server for URL http://localhost:61473/session/dcc1b5efbc9f55b952fce4e60dfb9033/element/0.21111953747458756-582/name.
The status of the exception was ConnectFailure, and the message was: Unable to connect
to remote server
  ----> System.Net.WebException : Unable to connect to remote server
  ----> System.Net.Sockets.SocketException : An operation on a socket could not be
performed because the system lacked sufficient buffer space or because a queue was
full  127.0.0.1:61473

<package id="Selenium.Support" version="2.44.0" targetFramework="net45" />
<package id="Selenium.WebDriver" version="2.44.0" targetFramework="net45" />
<package id="Selenium.WebDriver.ChromeDriver" version="2.13.0.0" targetFramework="net45"
/>

In single test there is no exception.
In series of tests it throws the exception in 5th test (~ 2 minutes from start tests).
All next tests will fail.

Each test have a loop in webDriver.FindElements() with ~500 IWebElement and call ((IJavaScriptExecutor)webDriver).ExecuteScript
for part of them

I hope this information help to reproduce the problem.

Reported by alex.d@appgear.ca on 2015-02-22 20:01:14

lukeis commented 8 years ago
Hi All

I've been getting the same issue. I tried a suggested solution here to run RemoteWebDriver
pointing to an Uri. My client application couldn't connect to the chromedriver.exe
I've started and fails with...

"socket could not be performed because the system lacked sufficient buffer space or
because a queue was full"

This seems to be an issue with TCP/IP port exhaustion or am I barking up the wrong
tree?

Reported by ewertb on 2015-03-15 12:12:04

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:15:11