Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

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

Closed
lukeis opened this issue Mar 3, 2016 · 74 comments
Closed

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

lukeis opened this issue Mar 3, 2016 · 74 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2012-05-04 17:48:17

  • Labels added: Component-WebDriver, Browser-Chrome

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

+1.
RemoteWebdriver with Jenkins
OS:Windows 2008 R2


    SetUp : OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:4444/wd/hub/session
     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.HttpCommandExecutor.Execute(Command commandToExecute)
in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\HttpCommandExecutor.cs:line
96
     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute,
Dictionary`2 parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line
795

Reported by ramesh.mj on 2012-05-14 13:08:25

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Selenium version:2.21
OS:Windows 2008 R2
RemoteWebdriver

Reported by ramesh.mj on 2012-05-14 13:16:43

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Seeing this on Firefox, Chrome, and IE.

Reported by ggerard@qti.qualcomm.com on 2012-05-24 16:44:39

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I see it in Firefox (11) and Chrome with the latest Selenium and ChromeDriver

Reported by dkroot2 on 2012-05-29 14:56:06

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I'm still seeing this with latest chromedriver, grid, and selenium.  

Running tests on the local computer through chromedriver works great, but I run tests
through a grid(on the local machine) the failure rate goes way up - lots of these No
Response exceptions.

Reported by david.algar@mindbodyonline.com on 2012-08-01 16:32:10

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I see this error with windows 2003 R2, firefox 13, using webdriver.
it just started occuring recently, for me.

Also with the most recent chromedriver this happens frequently as well
on windows XP sp3 with chrome 20, 21, or 22. i resorted to disabling the updates for
chrome to keep the chrome 20 driver able to work.

I've read elsewhere that it may be a request limit (for proxy servers having too low
of a conection limit), that causes the server to return null and crash with the "No
response from server for url" exception. 

The "No response from server for url" exception seems to occur whenever a request by
the server returns null or an empty response at which point the server crashes.

It Might be a load related issue, as in when the load of requests is too much for the
drivers to carry, then they throw the  "No response from server for url" exception





Reported by williamalexandergreer on 2012-08-06 20:11:10

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

All my tests broke today with the following error

OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:7057/hub/session/283a5d58-82dd-483b-a3ef-0ff3ee37841c/element

Am on WebDriver C# bindings 2.25.1 Win 7,FF 14/13

They all worked fine until early today nothing has been changed.
However if i rerun them again they work alright a few times.

Are we going to get a fix for this in future releases ?

cheers,
s



Reported by shabazia09 on 2012-08-08 14:39:12

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Same problem.
Win2008R2
WebDriver 2.25.1 .net c#
chromedriver win_22_0_1203_0b
Chrome 21.0.1180.75

On W7 x64 same testset works fine.

Reported by MixeR007 on 2012-08-10 15:45:47

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hi, I'm solved it
if there are no timeout (based on machine speed - usually thread.sleep(250) works fine)
between interactions with driver - driver couldn't throw event from browser to test
- and you gets error.

And watch at some "Explicit Implicit Wait Webdriver" articles.

Reported by MixeR007 on 2012-08-10 16:21:53

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I started seeing this issue primarily with Chrome 21.  The Thread.Sleep method is not
a good long term solution for this though.

Reported by nathandace on 2012-08-10 17:49:22

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Of course it's a workaround, not solution

Reported by MixeR007 on 2012-08-13 06:43:45

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

https://groups.google.com/d/topic/selenium-users/W7bYZIgOREA/discussion

Reported by MixeR007 on 2012-08-13 08:12:39

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Am not sure if it's triaged or some developer has even looked at this issue.

Having most of our testcase failures has resulted in an annoyance for
effort spent on understanding what is happening !!

Reported by shabazia09 on 2012-08-13 10:05:31

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

We also get consistently get this error using the latest Chrome/Chromedriver, and are
desperatefor a fix.  Will investigate how to rollback to a previous version of Chrome
without it auto-updating itself and see if we can regain functionality.

Reported by m.clist@canary.co.nz on 2012-08-13 13:23:26

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

It not only happens in chrome but in FF13 & 14 too.

Is there going to be any patch for that /rollback ?

Reported by shabazia09 on 2012-08-13 13:28:06

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hi Guys,

I'm seeing the same thing in FF14 Windows Server R2 2008.... What is the best workaround
for this, I saw many post that adding some thread.sleep will solve the issue, but not
sure if that is best solution......


Reported by moises.siles on 2012-08-15 15:11:45

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

We're getting it too with our tests.  I'm running Win7 x64, FF14, Chrome21.  We're using
the Fire Fox driver for our tests against SQL Server Reporting Services reports and
the errors are consistent with certain reports but not with others. 

Reported by jimbob91577 on 2012-08-15 16:40:45

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I downgraded our FF version back to v12 and the error seems to have gone away.  We're
trying it with FF version 13 this afternoon.

Reported by jimbob91577 on 2012-08-15 17:51:36

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Same problem on Windows 7 x64, Chrome 21.0.1180.79, WebDriver 2.24.0, ChromeDriver 22.0.1203.0b

If I downgrade ChromeDriver to 20.0.1133.0 WebDriver asks for more recent ChromeDriver.

Reported by roxtonlink on 2012-08-16 11:49:41

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Woww that's new .. i guess where WebDriver identifies which version of
chrome

Probably the chromium team

Reported by shabazia09 on 2012-08-16 12:37:15

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Was there ever a solution for this problem?

Reported by Nick.Haskins on 2012-10-03 18:01:17

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I see it intermittently.  Always in a suite of tests that have been running for a few
minutes.  I get the exception:  

OpenQA.Selenium.WebDriverException : No response from server for url http://localhost:7055/hub/session/e298f5fd-257d-4ec9-85c8-e8091aa0196f/element

FF16 Win7

The FF browser gives a completely white page and will not close when clicking the X
gives "ff not responding .. close or wait.."

Reported by peper@crlf.com on 2012-10-26 14:10:39

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I have to same problem 100 times every day at the random places of code.

For example show last errors:
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:55481/session/5b75e908adaab7d93efc61913134a984/execute timed
out after 60 seconds.
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:49983/session/3ad78e31ea973533d525fa992fed4f24/window timed
out after 60 seconds.
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:49983/session/3ad78e31ea973533d525fa992fed4f24/source timed
out after 60 seconds.
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:49983/session/3ad78e31ea973533d525fa992fed4f24/screenshot
timed out after 60 seconds.
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:56510/session/8d929d84880b12f4254e32b9caf76e41/elements timed
out after 60 seconds.

Using .net 3.5 and 4.0. Compile as x64 or x86. No better difference :(

WebDriver v2.40 and much versions previous
ChromeDriver.exe v2.9 and all previous
Chrome v33 and much versions previous

Every new release does not fix it :(



Reported by k.kopecek on 2014-03-18 18:55:34

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

The issue is reproducing both for Selenium 2.40 java and c# , just tested with java-maven
for my app and the same error is throwed on Firrefox and Chrome, for IE it works with
no problem. The element which is causing me this problem is a button that when you
click then a new Window is opened... Any ideea why is this happening? is Selenium Webdriver
bug " The HTTP request to the remote WebDriver server for URL "?

Reported by ionelstudio on 2014-03-20 10:03:54

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hello.
I have same issue with WebDriver 2.40 and FF

OpenQA.Selenium.WebDriverException: A exception with a null response was thrown sending
an HTTP request to the remote WebDriver server for URL http://localhost:7056/hub/session/bbc66dba-a306-47af-8e46-75807458de6e/element/%7B2bd11729-6b4e-4613-ab07-d806b3f474f6%7D/attribute/value.
The status of the exception was ConnectFailure, and the message was: Unable to connect
to the remote server ---> System.Net.WebException: Unable to connect to the remote
server ---> System.Net.Sockets.SocketException: Only one usage of each socket address
(protocol/network address/port) is normally permitted 127.0.0.1:7056
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress
socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket
s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult
asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
   --- End of inner exception stack trace ---


Reported by e.leuna2012 on 2014-03-20 12:13:22

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

But in most cases that his happens on some url, if the server returned 404 isn't the
entire page shouldn't load?

Is the resource u got 404 error on, is the exact url you were looking for or did you
tried to navigate to a full url page and only that pic failed to return?

Reported by yossimi@etoro.com on 2014-03-26 10:08:39

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

#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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

Can you try to run your test on virtual machine?

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

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

Andrew.d, Could you explain in more detail how to use your workaround?

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

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

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

  • Status changed: Invalid

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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
Copy link
Member Author

lukeis commented Mar 3, 2016

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

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant