2
votes

We are getting an error when starting a session of the remote web driver for Microsoft Edge on a Windows 10 VM. We have a selenium grid configured with multiple nodes that have various OS/browser combinations. All nodes with the exception of our new Windows 10 node are working as expected. We have configured a Windows 10 VM with the Microsoft Edge browser version=21.10586.0.0 and added the MicrosoftWebDriver on the VM. The path to the web driver on the VM is set with the system property -

-Dwebdriver.edge.driver="C:\Selenium\MicrosoftWebDriver.exe"

In my selenium test I instantiate the selenium web driver that is configured to the MicrosoftWebDriver on the Windows 10 VM. During the initialization I set the capabilities for the remote driver and I have log output that is set:

08:57:32.932 INFO - Executing: [new session: Capabilities [{platform=WINDOWS, javascriptEnabled=true, browserName=MicrosoftEdge, applicationName=Win10_EDGE, version=21.10586.0.0}]])
08:57:32.948 INFO - Creating a new session for Capabilities [{platform=WINDOWS, javascriptEnabled=true, browserName=MicrosoftEdge, applicationName=Win10_EDGE, version=21.10586.0.0}]

The remote connection is established, the Edge browser is opened on the VM and is operational. At that point the code hangs creating the remote driver in the selenium code - selenium-remote-driver-2.53.0.jar

Eventually it times out with the error:

java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'xxxx', ip: 'xxx.xx.xxx.xxx', os.name: 'Windows 8', os.arch: 'x86', os.version: '6.2', java.version: '1.7.0_51'
Driver info: driver.version: unknown
        at java.util.concurrent.FutureTask.report(Unknown Source)
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
        at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
        at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
        at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124)
        at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
        at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
        at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
        at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79)
        at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:204)
        at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:166)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:132)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
        at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
        at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
        at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
        at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
        at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
        at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
        at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
        at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'xxxx', ip: 'xxx.xx.xxx.xxx', os.name: 'Windows 8', os.arch: 'x86', os.version: '6.2', java.version: '1.7.0_51'
Driver info: driver.version: unknown
        at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113)
        at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
        at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
        at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
        at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
        ... 9 more
Caused by: org.openqa.selenium.TimeoutException: Timeout (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 917.04 seconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'xxxx', ip: 'xxx.xx.xxx.xxx', os.name: 'Windows 8', os.arch: 'x86', os.version: '6.2', java.version: '1.7.0_51'
Driver info: org.openqa.selenium.edge.EdgeDriver
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
        at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:152)
        at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:120)
        ... 14 more
13:28:49.532 WARN - Exception: Timeout (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 917.04 seconds

I am using: selenium-server-standalone-2.53.0.jar, Microsoft WebDriver Fall 2015 Update from the Microsoft site

I noticed that the System info above lists Windows 8 - even though Windows 10 is installed.

Has anyone else seen this issue or have an idea what is wrong?

1
Have you tried to run a script locally on the VM? Have you also tried with the edge driver v14271 ? It looks like the browser is not responding to the driver. I would also check that the connection is not blocked by the firewall. - Florent B.
Thanks, I will try both. - acleve
I tried running a script locally on the VM and it worked! Thanks for the advice. Does this mean that it's an issue with the Selenium RemoteWebDriver if it's not a firewall issue? - acleve

1 Answers

0
votes

During my successful yet painful struggle to set up Edge as a part of a Selenium grid I was getting very similar Exceptions. There are at least 2 possible problems here:

  1. Is selenium-standalone-server started in the background (for example using Task-Scheduler) or foreground? (for example manually or as a startup program) Edge driver must be running in the foreground, so that its window can be actually displayed on the desktop. Therefore the node cannot be started as a Windows Service nor from Windows Task Scheduler at startup. The best way to automate starting of the node is to configure auto-login and add a batch script starting the node to user's Startup Programs as described in my article.

  2. Are there other browsers enabled in the same node as Edge? This is known to cause problems. It is recommended to start 2 separate nodes on the same machine (on different ports of course) : one only for Edge and second for IE, FF and Chrome. See this answer for more info.