I've created a class to extend the selenium grid following the directions here: https://www.swtestacademy.com/extend-selenium-grid Connecting selenium nodes is not a problem (as long as I extended selenium version 3.12 [3.141.59 won't allow connections]). My issue is that I can't connect an appium node.
I run the server and nodes on the same machine. Server command: java -jar selenium-server-0.0.1-SNAPSHOT-jar-with-dependencies.jar -role hub
Appium Node command: appium -p 4723 --nodeconfig node.json
node.json:
{ "capabilities":
[
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "internet explorer",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "com.swtestacademy.ExtendedProxy",
"maxSession": 1,
"port": -1,
"register": true,
"registerCycle": 5000,
"hub": "http://localhost:4444/grid/register",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
[Appium] Request to register with grid was unsuccessful: 500 - "\n\n\nError 500 Server Error\n\n
HTTP ERROR 500
\nProblem accessing /grid/register. Reason:\n
Server Error
Caused by:
java.lang.NullPointerException\r\n\tat org.openqa.grid.web.servlet.RegistrationServlet.considerV2Json(RegistrationServlet.java:172)\r\n\tat org.openqa.grid.web.servlet.RegistrationServlet.process(RegistrationServlet.java:97)\r\n\tat org.openqa.grid.web.servlet.RegistrationServlet.doPost(RegistrationServlet.java:70)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:665)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:750)\r\n\tat org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)\r\n\tat org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)\r\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)\r\n\tat org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\r\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)\r\n\tat org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\r\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)\r\n\tat org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)\r\n\tat org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)\r\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\r\n\tat org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\r\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.seleniumhq.jetty9.server.Server.handle(Server.java:530)\r\n\tat org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)\r\n\tat org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)\r\n\tat org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\r\n\tat org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)\r\n\tat org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\r\n\tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)\r\n\tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\r\n\tat org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\r\n\tat org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n\n
http://eclipse.org/jetty\">Powered by Jetty:// 9.4.z-SNAPSHOT
\n\n\n\n"