ERROR 500: Problem accessing /grid/register/ - Unable to register Appium nodes with Selenium hub

Viewed 706

I was upgrading the Appium, Xcode and Mac versions to support automation testing in iOS 12.x and all of a sudden my Selenium hub is failing. I'm able to connect desktop nodes with the hub, but unable to connect the appium nodes to it.

Current System setup :-

Appium version: 1.13.0 
Mac version: 10.13.6 
Xcode version: 10.1 
Selenium JAR Version: 3.141.59

The same setup was working fine for the following configuration :-

Appium version: 1.10.x
Mac version: 10.13.2
Xcode version: 9.4.1
Selenium JAR Version: 3.141.59

Steps to reproduce:-

  1. Starting the Selenium hub with the following command:- java -jar selenium-server-standalone-3.141.59.jar -role hub
  2. http://ip:port/grid/console - Shows the grid console with no devices attached.
  3. http://ip:port/grid/register/ - Throws an internal server error - Problem accessing /grid/register. org.openqa.selenium.json.JsonException: Expected to read a START_MAP but instead have: END.

Attaching the screenshot below :- Error log - 500 server error

  1. http://ip:port/wd/hub - Throws a null pointer exception. Here is a screen capture of that:- /wd/hub - logs

iOS 11.1.1 was working fine in the above setup, whereas the other iOS devices were still not working and were throwing a capabilities mismatch issue even though we can see the node with required capabilities connected to the hub.

Since we weren't even able to register the node, I'm attaching the node.json file and the commands I'm using to start the hub and the node.

Node.json

{
  "capabilities":
      [
       { 
          "browserName": "safari",
          "version":"12.0.1",
          "maxInstances": 1,
          "platform":"iOS",
          "deviceName": "iPhone (12.0.1)",
          "automationName": "XCUITest",
          "udid":"c0817bc50b66c48d7dce7b12890ff4b3faf1adbd"
        }  
      ],
  "configuration":
  {
    "cleanUpCycle":3000,
    "timeout":30000,
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "url":"http://ip:port/wd/hub",
    "host": "ip",
    "port": 4723,
    "maxSession": 1,
    "register": true,
    "registerCycle": 5000,
    "hubPort": 4444,
    "hubHost": "ip"
  }
}
  1. Command used to start the appium node:- appium -p 4723 --nodeconfig node.json

Expected result : Node must be registered to hub and we must be able to trigger tests.

Actual result : Unable to register the node with the hub.

0 Answers
Related