openatx / uiautomator2

Android Uiautomator2 Python Wrapper
MIT License
6.38k stars 1.37k forks source link

HTTPConnectionPool(host='127.0.0.1', port=54167): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f02d41c1b10>: Failed to establish a new connection: [Errno 111] Connection refused')) #874

Closed arghyamukherjee007 closed 3 months ago

arghyamukherjee007 commented 1 year ago

Ui Automator version - 2.16.0 Pytest version - 6.1.0 python version - 3.7.16 adbutil version - 0.11.0 while connecting with uiautomator getting error

HTTPConnectionPool(host='127.0.0.1', port=54167): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f02d41c1b10>: Failed to establish a new connection: [Errno 111] Connection refused'))

As part of workaround ,

It is suppose to hit port 43179 , but instead hitting 54167

please help with workarounds.

sc231997 commented 1 year ago

Try version Ui Automator 2.16.22 This is most likely same as this https://github.com/openatx/uiautomator2/pull/801

arghyamukherjee007 commented 1 year ago

@sc231997 the happening for all version even with 2.16.22 it is suppose to hit port 43179 but hitting wrong port causing the failure

arghyamukherjee007 commented 1 year ago

@sc231997 do you know from where this wrong port triggering?

vbpatel73 commented 1 year ago

@sc231997 I am getting the same error when using aws device farm. how to fix it or workaround?

sc231997 commented 1 year ago

@vbpatel73 what version you are using of UI Automator and what is the arch of the underlying hardware (arm, x86 etc)?

vbpatel73 commented 1 year ago

@vbpatel73 what version you are using of UI Automator and what is the arch of the underlying hardware (arm, x86 etc)?

i used 2.16.22for uiautomator and hardware i do not know as it is aws device farm