2

After updating to IEDriverServer 3.9 for 64-bit from here, I'm getting the following exception when trying to run any tests with IE (version: 11.0.9600.17842, Win8.1). Does anyone know how to get around this, or should I just downgrade back to 3.8?

OpenQA.Selenium.WebDriverException : A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:53379/session.

The status of the exception was ReceiveFailure, and the message was: The underlying connection was closed: An unexpected error occurred on a receive. ---->

System.Net.WebException : The underlying connection was closed: An unexpected error occurred on a receive. ----> System.IO.IOException : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ----> System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host TearDown : System.NullReferenceException : Object reference not set to an instance of an object.

The stack trace is as follows:

Result StackTrace: at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo) at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.IE.InternetExplorerDriver..ctor(InternetExplorerDriverService service, InternetExplorerOptions options) at OpenQA.Selenium.IE.InternetExplorerDriver..ctor() --WebException at System.Net.HttpWebRequest.GetResponse() at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo) --IOException at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) --SocketException at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

DebanjanB
  • 118,661
  • 30
  • 168
  • 217
Kolichikov
  • 2,594
  • 24
  • 40

1 Answers1

0

Using IEDriverServer 3.9.0.0 for Windows 64-bit from http://selenium-release.storage.googleapis.com I am able to reproduce the issue with IEDriverServer_x64_3.9.0.

Error Stack Trace :

Started InternetExplorerDriver server (64-bit)
3.9.0.0
Listening on port 28286
Only local connections are allowed
Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:28286
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:28.403Z'
System info: host: 'ATECHM-03', ip: '192.168.1.35', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.8.0_144'
Driver info: driver.version: InternetExplorerDriver
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
    at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:223)
    at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:215)
    at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:152)
    at demo.A_IE_simple.main(A_IE_simple.java:13)
Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:28286
    at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240)
    at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158)
    at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256)
    at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134)
    at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
    at okhttp3.RealCall.execute(RealCall.java:77)
    at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:104)
    at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:54)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
    ... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at okhttp3.internal.platform.Platform.connectSocket(Platform.java:125)
    at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238)
    ... 29 more

Though a quick test with IEDriverServer_Win32_3.9.0 doesn't shows any error. Though IEDriverServer_Win32_3.9.0 and IEDriverServer_x64_3.9.0 are put up but was never explicitly pushed/published to be available on the Download tab of seleniumhq.org page.

The CHANGELOG of IEDriverServer.exe clearly mentions the following disclaimer :

The "major" and "minor" fields are synchronized to releases of the Selenium
project. Changes in the "build" field indicate interim releases made publicly
available via the project downloads page. Changes in "revision" field indicate
private releases checked into the prebuilts directory of the source tree, but
not made generally available on the downloads page.

Additionally, the CHANGELOG of IEDriverServer.exe v3.9.0.1 mentions the following disclaimer :

Finally, there is every chance that, despite all efforts to the contrary,
it's possible that there are new regressions introduced by this change.
Multiple test suites have been run using this change, and none have
failed thus far due to the changes herein. Claims that this change is
causing a specific failure should be accompanied by a full test case, or
issues reported against this change will be summarily closed.

Solution

The simple solution would be either to :

  • Use IEDriverServer_Win32_3.9.0 on both 32bit and 64-bit platforms.
  • Revert back to IEDriverServer_x64_3.8.0
DebanjanB
  • 118,661
  • 30
  • 168
  • 217
  • I have to downvote this answer. It incorrectly implies that a change made _**after**_ the 3.9.0 release referred to in the original post could have caused the issue described by the question. It also makes claims about when a release is “officially published” that are not endorsed or acknowledged as correct by the Selenium project development team. – JimEvans Feb 21 '18 at 10:52
  • @JimEvans Thanks for your attention. But both the verbatim are from the CHANGELOG of IEDriverServer.exe. Can you point me out where exactly I am wrong. Availability of `IEDriverServer.exe v3.9.0.0` is yet to make it to the [Download](https://docs.seleniumhq.org/download/) tab of [seleniumhq.org](https://docs.seleniumhq.org/) page where as the CHANGELOG have moved till [IEDriverServer.exe v3.9.0.3](https://raw.githubusercontent.com/SeleniumHQ/selenium/master/cpp/iedriverserver/CHANGELOG). I will be glad to correct myself. – DebanjanB Feb 21 '18 at 11:00
  • The version posted to the [official drop site](http://selenium-releases.storage.googleapis.com/index.html) is 3.9.0.0. As you correctly notice in the CHANGELOG, versions have the numbering scheme of `major.minor.build.revision`, and versions that differ only in the `revision` field are not published at all. Moreover, the publishing of a release to that site is the sum total of "publishing a release," regardless of what is downloadable via seleniumhq. Your implication is that a change in **3.9.0.1** could affect the release from the drop site, which is **3.9.0.0**. – JimEvans Feb 21 '18 at 11:25
  • @JimEvans Thanks, that was my incorrect assumption so updated my answer. I still have a question for you that when the CHANGELOG text mentions as **via the project downloads page** does that points to [Download](https://docs.seleniumhq.org/download/) tab or the link you shared as [official drop site](http://selenium-releases.storage.googleapis.com/index.html) which as of now returns an error as **`The specified bucket does not exist.`** – DebanjanB Feb 21 '18 at 11:34
  • Your stack trace would seem to indicate that the Java language bindings art attempting to connect on the IPv6 loopback address (`[::1]`), which won't work at all with 3.9.0.0 of the IE driver. Why that would be the case with the 64-bit IE driver and not the 32-bit one is entirely unclear. – JimEvans Feb 21 '18 at 11:36
  • The link I shared was incorrect, and I cannot go back and edit the comment. I inadvertently stuck an additional 's' in the URL when I typed the link. The correct URL is http://selenium-release.storage.googleapis.com/index.html – JimEvans Feb 21 '18 at 11:38
  • @JimEvans Thanks for all the guidance. Irrespective of the _CHANGELOG_ text it seems `IEDriverServer v3.9.0.0 (64-bit)` does crashes. Here is the [link of the issue on selenium issue tracker](https://github.com/SeleniumHQ/selenium/issues/5519) – DebanjanB Feb 21 '18 at 15:01