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

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

lukeis commented 8 years ago
+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 commented 8 years ago
Selenium version:2.21
OS:Windows 2008 R2
RemoteWebdriver

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

lukeis commented 8 years ago
Seeing this on Firefox, Chrome, and IE.

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

lukeis commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
Of course it's a workaround, not solution

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

lukeis commented 8 years ago
https://groups.google.com/d/topic/selenium-users/W7bYZIgOREA/discussion

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

lukeis commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
Was there ever a solution for this problem?

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

lukeis commented 8 years ago
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 commented 8 years ago
We are seeing the same issue intermittently on Chrome and Firefox. Unfortunately, it
is not feasible for us to add sleeps between each interaction with the WebDriver given
how widely it is used.

Is there any traction on when this issue will be solved?

Reported by michael.surepost.info on 2012-11-14 21:09:58

lukeis commented 8 years ago
What, exactly, would you like the .NET bindings to do? That's not a question asked to
be flippant, it's a genuine question. Before you answer, though, please see http://jimevansmusic.blogspot.com/2012/11/net-bindings-whaddaymean-no-response.html
for a more in-depth explanation of exactly what's happening when you receive this error.

Reported by james.h.evans.jr on 2012-11-15 14:59:43

lukeis commented 8 years ago
What would be quite helpful in many cases is to add the raised WebException as an InnerException
in the WebDriverException you throw. This will allow clients to investigate the underlying
causes and the perform their own retry logic if appropriate.

Reported by teunduynstee on 2012-11-19 09:29:04

lukeis commented 8 years ago
It could very well be to do with the Implicit Wait option. If you are using it, and
are getting this message, what happens when you remove it?

Reported by arran.huxtable on 2012-12-07 09:51:37

lukeis commented 8 years ago
Any update on this? Any progress with fixing this issue?

Reported by bakaev.dmitriy on 2012-12-10 19:53:22

lukeis commented 8 years ago
I don't know if this will help, but I just starting seeing this issue this week. My
intern started seeing it last week. At first I thought it was just his machine, as
I was not seeing it. Yesterday it started showing on my machine.

I built a testing app around the WebDriver that tests a web based Learning Management
System for our regression testing. As far as having a reproducible scenario, I might
have one. I am seeing this in only one portion of my test (e.g. clicking a link to
access the work submission page of an Activity created by the testing app) and it happens
pretty regularly. It's on a Click() and the click happens, but WebDriver is stuck in
the code on the Click event, as if it's waiting for a something. The testing app won't
get past the third (of five) activities for the first (of four) students without throwing
an exception. This is the only place that I see it and it is in probably the most in
depth tests that I have made for the app. The tests in all my other suites pretty much
pass as I would expect them to. 

I just upgraded from VS2010 to VS2012 hoping that might help. It didn't.

Using Visual C# 2012 Premium, WebDriver 2.21, Firefox 18, Chrome 23.0.1271.97

I would be willing to help in any way that I can 

Reported by mkiewicz65 on 2013-01-08 23:03:37

lukeis commented 8 years ago
Rolling back to FF 12.0 and disabling auto-update seems to have remedies the problem
for now

Reported by mkiewicz65 on 2013-01-09 17:44:41

lukeis commented 8 years ago
mkiewic...,

Firefox 18 seems to be a "bad version" in terms of Selenium-WebDriver support as of
2.28. See stackoverflow.com/questions/14231279/selenium-webdriver-and-firefox-18. Try
Firefox 17.

Reported by dkroot1 on 2013-01-18 15:57:00

lukeis commented 8 years ago
... or update to already released 2.29

Reported by barancev on 2013-01-18 16:50:52

lukeis commented 8 years ago
To those who've run into this issue, please update to 2.30.0 of the .NET bindings when
they are available. I've made a change to the .NET bindings[1] that should allow us
to have more diagnostic information in the exception that is thrown when this happens.
Please note that this change I've added *WILL* *NOT* *FIX* the problem. It is only
intended to provide more details so that we might be able to narrow down root causes
to the issue a little more cleanly.

[1] http://code.google.com/p/selenium/source/detail?r=a26a61aa7bdde6a3a9e5174bdd573981a6e778fe

Reported by james.h.evans.jr on 2013-02-11 23:03:03

lukeis commented 8 years ago
I quit seeing this error all together when I explicitly set the command timeout via
the driver constructor.  Looking at your change, it looks like this is the information
you’re logging now.  

I'll put some tests together using a default constructor on the drivers to see if I
can get this exception to be thrown.

Reported by nathandace on 2013-02-12 01:29:59

lukeis commented 8 years ago
Have the same problem.
WebDriver Version 2.33.0.0 C#
Chrome version 27.0.1453.116 m

Here is stack:
TearDown : OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver
server for URL http://localhost:52773/session/b46dcfb5b55c1bc2f2420406224007f5/screenshot
timed out after 300 seconds.
  ----> System.Net.WebException : The operation has timed out
   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.FindElement(String mechanism, String value)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath)
   at OpenQA.Selenium.By.<>c__DisplayClasse.<XPath>b__c(ISearchContext context)
   at OpenQA.Selenium.By.FindElement(ISearchContext context)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)

In my case exception occurs when driver made all actions on page 1 and then starts
to wait for elements of page 2, but application is still sending some data to server
on page 1.

