You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "test_reboot.py", line 34, in testMultiReboot
self.reboot()
File "test_reboot.py", line 28, in reboot
self.d(packageName="android").wait.exists(timeout=9000)
File "/home/git/work/uiautomator/uiautomator.py", line 397, in call
return AutomatorDeviceObject(self, Selector(**kwargs))
File "/home/git/work/uiautomator/uiautomator.py", line 809, in init
super(AutomatorDeviceObject, self).init(device, selector)
File "/home/git/work/uiautomator/uiautomator.py", line 637, in init
self.jsonrpc = device.server.jsonrpc
File "/home/git/work/uiautomator/uiautomator.py", line 319, in jsonrpc
self.start()
File "/home/git/work/uiautomator/uiautomator.py", line 337, in start
raise IOError("RPC server not started!")
IOError: RPC server not started!
But after un-commenting time.sleep(), i do not see this issue, Does RPC server start after few seconds after reboot?
The text was updated successfully, but these errors were encountered:
Likely something wrong during starting rpc server. Maybe the uiautomator service is not yet started even if the adb is ok. I am trying to reproduce it.
During android device booting, there are dozen of seconds that the adb is ok but android service in android device is not running, so I am afraid I could not fix the issue.
As a workaround, you can write test:
timeout = 15
while not d.server.alive and timeout > 0:
sleep(1)
timeout -= 1
try:
d.server.start()
except:
pass
Code:
self.d.server.adb.raw_cmd("root").communicate()
subprocess.Popen('adb nodaemon wait-for-device'.split(), stdout=subprocess.PIPE).communicate()
self.d.server.adb.raw_cmd("reboot").communicate()
subprocess.Popen('adb nodaemon wait-for-device'.split(), stdout=subprocess.PIPE).communicate()
#time.sleep(10)
self.d(packageName="android").wait.exists(timeout=9000)
Error:
Traceback (most recent call last):
File "test_reboot.py", line 34, in testMultiReboot
self.reboot()
File "test_reboot.py", line 28, in reboot
self.d(packageName="android").wait.exists(timeout=9000)
File "/home/git/work/uiautomator/uiautomator.py", line 397, in call
return AutomatorDeviceObject(self, Selector(**kwargs))
File "/home/git/work/uiautomator/uiautomator.py", line 809, in init
super(AutomatorDeviceObject, self).init(device, selector)
File "/home/git/work/uiautomator/uiautomator.py", line 637, in init
self.jsonrpc = device.server.jsonrpc
File "/home/git/work/uiautomator/uiautomator.py", line 319, in jsonrpc
self.start()
File "/home/git/work/uiautomator/uiautomator.py", line 337, in start
raise IOError("RPC server not started!")
IOError: RPC server not started!
But after un-commenting time.sleep(), i do not see this issue, Does RPC server start after few seconds after reboot?
The text was updated successfully, but these errors were encountered: