xiaocong / uiautomator

Python wrapper of Android uiautomator test tool.
MIT License
2.02k stars 638 forks source link

IOError: RPC server not started #64

Open zengxiucheng opened 10 years ago

zengxiucheng commented 10 years ago

from uiautomator import device as d d.info

Traceback (most recent call last): File "<pyshell#1>", line 1, in d.info File "C:\Python27\lib\site-packages\uiautomatorinit.py", line 519, in info return self.server.jsonrpc.deviceInfo() File "C:\Python27\lib\site-packages\uiautomatorinit.py", line 400, in wrapper server.start() File "C:\Python27\lib\site-packages\uiautomatorinit.py", line 440, in start raise IOError("RPC server not started!") IOError: RPC server not started!

xiaocong commented 9 years ago

Hi @zengxiucheng, Thank you for reporting the issue. Could you please read the FAQ on readme about the issue? I have to get more information about it, else I have no way to resolve it.

yyjy commented 9 years ago

您好,我也是出现RPC server not started问题,在cmd上按照FAQ验证服务器是否开启时,出现以下出错信息,不知道是什么原因造成的 C:\Windows\System32>curl -d '{"jsonrpc":"2.0","method":"deviceInfo","id":1}' localhost:9008/jsonrpc/0

{"jsonrpc":"jsonrpc","id":"null","error":{"code":-32700,"message":"Parse error"}}

xiaocong commented 9 years ago

可能是因为不同安卓版本或者不同设备的兼容性造成的. 请问你使用哪个型号的安卓设备?电脑的操作系统和python版本号?

如果可能的话,能否将设备进行主清除后再试一次。

zengxiucheng commented 9 years ago

谢谢 上次我都没有回你邮件,最近忙找工作,能推荐下最好用哪个版本。

------------------ 原始邮件 ------------------ 发件人: "贺晓聪";notifications@github.com; 发送时间: 2014年10月13日(星期一) 上午10:23 收件人: "xiaocong/uiautomator"uiautomator@noreply.github.com; 抄送: "zengxiucheng"872328935@qq.com; 主题: Re: [uiautomator] IOError: RPC server not started (#64)

可能是因为不同安卓版本或者不同设备的兼容性造成的. 请问你使用哪个型号的安卓设备?电脑的操作系统和python版本号?

如果可能的话,能否将设备进行主清除后再试一次。

— Reply to this email directly or view it on GitHub.

yyjy commented 9 years ago

三星GT-N7100 Android4.3, 电脑是win7 64位 ,Python2.7
我重新装了一次模块后,现在导入模块,脚本可以正常编译了并且能够对Android设备进行操作了,但是在cmd上验证服务器是否开启时,还是失败了 C:\Windows\System32>adb forward tcp:9008 tcp:9008 C:\Windows\System32>adb forward --list error: unknown host service error: unknown host service

xiaocong commented 9 years ago

如果 adb forward --list出错,可能是adb自身的问题 :(

gokulakrishnan commented 9 years ago

Can somebody translate the whole conversation? I even got the same error for L OS Build. I port forwarded and got listed the port forward in console

xiaocong commented 9 years ago

curl -d '{"jsonrpc":"2.0","method":"deviceInfo","id":1}' localhost:9008/jsonrpc/0

{"jsonrpc":"jsonrpc","id":"null","error":{"code":-32700,"message":"Parse error"}}

@gokulakrishnan, did you meet the same issue as mentioned? If yes, could you please tell me which Android device r u using?

gokulakrishnan commented 9 years ago

Hey Sorry for late update, I got this error resolved. I was changing the init.py code, then while debugging I got it resolved with my own changes of logging Thanks, your code is clear

gokulakv commented 9 years ago

I'm using fire tablet...

On Jan 22, 2015 6:02 PM, =?UTF-8?B?6LS65pmT6IGq?= notifications@github.com wrote:

curl -d '{"jsonrpc":"2.0","method":"deviceInfo","id":1}' localhost:9008/jsonrpc/0

{"jsonrpc":"jsonrpc","id":"null","error":{"code":-32700,"message":"Parse error"}}

@gokulakrishnanhttps://github.com/gokulakrishnan, did you meet the same issue as mentioned? If yes, could you please tell me which Android device r u using?

— Reply to this email directly or view it on GitHubhttps://github.com/xiaocong/uiautomator/issues/64#issuecomment-71013745.

ghost commented 9 years ago

Hi All !!

I am getting this error when i run it in my L os device

caught <type 'exceptions.IOError'>: RPC server not started!

Can someone help me resolve it !!

xiaocong commented 9 years ago

Please upload the adb logcat.

prathikshetty commented 7 years ago

Hi ,

Please try below steps.

And also try print d.info instead of d.info in python code. Thanks

136313283 commented 6 years ago

楼上的办法可行, 谢谢了