Stuck while launching Appium Grid on 2 Real android devices

Hi Team,

I am stuck on the last step in launching Appium Grid on 2 Android devices that are connected to the same Windows 7 machine. Your inputs will really help in moving forward:

Steps that I have done so far:

  • Clonned the Appium and started the server on 2 different ports
  • Created 2 different json files for each port and started Appium server using these files
  • Now trying to deploy the selendroid test app on both device at same
    time.

One one device it’s being added successfully but on other it error’s out with a message

“uiautomator quit before it successfully launched”

Although the Grid console shows both port connected for DefaultRemoteProxy (version : 1.2.0)
id : http://127.0.0.1:4730, OS : ANDROID and the second one id : http://127.0.0.1:4728, OS : ANDROID

node1.json

{
“capabilities”:
[
{
“browserName”: “Android”,
“version”:“4.4.2”,
“maxInstances”: 1,
“platform”:“ANDROID”
}
],
“configuration”:
{
“cleanUpCycle”:2000,
“timeout”:30000,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”:“http://127.0.0.1:4730/wd/hub”,
“maxSession”: 1,
“port”: “4730”,
“host”: “127.0.0.1”,
“register”: true,
“registerCycle”: 5000,
“hubPort”: “4444”,
“hubHost”: “127.0.0.1”
}
}

node2.json

{
“capabilities”:
[
{
“browserName”: “Android”,
“version”:“4.4.2”,
“maxInstances”: 1,
“platform”:“ANDROID”
}
],
“configuration”:
{
“cleanUpCycle”:2000,
“timeout”:30000,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”:“http://127.0.0.1:4728/wd/hub”,
“maxSession”: 1,
“port”: “4728”,
“host”: “127.0.0.1”,
“register”: true,
“registerCycle”: 5000,
“hubPort”: “4444”,
“hubHost”: “127.0.0.1”
}
}

Let me know if I am missing something or any more configuration required?

Thanks in Advance

1 Like

Any help in the same as the hub is listening to both Ports and both devices are connected to one machine but while executing the code when I run it serially it gets executed on one device only and when I run the code parallelly then it throws exception for “uiautomator quit before it successfully launched”

Thanks

Hi Raman,
Please watch my video, may be you are looking for the same.

1 Like

@Raman,

Two different android devices are connected to the same computer?
The problem is that appium doesn’t know which node goes to which device.
You need to configure the ID of the device to work like that.
I know that UIAutomator casn get the ID as a parameter, but not sure if appium enables this configuration.
Best of luck:)

1 Like

Hi All,
I hope you’d resolved the issue.
Please tell me where is the problem…i’m also facing the same issue with the Grid for two android devices.
"uiautomator quit before it successfully launched"

Thank you in advance,
Bhaskar.