Error: more than one device/emulator'; Code: '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: public/appium_log.txt at master · gauthierbuttez/public · GitHub

This looks like a problem with adb itself. Make sure the android platform tools are up to date. then perform adb kill-server to make sure there are no cached connections

Thanks for your help.
I updated everything. I have adb --version:

Android Debug Bridge version 1.0.41
Version 29.0.2-5738569

All the rest is updated.

Here is my 2nd log file after all the updated and after have done adb kill-server

Do you have any other suggestion?

where is the updated log?

Here is my second Log file:

So in fact, nothing is fixed. I still can run my test on several real devices at same time.
I always adb kill-server before each test to be sure no cache is making this issue.

Any other suggestion please?

I also meet the same issue? Any update?

I once run the same code two years ago, it worked well. But now always occur this issue, I didn’t update anything, only the version of Appium is different.