xiaocong / uiautomator

Python wrapper of Android uiautomator test tool.
MIT License
2.03k stars 643 forks source link

UiAutomation not connected! #233

Open vermagag opened 7 years ago

vermagag commented 7 years ago

Hi I am observing the below issue too many times, my device is perfectly connected. I have seen previous solutions related to this issue, but they did not help me.

File "chromelaunch.py", line 19, in main d.press.home() File "C:\Python27\lib\site-packages\uiautomator__init.py", line 74, in call return self.func(*args, **kwargs) File "C:\Python27\lib\site-packages\uiautomator__init__.py", line 787, in _press return self.server.jsonrpc.pressKey(str(key)) File "C:\Python27\lib\site-packages\uiautomator\init.py", line 433, in wrapper return _method_obj(*args, **kwargs) File "C:\Python27\lib\site-packages\uiautomator\init.py", line 132, in call__ "%s: %s" % (jsonresult["error"]["data"]["exceptionTypeName"], jsonresult["error"]["message"])

Tuiautomator.JsonRPCError: JsonRPC Error code: 0, Message: java.lang.IllegalState Exception: UiAutomation not connected!

File Attachment : logcat

logcat.txt

azhong00 commented 7 years ago

Got the same thing ... retry seems able to work around it.