openatx-archive/atx-server

atx-server 检测不到android手机

Closed this issue · 4 comments

插入手机到mac后
由于 python -m uiautomator2 init localhost:8000 的方法的install_minicap等方法出现SSLError的问题,我手动下载了app-uiautomator.apk,minitouch,minicap.so, atx-agent并上传至android手机,然后执行launch_and_check的方法启动agent成功。通过 curl $DEVICE_URL/info 也可以获得手机的info信息

但我打开atx-server --port 8000后查看 localhost:8000 没有看到有手机绑定过来,查看rethinkdb也是没有手机信息的,保证是同一个网络的,应该怎样排查呢。我看到 main.go 里有以下代码,不太理解到底是atx-server主动获取android info的并记录到rethinkdb的,还是atx-agent主动上传信息到rethinkdb的。

// Read device info message := &proto.CommonMessage{} if err := ws.ReadJSON(message); err != nil { log.Warn("error: read json message") return }

已经解决了,改为python -m uiautomator2 init “mac ip”:8000 就可以了,不过远程看到的界面是灰的什么也没有,试过两台机都不行,分别是荣耀P9(android7.0), 三星note4(android6.0)
以下是浏览器 console日志

You are running Vue in development mode. Make sure to turn on production mode when deploying for production. See more tips at https://vuejs.org/guide/deployment.html vue.js:8436 WebSocket connection to 'ws://192.168.181.220:7912/minitouch' failed: Error during WebSocket handshake: Unexpected response code: 429 remote.js?t=1519644804:397 minitouch websocket error: Event {clipboardData: undefined, path: NodeList[0], cancelBubble: false, returnValue: true, srcElement: WebSocket…} remote.js?t=1519644804:399 minitouch websocket closed

升级下Python 重新init

如果想让 Python2 支持 SNI 功能,使用 pip 安装以下依赖:
pyOpenSSL == 0.13
ndg-httpsclient == 0.3.2

安装后init 就没问题了,thanks

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.