groupon / Selenium-Grid-Extras

Simplify the management of the Selenium Grid Nodes and stabilize said nodes by cleaning up the test environment after the build has been completed
BSD 3-Clause "New" or "Revised" License
537 stars 210 forks source link

Geockdriver won't launch with Selenium Grid Extras using any Webdriver version higher than 3.0.1 #387

Open osmolyar opened 6 years ago

osmolyar commented 6 years ago

Geckodriver won't launch with any version higher than 3.0.1 (3.6.0, 3.7.1, 3.8.1), giving this error, "Error with the JSON of the config". It starts up fine with Webdriver 3.0.1, and the error is the same regardless of the geckodriver version used, and also regardless of the FF version:

C:__NODE__>java -Dwebdriver.gecko.driver=\tmp\webdriver\geckodriver\geckodriver0.19.1.exe -cp C:__NODE__\SeleniumGridExtras-1.12 .10-SNAPSHOT-jar-with-dependencies.jar;\tmp\webdriver\3.8.1.jar org.openqa.grid.selenium.GridLauncherV3 -role node -nodeConfig node 5555.json -log log\node_5555.log Exception in thread "main" org.openqa.grid.common.exception.GridConfigurationException: Error with the JSON of the config : com.goog le.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:469) at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:446) at org.openqa.grid.selenium.GridLauncherV3$3.setConfiguration(GridLauncherV3.java:278) at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:138) at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:70) Caused by: java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; at org.openqa.selenium.json.Json.(Json.java:47) at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration$CollectionOfDesiredCapabilitiesDeSerializer.deserializ e(GridNodeConfiguration.java:513) at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration$CollectionOfDesiredCapabilitiesDeSerializer.deserializ e(GridNodeConfiguration.java:503) at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:803) at com.google.gson.Gson.fromJson(Gson.java:868) at com.google.gson.Gson.fromJson(Gson.java:841) at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:457) ... 4 more

This is the node_5555.json -nodeConfig file:

{
  "capabilities":
   [
     {
       "browserName": "firefox",
       "marionette": true,
       "maxInstances": 2,
       "seleniumProtocol": "WebDriver"
     },
 ],
   "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
   "maxSession": 5,
   "port": 5555,
   "register": true,
   "registerCycle": 5000,
   "hub": "http://172.17.110.191:4444/grid/register",
   "nodeStatusCheckTimeout": 5000,
   "nodePolling": 5000,
   "role": "node",
   "unregisterIfStillDownAfter": 60000,
   "downPollingLimit": 2,
   "debug": false,
   "servlets" : [],
   "withoutServlets": [],
   "custom": {}
 }
smccarthy commented 6 years ago

@osmolyar Please use selenium grid extras 2.0.2 with selenium 3.9.1 and let me know if it works. Thank you.

osmolyar commented 6 years ago

@smccarthy , thank you for the reply; somehow I had missed it, though have tried with other versions in the interim, none working, including selenium grid extras 2.0.4 and selenium 3.11.0, Geckodriver 0.20.1 64 bit, Firefox v60.0 (64-bit) which should be working per https://github.com/groupon/Selenium-Grid-Extras/issues/386.

It opens the browser with an alternating orange bar but doesn't enter the url, saying ERROR: [Object object] in the output.

osmolyar commented 6 years ago

@smccarthy , tried with selenium grid extras 2.0.2 and selenium 3.9.1 as well (Firefox 60.0 64-bit, Geckodriver 0.20.1 64-bit) - still not working.

The only error in the Jenkins log is ERROR: [Object object]. Do you have any suggestions for troubleshooting further, or what/where to update so the Error object can be viewed via JSON.stringify? Thank you.

leonkatz commented 6 years ago

I'm not sure if my issue is the same but I always get "Unable to find a matching set of capabilities" I've tried playing around with all the capabilies I can see geckoDriver in the logs, regular selenium grid works fine so not sure what to try.

osmolyar commented 6 years ago

As an update it does work locally with Selenium standalone- just not via Jenkins/grid.

osmolyar commented 5 years ago

@smccarthy , thanks again for your tips; any other suggestions? It seems the same issue is unresolved here #382 and here http://selenium.10932.n7.nabble.com/Selenium-grid-extras-fails-to-start-NullPointerException-at-com-groupon-seleniumgridextras-confi-td59318.html.

In all cases it works fine with Selenium Standalone server, just not with Grid Extras.

isc-aray commented 5 years ago

Through modifying the base-reporter, I was able to determine that the actual error is {"type": "unknown", "message": "unknown"}. It's not much to go on, but maybe it will help?

smccarthy commented 5 years ago

I am sorry but I haven't been able to maintain Selenium-Grid-Extras for very long now. I think there are many things that need to be updated/fixed in grid extras.

osmolyar commented 5 years ago

Thank you for the info. Do you happen to know if there are plans (for anyone) to maintain it in the future?