Closed af652030 closed 1 month ago
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?
Any Ideas why so many adb ports?
Total 5200
try the lastest uiautomator2 >= 3.2.0, close for now, reopen it if still exist
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'))