selenium-server-standalone - Browser launches but then a timeout error is displayed

925 views Asked by At

I am trying to launch Microsoft Edge on WIN10 using selenium-server-standalone-3.0.1. While creating the driver instance, the browser opens just fine on the node, but then the process hangs for about a minute or so the following error is generated, causing the driver object to come back as NULL. Here is the error message:

org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Read timed out Command duration or timeout: 134.17 seconds Build info: version: '3.4.0', revision: 'unknown' ...

Keep in mind - this works just fine with Chrome.

Also note that:

  • I can ping my HUB machine URL from the Edge browser on the Node
  • I have tried this with following versions all with the same result: 3.0.1,3.3.1, 3.5.0, 3.5.3

Here is my hubConfig:

{
  "host": {hidden for security},
  "port": 4444,
  "newSessionWaitTimeout": -1,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {},
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "cleanUpCycle": 5000,
  "role": "hub",
  "debug": true,
  "browserTimeout": 60,
  "timeout": 1800
}

And here is my nodeConfig

{
  "capabilities":
  [
    {
      "browserName": "MicrosoftEdge",
      "maxInstances": 5,
      "platform": "WIN10"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 5,
  "port": 5555,
  "register": true,
  "registerCycle": 500000,
  "hub": "http://{hidden for security}:4444/grid/register",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 500000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": true,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {},
  "browserTimeout": 60,
  "timeout": 1800
}

My Command to start the HUB

java -jar selenium-server-standalone-3.0.1.jar -role hub -hubConfig hubConfig.json

And to start the node:

java "-Dwebdriver.edge.driver=C:\Selenium\EdgeDriver\MicrosoftWebDriver.exe" -jar selenium-server-standalone-3.0.1.jar -role node -nodeConfig nodeConfig.json

When I do this, I can see that the node is registered ok on the hub (it would have to be or I would not be able to launch the browser!)

Here is my java code to create the driver object

    DesiredCapabilities capability = DesiredCapabilities.edge(); capability.setBrowserName("MicrosoftEdge");
    capability.setCapability(CapabilityType.PLATFORM, Platform.WIN10);
    driver = new RemoteWebDriver(new URL("http://{hidden for security}:4444/wd/hub"),capability);

Here is the log output for the node

INFO - The node is registered to the hub and ready to use

INFO - SessionCleaner initialized with insideBrowserTimeout 60000 and clientGoneTimeout 1800000 polling every DEBUG - Handling: POST /session

INFO - Executing: [new session: Capabilities [{browserName=MicrosoftEdge, version=13, platform=WIN10}]])

INFO - Creating a new session for Capabilities [{browserName=MicrosoftEdge, version=13, platform=WIN10}]

DEBUG - Executing: newSession [null, newSession {desiredCapabilities=Capabilities [{browserName=MicrosoftEdge,

version=13, platform=WIN10}]}]

DEBUG - Waiting for [http:/localhost:31485/status]

DEBUG - Polling http:/localhost:31485/status

DEBUG - Polling http:/localhost:31485/status

DEBUG - Polling http:/localhost:31485/status

DEBUG - sun.net.www.MessageHeader@4fee0bb35 pairs: {GET /status HTTP/1.1: null}{User-Agent: Java/1.8.0_102}{Host: ocalhost:31485}{Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2}{Connection: keep-alive}

DEBUG - sun.net.www.MessageHeader@4129fc3e6 pairs: {null: HTTP/1.1 200 OK}{Content-Type: application/json;charset=UTF-8}{Server: Microsoft-HTTPAPI/2.0}{Access-Control-Allow-Origin: *}{Date: Fri, 01 Sep 2017 22:55:00 GMT}{Content-Length: 121}

INFO - Attempting bi-dialect session, assuming Postel's Law holds true on the remote end

DEBUG - CookieSpec selected: default

DEBUG - Auth cache not set in the context

DEBUG - Connection request: [route: {}->http:/localhost:31485][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000] 15:55:00.151 DEBUG - Connection leased: [id: 1][route: {}->http://localhost:31485][total kept alive: 0; route allocated: 1 of 2000; total allocated: 1 of 2000]

DEBUG - Opening connection {}->http:/localhost:31485

DEBUG - Connecting to localhost/127.0.0.1:31485

DEBUG - Connection established 127.0.0.1:50687<->127.0.0.1:31485

DEBUG - http-outgoing-1: set socket timeout to 10800000

DEBUG - Executing request POST /session HTTP/1.1 DEBUG - Target auth state: UNCHALLENGED DEBUG - Proxy auth state: UNCHALLENGED

DEBUG - http-outgoing-1 >> POST /session HTTP/1.1 DEBUG - http-outgoing-1 >> Content-Type: application/json; charset=utf-8
DEBUG - http-outgoing-1 >> Content-Length: 247

DEBUG - http-outgoing-1 >> Host: localhost:31485

DEBUG - http-outgoing-1 >> Connection: Keep-Alive

DEBUG - http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)

DEBUG - http-outgoing-1 >> Accept-Encoding: gzip,deflate DEBUG - http-outgoing-1 >> "POST /session HTTP/1.1[\r][\n]"

DEBUG - http-outgoing-1 >> "Content-Type: application/json; charset=utf-8[\r][\n]"

DEBUG - http-outgoing-1 >> "Content-Length: 247[\r][\n]"

DEBUG - http-outgoing-1 >> "Host: localhost:31485[\r][\n]"

DEBUG - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]"

DEBUG - http-outgoing-1 >> "User-Agent: Apache- HttpClient/4.5.2 (Java/1.8.0_102)[\r][\n]"

DEBUG - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]"

DEBUG - http-outgoing-1 >> "[\r][\n]"

DEBUG - http-outgoing-1 >> "{"capabilities":{"desiredCapabilities":{"browserName":"MicrosoftEdge","version":13,"platform":"WIN10"},"requiredCapabilities": {}},"desiredCapabilities": {"browserName":"MicrosoftEdge","version":13,"platform":"WIN10"},"requiredCapabilities": {}}"

0

There are 0 answers