custom tag in config file results in GridConfigurationException
shankarkc opened this issue · 1 comments
Meta -
OS:
Linux
Selenium Version:
3.14
Browser:
Any
Browser Version:
Expected Behavior -
User should be able to pass custom information in config file
Actual Behavior -
Parsing error occurs when there is cusom information
Steps to reproduce -
as per default json one can pass custom configuration to selenium grid.
Selenium grid extra passes this custom information to selenium grid. Refer the below json. As per the above link its valid
{
"capabilities": [
{
"seleniumProtocol": "WebDriver",
"extension.sikuliCapability": true,
"browserName": "firefox",
"maxInstances": 1,
"version": "61",
"platform": "LINUX"
},
{
"seleniumProtocol": "WebDriver",
"extension.sikuliCapability": true,
"browserName": "chrome",
"maxInstances": 1,
"version": "68",
"platform": "LINUX"
}
],
"loadedFromFile": "node_5555.json",
"proxy": "com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy",
"servlets": [
"io.sterodium.extensions.node.SikuliExtensionServlet",
"io.sterodium.extensions.node.upload.FileUploadServlet",
"io.sterodium.extensions.node.download.FileDownloadServlet"
],
"maxSession": 1,
"port": 5555,
"register": true,
"unregisterIfStillDownAfter": 60000,
"hubPort": 4444,
"hubHost": "selenium-grid-hub.service",
"registerCycle": 5000,
"custom": {
"grid_extras_port": 3000
},
"downPollingLimit": 2
}
Now run the selenium grid 3.14.0
java \
-Dwebdriver.chrome.driver=/tmp/webdriver/chromedriver/chromedriver_2.41_64bit -Dwebdriver.gecko.driver=/tmp/webdriver/geckodriver/geckodriver_0.21.0 \
-cp /opt/selenium_ex/SeleniumGridExtras-jar-with-dependencies.jar:/tmp/webdriver/3.14.0.jar \
org.openqa.grid.selenium.GridLauncherV3 \
-role node -nodeConfig node_5555.json -log log/node_5555.log
I get below call stack
exit code: 1
standard error:
Exception in thread "main" org.openqa.grid.common.exception.GridConfigurationException: Error with the JSON of the config : Expected value to be a string type: NUMBER
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'af620a76c11c', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-31-generic', java.version: '1.8.0_181'
Driver info: driver.version: unknown
at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:422)
at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:390)
at org.openqa.grid.internal.cli.GridNodeCliOptions.toConfiguration(GridNodeCliOptions.java:228)
at org.openqa.grid.internal.cli.GridNodeCliOptions.toConfiguration(GridNodeCliOptions.java:35)
at org.openqa.grid.selenium.GridLauncherV3.launch(GridLauncherV3.java:114)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:81)
Notice the error message here. Its very cryptic. I cant figureout which tag is causing the issue. If it throws proper error....ONLY then its helpful If one gets expected value to be integer then how one can narrowdown to particular tag in config.
If I remove
"custom": {
"grid_extras_port": 3000
}
selenium grid works fine. Please fix the issue so that we can pass custom information to the grid