Open craftpip opened 6 years ago
After some debugging, found error comes in @ uiautomator/init.py @ 423
where e
is
('Connection aborted.', ConnectionAbortedError(10053, 'An established connection was aborted by the software in your host machine', None, 10053, None))
What could cause this ?
The program gets stuck @ line 425
except (URLError, socket.error, HTTPException) as e:
if restart:
server.stop()
server.start(timeout=30) # <- here
return _JsonRPCMethod(url, method, timeout, False)(*args, **kwargs)
else:
UPDATE: I was trying to connect to a non-rooted phone, Motorola g5 plus @ Android 6 But successfully connected to a rooted phone, Motorola g2 @ Android 4.4
I haven't seen in the documentation that uiautomator requires root privileges ?
UPDATE: Went through the previous issues, found https://github.com/xiaocong/uiautomator/issues/210#issuecomment-292842129
@snakeli suggests to
change "self.adb.cmd("install", "-r -t", os.path.join(base_dir, apk)).wait()" to "self.adb.cmd("install", "-r", "-t", os.path.join(base_dir, apk)).wait()" in init.py
Which solves my problem. However i would like to know what difference it makes in "-r -t" and "-r" "-t" ?
I'm having problem with an old phone Android API 18, works about 75% of the tries. The traceback points at a line doing .wait.exists
Hey @craftpip i am facing the same issue (RPC server not started ) and i am not able to resolve this , can you please help me out.
Adb output:
And script:
I tried first with a AVD that worked perfectly, but i'm facing this problem on using a physical device.
Please help, Thanks