uiautomator icon indicating copy to clipboard operation
uiautomator copied to clipboard

IOError: RPC server not started

Open zengxiucheng opened this issue 10 years ago • 14 comments

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\uiautomator__init__.py", line 519, in info return self.server.jsonrpc.deviceInfo() File "C:\Python27\lib\site-packages\uiautomator__init__.py", line 400, in wrapper server.start() File "C:\Python27\lib\site-packages\uiautomator__init__.py", line 440, in start raise IOError("RPC server not started!") IOError: RPC server not started!

zengxiucheng avatar Jul 31 '14 11:07 zengxiucheng

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.

xiaocong avatar Aug 05 '14 07:08 xiaocong

您好,我也是出现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"}}

yyjy avatar Oct 13 '14 01:10 yyjy

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

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

xiaocong avatar Oct 13 '14 02:10 xiaocong

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

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

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

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

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

zengxiucheng avatar Oct 13 '14 08:10 zengxiucheng

三星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

yyjy avatar Oct 14 '14 07:10 yyjy

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

xiaocong avatar Oct 16 '14 08:10 xiaocong

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

gokulakrishnan avatar Jan 22 '15 10:01 gokulakrishnan

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?

xiaocong avatar Jan 22 '15 12:01 xiaocong

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

gokulakrishnan avatar Jan 25 '15 13:01 gokulakrishnan

I'm using fire tablet...

On Jan 22, 2015 6:02 PM, =?UTF-8?B?6LS65pmT6IGq?= [email protected] 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.

gokulakv avatar Jan 27 '15 08:01 gokulakv

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 !!

ghost avatar Feb 05 '15 11:02 ghost

Please upload the adb logcat.

xiaocong avatar Feb 06 '15 06:02 xiaocong

Hi ,

Please try below steps.

  • adb shell pm uninstall com.github.uiautomator
  • adb shell pm uninstall com.github.uiautomator.test
  • adb install app-uiautomator.apk
  • adb install app-uiautomator-test.apk
  • adb push bundle.jar /data/local/tmp/
  • adb push uiautomator-stub.jar /data/local/tmp/

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

prathikshetty avatar Aug 19 '16 06:08 prathikshetty

楼上的办法可行, 谢谢了

136313283 avatar Nov 24 '17 13:11 136313283