AirtestProject / AirtestProject/Airtest

求助: ios手机执行自动化任务时, 总是出现超时异常

未关闭
#499 6 条评论 0 个 reaction 已指派 1 人 已被 @EraChen233 认领 在 GitHub 查看
module/ios
主要语言
Python
星标
9.6k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

(请尽量按照下面提示内容填写,有助于我们快速定位和解决问题,感谢配合。否则直接关闭。)

**(重要!问题分类)**
* 测试开发环境AirtestIDE使用问题 -> https://github.com/AirtestProject/AirtestIDE/issues
* 图像识别、设备控制相关问题 -> 按下面的步骤

**描述问题bug**
- ios设备程序执行自动化任务时, 总是出现ReadTimeout超时异常
- 主要出现的操作: `text`、 `touch`等对手机进行操作时, 容易出现这种超时异常, 据我分析是在facebook-wda模块中: requests请求ios手机的数据时, 一直没有请求成功, 导致抛出异常
- 代理转发工具: mobiledevice、wdproxy、usbmuxd尝试过均有这种问题存在
- 命令行执行程序/AirtestIDE也是

**AirtestIDE/命令行执行程序时的主要异常日志**
```
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8100): Read timed out. (read timeout=60.0)
```
**部分mobiledevice日志, 正常请求耗时为0-1000ms之间**
```
............
[16:40:55] 200 GET /screenshot (127.0.0.1) 390.13ms
[16:40:55] 200 GET /session/4160B3E8-296D-457E-BEB5-26F3EB442F07/orientation (127.0.0.1) 16.60ms
[16:40:55] 200 GET /session/4160B3E8-296D-457E-BEB5-26F3EB442F07/orientation (127.0.0.1) 17.64ms
[16:40:55] 200 GET /screenshot (127.0.0.1) 231.97ms
[16:40:56] 200 GET /screenshot (127.0.0.1) 467.70ms
[16:40:56] 200 GET /screenshot (127.0.0.1) 521.87ms
[16:40:56] 200 GET /session/4160B3E8-296D-457E-BEB5-26F3EB442F07/orientation (127.0.0.1) 283.28ms
[16:40:57] 200 GET /session/4160B3E8-296D-457E-BEB5-26F3EB442F07/window/size (127.0.0.1) 669.67ms
[16:40:57] 200 GET /screenshot (127.0.0.1) 875.35ms
[16:40:57] 200 GET /session/4160B3E8-296D-457E-BEB5-26F3EB442F07/orientation (127.0.0.1) 188.11ms
[16:41:01] 200 POST /session/4160B3E8-296D-457E-BEB5-26F3EB442F07/wda/tap/0 (127.0.0.1) 3706.01ms
[16:41:01] 200 GET /screenshot (127.0.0.1) 3808.74ms
[16:41:01] 200 GET /screenshot (127.0.0.1) 123.93ms
[16:41:01] 200 GET /screenshot (127.0.0.1) 113.68ms
[16:41:01] 200 GET /screenshot (127.0.0.1) 113.91ms
[16:41:01] 200 GET /screenshot (127.0.0.1) 115.91ms
..............
```

**预期效果**
有没有大佬们在使用iOS的做自动化的时候遇到过这种BUG, 还请指教一下怎么解决...

**python 版本:** `python3.7.4`

**airtest 版本:** `1.0.27`

**设备:**
- 手机型号: [ iphone6、iphone6s ]
- 手机系统: [ iOS 10.2.1、iOS 10.3.3 ]
- macOS: [ 10.14.5、 10.14.6]
- AirtestIDE: [ 1.2.1 ]
- Xcode: [ Xcode 10.1、9.3.1 ]

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。