Explicit set of timeout in driver constructor didn't help.

Reported by artyom.tkachuk on 2013-07-04 12:16:29

lukeis commented 8 years ago
I am getting this error as well in the firefox driver. It seems to be caused by one
of my sites waiting on a resource and never receiving it. So while it waits for that
page to give it it's resource, the other selenium calls after that fail with this error.
Eventually it gives up on that resource and all the calls that failed run in rapid
succession in firefox even though they already reported as failing. I have a small
test application that seems to reproduce the error if you are interested. I am on the
latest version of selenium.

Reported by robert.brown@fuelinteractive.com on 2013-09-25 19:56:21

lukeis commented 8 years ago
Is this issue still actual? Can anybody provide additional log information as mentioned
in comment #33?

Reported by barancev on 2013-11-02 13:51:47

lukeis commented 8 years ago
I'm seeing this as well in our tests and it's driving me mad. Anyone found a solution
yet?

Reported by yossimi@etoro.com on 2013-11-13 10:33:50

lukeis commented 8 years ago
Anyone found a solution or workaround to this?

Reported by kirtiraj.darak on 2013-12-26 10:05:53

lukeis commented 8 years ago
Encountering the same issue
WebDriver Version 2.39.0.0 C#
Firefox version 26.0
Here is stack:
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:7055/hub/session/51109d80-ac9c-4b61-bdbe-74aa28c32fc7/url
timed out after 60 seconds. ---> System.Net.WebException: The request was aborted:
The operation has timed out.

Result StackTrace:                                                                

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.Firefox.Internal.ExtensionConnection.Execute(Command commandToExecute)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute,
Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.get_Url()

Reported by priyank.nitk on 2014-01-14 14:01:34

lukeis commented 8 years ago
priyank: I had exactly the same problem and call stack as you with .NET WebDriver: 2.37,
FF: 25.0.1. I found a workaround that worked for me, see here:
http://stackoverflow.com/a/20181669/746754

Since I was able to get things going I haven't wanted to change my setup, but I will
try updating to the latest webdriver (2.39.0) and firefox 26.0 sometime this week and
report back. 

Reported by acarlonvsn on 2014-01-14 20:57:46

lukeis commented 8 years ago
Okay, this issue in general does not manifest itself in IE, or so it seems from the
comments. I'd like people to try with Firefox and Chrome, and the .NET bindings 2.40.0
(will be the next release at the time of this writing) or later, and see if this is
still happening.

I've seen fewer reports of this happening in Chrome since 2.35.0, so I need to know
if this is still an issue with the .NET bindings and a recent chromedriver.exe.

2.40.0 may have a fix for at least one of the issues that may cause this in Firefox.

If all you have to contribute to this issue is a "me too" or "when will this be fixed"
comment, at the very least, please provide the version of the .NET bindings and which
version of which browser you're encountering the issue in. It would be more helpful
in these cases to also have the exact text of the exception, since the change mentioned
in comment #33 gives more detail about what is actually happening.

Reported by james.h.evans.jr on 2014-01-30 15:38:15

lukeis commented 8 years ago
Look forward to trying it out. Any estimate on when 2.40.0 will be available on git?

Reported by acarlonvsn on 2014-02-02 01:16:26

lukeis commented 8 years ago
Or NuGet?

Reported by acarlonvsn on 2014-02-04 20:25:27

lukeis commented 8 years ago
Experiencing this issue in a 100% reproducible fashion with 2.38.0 and 2.39.0 against
FF 27.0

OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server
for URL http://localhost:7055/hub/session/1a5eb28a-c9b2-4b18-a0ce-79291d66f1b1/element/%7B7ba38b04-f9f2-4c5c-8c40-93b5238d0306%7D/click
timed out after 60 seconds. ---> System.Net.WebException: The operation has timed out

One of the failing tests basically looked like this (locking up when clicking the breadcrumb
on the 4th line):
  VerifyBreadcrumbNavigation(detailPage, BreadcrumbType.Category4, "Cats");
  VerifyBreadcrumbNavigation(null, BreadcrumbType.Category3, "Quadrupeds");
  VerifyBreadcrumbNavigation(null, BreadcrumbType.Category2, "Mammals");
  VerifyBreadcrumbNavigation(null, BreadcrumbType.Category1, "Pets");
  VerifyBreadcrumbNavigation(null, BreadcrumbType.Supplier, "Addimplower Holdings");

I tried reordering the breadcrumb navigations and no matter what I did it would always
fail on the 4th attempt no matter which breadcrumb it was doing at the time. I also
added longish sleeps (2000ms) all over the place thinking that maybe the driver couldn’t
handle so many navigation attempts. This also did nothing to mitigate the problem.

Reported by mmcnally@directs.com on 2014-02-11 20:39:41

lukeis commented 8 years ago
Just reporting back that I tried Selenium WebDriver bindings 2.40.0 and this solved
the problem for me - thank you. Looking at the change log, there is a commit from 1/31/2014
to remove console logging redirection: 

    "No longer redirecting console output for Firefox in .NET bindings."

Which is the workaround I used in http://stackoverflow.com/a/20181669/746754. So, it
all makes sense.
Anyways, this no longer happens for me, hopefully it will solve it for others too.

Reported by acarlonvsn on 2014-02-24 22:45:49

lukeis commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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