1

The problem I try to run 1 test on multiple Android smartphones in parallel for app Instagram with Python.

I have the very popular issue:

“Encountered internal error running command: Error executing adbExec. Original error: 'Command 'C:\Users\Nino\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 53519716736397 forward tcp:4725 tcp:6790' exited with code 1'; Stderr: 'adb.exe: error: more than one device/emulator'; Code: '1'”

So I found a lot of topics about this issue, but I didn’t find any solution. Even in the forums or here, noone give a clear solution. Everyone redirect you to the guide: https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/parallel-tests.md#parallel-android-tests

Environment Here is the result of “adb devices -l”:

List of devices attached:
0123456789ABCDEF device product:X20 model:X20 device:X20 transport_id:1 
1492968379078 device product:S6S5IN3G > model:S6S5IN3G device:S6S5IN3G transport_id:3 
53519716736397 device product:S6S5IN3G model:S6S5IN3G device:S6S5IN3G transport_id:2

So I read it and respect all the rules described in this guide. Here are my capabilities:

desired_caps['systemPort'] = 4728
desired_caps['chromeDriverPort'] = 4728
desired_caps['automationName'] = 'UiAutomator2'
desired_caps['platformName'] = ‘Android’
desired_caps['platformVersion'] = ‘7’
desired_caps['deviceName'] = ‘20’
desired_caps['udid'] = ‘0123456789ABCDEF’
desired_caps['noReset'] = 'true'
desired_caps['appPackage'] = 'com.instagram.android'
desired_caps['appActivity'] = 'com.instagram.mainactivity.MainActivity'

detail: 1. The 4728 port is an iterate variable (4728,4729,4730) for my 3 android devices. You can see them in APpium log file. 2. I tried with and without ‘'chromeDriverPort'’. It didn’t change anything.

I update SDK version:26.1.1 I update Node.js : v12.14.1 I update Appium Server: 1.15.1 I update Appium-Python-Client: 0.49

I re-run my python script and nothing changed. I still get this

“error: more than one device/emulator'; Code: '1'”

Link to Appium logs You can find here the log of my Appium: https://github.com/gauthierbuttez/public/blob/master/appium_log.txt

Gauthier Buttez
  • 1,005
  • 1
  • 16
  • 40

1 Answers1

0

systemPort - should be unique for every single device

chromeDriverPort - not necessary

platformVersion ‘7’ - should be 7.0

In addition, your port of appium instance should be different than systemPort, in my tests i used ports like 4720,4730,4735 etc and systemPorts like 8200,8201,8202 etc

Vault23
  • 743
  • 1
  • 5
  • 19
  • Thanks @Vault23 to try to help me. My systemPort are different than port of Appium instance. I use 4728 and 4725 for my 2 connected real ANdroid devices, and I start Appium server on 4723 – Gauthier Buttez Feb 09 '20 at 15:45