Unable to register Appium to selenium grid

Hi,
I am trying to register Appium to local Selenium grid. Below are my steps:

  1. I am able to access grid console at

http://localhost:4444/grid/console

  1. I created below configuration json file:-

    {

	"capabilities": [{
		"browserName": "Android",
		"version": "4.4.2",
		"maxInstances": 1,
		"platform": "Android",
		"deviceName": "4d0002174dca3161",
	}],
	"configurations":
	{
		"cleanUpCycle": 2000,
		"timeout": 30000,
		"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
		"host": "127.0.0.1",
		"port": 4723,
		"url": "http://127.0.0.1:4723/wd/hub",
		"maxSession": 1,
		"register": true,
		"registerCycle": 5000,
		"hubPort": 4444,
		"hubHost": "127.0.0.1",
		"hub": "http://127.0.0.1:4444/grid/register"
	}
}

The deviceName is from:

“adb devices” command

  1. When I started Appium with command

appium --nodeconfig C:\mobile\androidConfig.json

I am getting an exception

info: Welcome to Appium v1.3.4 (REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {“nodeconfig”:“C:\mobile\androidConfig.
json”}
info: Console LogLevel: debug
error: uncaughtException: Cannot read property ‘url’ of undefined date=Tue Feb 1
0 2015 15:08:52 GMT+0200 (South Africa Standard Time), pid=8644, uid=null, gid=n
ull, cwd=C:\Users\administrator\AppData\Roaming\npm\node_modules\appium, execPath=C:\Pr
ogram Files\nodejs\node.exe, version=v0.10.30, argv=[node, C:\Users\administrator\AppDa
ta\Roaming\npm\node_modules\appium\bin\appium.js, -p, 4723, --nodeconfig, C:\mob
ile\androidConfig.json], rss=45649920, heapTotal=35002496, heapUsed=23290972, lo
adavg=[0, 0, 0], uptime=11049.0117945, trace=[column=32, file=C:\Users\administrator\Ap
pData\Roaming\npm\node_modules\appium\lib\server\grid-register.js, function=post
Request, line=46, method=null, native=false, column=7, file=C:\Users\administrator\AppD
ata\Roaming\npm\node_modules\appium\lib\server\grid-register.js, function=null,
line=14, method=null, native=false, column=14, file=fs.js, function=null, line=2
71, method=null, native=false, column=15, file=fs.js, function=Object.oncomplete
, line=107, method=oncomplete, native=false], stack=[TypeError: Cannot read prop
erty ‘url’ of undefined, at postRequest (C:\Users\administrator\AppData\Roaming\npm
\node_modules\appium\lib\server\grid-register.js:46:32), at C:\Users\administrator
AppData\Roaming\npm\node_modules\appium\lib\server\grid-register.js:14:7, at
fs.js:271:14, at Object.oncomplete (fs.js:107:15)]

What am I doing wrong?

Thanks.

Ok, It was a silly typo.

“configurations” node was incorrectly written. It should be configuration “without an s”. In addition, on the platform side, it should be MAC or WINDOWS

node got successfully registered to the Grid after above changes.

Could it be possible to connect Android device to Grid connecting as a node with out node json file?

Hi all,

I’m getting below error while connecting to Grid using Appium , the second device getting error and one device is executing fine.

error: Unhandled error: Error: read ECONNRESET
at errnoException (net.js:905:11)
at TCP.onread (net.js:559:19) context: [POST /wd/hub/session {"desiredCapabilities…

Error Coming while running multiple sessions using appium.Please let me know if any one knows about this.

I’m using different ports 4723, 4724 for two devices.,

Thanks,
Bhaskar.