Issues in Configuring Appium Node Servers with Selenium Grid

Hi All

I am facing issues in Configuring Appium Node servers with selenium Grid. I am unable to register my mobile devices with Selenium Grid. Encountering issues while reading JSON files to register with Selenium Grid.

It would be great help, if you can review the below code and let me know solution to move forward on this.

Following are the two devices attached to my system.
Emulator (using SDK tool) and a real device (S3)

C:\sdk-tools\platform-tools>adb devices
List of devices attached
emulator-5554 device
192.168.0.6:2323 device

  1. Hosting selenium grip on port 4444. Successfully grid is hosted
    java -jar selenium-server-standalone-2.46.0.jar -port 4444 -role hub

  2. Setting up Appium node instance for one device ‘Emulator-5554’ to register with Selenium Grid (appiumnodeemulator_S3.json)
    using similar contents as shown below in the JSON file

{

“capabilities”:
[

{
“deviceName”: “emulator-5554”,
“version”:“5.0.2”,
“maxInstances”: 3,
“platformName”:“ANDROID”
}
],

“configuration”:
{
“nodeTimeout”:120,
“port”:4725,
“hubPort”:4444,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”:“http://127.0.0.1:4725/wd/hub”,
“hubHost”:“127.0.0.1”,
“host”:“127.0.0.1”,
“nodePolling”:2000,
“registerCycle”:10000,
“register”:true,
“cleanUpCycle”:5000,
“timeout”:30000,
“maxSession”:5
}

}

  1. Open Command prompt and navigate to the location where Appium was installed. Run the following command to host the Appium node instance for first device
    node.exe node_modules\appium\bin\appium.js --nodeconfig appiumnodeemulator_S3.json -p 4725 -U emulator-5554

Getting error message as below while running above command to register first device on Selenium Grid

image

  1. In the same way create the Appium node JSON configuration file for the real device (S3) as shown below and host another instance of the Appium node server

{
“capabilities”:
[

{
“deviceName”: “192.168.0.6:2323”,
“version”:“6.0.1”,
“maxInstances”: 3,
“platformName”:“Android”,
“PLATFORM”:“ANDROID”
}],

“configuration”:
{
“nodeTimeout”:120,
“port”:4723,
“hubPort”:4444,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”:“http://127.0.0.1:4723/wd/hub”,
“hubHost”:“127.0.0.1”,
“host”:“127.0.0.1”,
“nodePolling”:2000,
“registerCycle”:10000,
“register”:true,
“cleanUpCycle”:5000,
“timeout”:30000,
“maxSession”:5
}
}

  1. Open Command prompt and navigate to the location where Appium was installed. Run the following command to host the Appium node instance for 2nd device
    node.exe node_modules\appium\bin\appium.js --nodeconfig appiumnode_S6.json -p 4723 -U 192.168.0.6:2323

Getting error message as below while running above command to register 2nd device on Selenium Grid
image