Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with stability of connection of a large number of devices. #900

Open
af652030 opened this issue Jul 15, 2023 · 2 comments
Open

Comments

@af652030
Copy link

Problems with stability of connection of a large number of devices.

I have several mobile devices and the code on uiautomator2 which worked fine. But with increasing number of devices I catch a strange error after which something happens with adb server.
After which:

  1. device gets offline status
  2. Log code says "device offline".
  3. A window "Allow usb debugging" pops up on the device, which tells about re-authorization of the device for the adb server. Although adb server works and some other devices work stably. (It's always different devices. Sometimes it turns off device 1,2,3, sometimes 3,2,5, etc.)
  4. If you use the command "adb reconnect offline" then the device can be used again and its status changes.

I have some assumptions:

  1. Devices are often rebooted via "adb shell reboot" command. Perhaps when rebooting the script cannot connect to the application and a conflict occurs, so it restarts the server.

  2. Problem in ports. A large number of devices require more ports and when rebooting the device as if it gets a new port. Maybe there are not enough ports and uiautomator restarts adb.

I've been studying the documentation for a couple days but can't find the reason. If you have any ideas or thoughts why the adb server might be restarting, it would be appreciated.

ERROR:
ConnectionError : ('Connection aborted.',
RemoteDisconnected('Remote end closed connection without response'))

image_2023-07-15_12-26-21

@af652030
Copy link
Author

I think it's the ports.
I have 5,000 ports open on the adb.exe process.

Can you tell me where the error might be?

@af652030
Copy link
Author

Any Ideas why so many adb ports?
image

Total 5200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant