AirtestIDE icon indicating copy to clipboard operation
AirtestIDE copied to clipboard

执行脚步的时候手机经常断开链接(1小时不到断掉一次),错误码:requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

Open AndreRao opened this issue 5 years ago • 9 comments

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

(重要!问题分类)

  • 测试开发环境AirtestIDE使用问题(本软件) -> 这里 执行脚步的时候手机经常断开链接(1小时不到断掉一次),错误码:requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

描述问题bug 执行脚步的时候手机经常断开链接(1小时不到断掉一次),错误码:requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

截屏 强烈建议带上截图,包括IDE本身的截图和后面的黑窗口的报错信息的截图(尽量完整)。

复现步骤

  1. airiest 1.2.1 ,手机系统12.1.2,Xcode 10.1 2.product-test成功,端口8100,airtestide开始运行成功 3.大约10-60分钟

预期效果 正常运行,不断开

python 版本: python2.7

操作系统: OS X 10.13.6

设备:

  • 型号: [iPhone8 12.1.2]
  • 系统: [12.1.2
  • (别的信息)

其他相关环境信息 (Mac mini osx)

AndreRao avatar Apr 22 '19 11:04 AndreRao

屏幕快照 2019-04-22 下午7 39 02

AndreRao avatar Apr 22 '19 11:04 AndreRao

@AndreRao 你好,看报错是连接断开了。

看是否尝试使用[命令行运行}(http://airtest.netease.com/docs/cn/4_run_script/run_script.html#id4)下,看有没有改善?

rockywhisper avatar Apr 23 '19 08:04 rockywhisper

@rockywhisper 运行一会也报错: requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

屏幕快照 2019-04-23 下午8 23 55

AndreRao avatar Apr 23 '19 12:04 AndreRao

@AndreRao 你好,看报错是连接断开了。

看是否尝试使用[命令行运行}(http://airtest.netease.com/docs/cn/4_run_script/run_script.html#id4)下,看有没有改善?

你好,根据你的操作还是会报错,请问下你们什么时候更新解决,目前IOS连接及其不稳定,容易断开

AndreRao avatar Apr 28 '19 10:04 AndreRao

@AndreRao 你好,看报错是连接断开了。

看是否尝试使用[命令行运行}(http://airtest.netease.com/docs/cn/4_run_script/run_script.html#id4)下,看有没有改善?

命令行还是一样的报错,请问什么时候更新新的版本?

raoqianghua avatar May 27 '19 07:05 raoqianghua

这个对你有帮助: https://codeday.me/bug/20181002/277273.html

1014294827 avatar Jun 20 '19 11:06 1014294827

我也遇到了同样的问题: iOS设备:iphone x. 手机型号: 12.1. 系统型号:10.13.6 (17G65), xcode型号:Version 10.1 (10B61)

报错信息如下: 17.对话朗读题 retry to connect, error: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

[Finished] ERROR: runTest (app.widgets.code_runner.ide_launcher.AirtestIDECase)

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 353, in _make_request TypeError: getresponse() got an unexpected keyword argument 'buffering'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 355, in _make_request File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 258, in _read_status File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/adapters.py", line 370, in send File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 564, in urlopen File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/util/retry.py", line 245, in increment File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/packages/six.py", line 309, in reraise File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 355, in _make_request File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 258, in _read_status File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/wda/init.py", line 70, in httpdo File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/api.py", line 49, in request File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/sessions.py", line 461, in request File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/sessions.py", line 573, in send File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/adapters.py", line 415, in send requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 353, in _make_request TypeError: getresponse() got an unexpected keyword argument 'buffering'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 355, in _make_request File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 258, in _read_status File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/adapters.py", line 370, in send File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 564, in urlopen File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/util/retry.py", line 245, in increment File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/packages/six.py", line 309, in reraise File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 355, in _make_request File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 258, in _read_status File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/airtest/airtest/cli/runner.py", line 65, in runTest File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/six.py", line 693, in reraise File "/Users/wjjn3033/dev/idestable/airtest/airtest/cli/runner.py", line 61, in runTest File "/Users/zd/Desktop/monthTest-iOS-test/month_test.air/month_test.py", line 904, in main() File "/Users/zd/Desktop/monthTest-iOS-test/month_test.air/month_test.py", line 890, in main test_progress() File "/Users/zd/Desktop/monthTest-iOS-test/month_test.air/month_test.py", line 881, in test_progress test_progress_04() File "/Users/zd/Desktop/monthTest-iOS-test/month_test.air/month_test.py", line 491, in test_progress_04 wait_time(6, wname="I am fine", wtime=10) File "/Users/zd/Desktop/monthTest-iOS-test/month_test.air/month_test.py", line 32, in wait_time if poco(name=wname).exists(): File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 72, in wrapped return func(proxy, *args, **kwargs) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 774, in exists return self.attr('visible') File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 39, in wrapped return func(self, *args, **kwargs) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 734, in attr nodes = self._do_query(multiple=False) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 872, in _do_query self._nodes = self.poco.agent.hierarchy.select(self.query, multiple) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/freezeui/hierarchy.py", line 90, in select return self.selector.select(query, multiple) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/sdk/Selector.py", line 78, in select return self.selectImpl(cond, multiple, self.getRoot(), 9999, True, True) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/sdk/Selector.py", line 71, in getRoot return self.dumper.getRoot() File "/Applications/AirtestIDE.app/Contents/MacOS/poco/freezeui/hierarchy.py", line 35, in getRoot root = Node(self.dumpHierarchy()) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/drivers/ios/init.py", line 42, in dumpHierarchy nowOri = self.client.orientation File "/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/ios/ios.py", line 37, in wrapper return func(self, *args, **kwargs) File "/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/ios/ios.py", line 119, in orientation return self.session.orientation File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/wda/init.py", line 431, in orientation File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/wda/init.py", line 101, in fetch File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/wda/init.py", line 107, in _fetch_no_alert File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/wda/init.py", line 75, in httpdo File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/api.py", line 49, in request File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/sessions.py", line 461, in request File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/sessions.py", line 573, in send File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/requests/adapters.py", line 415, in send requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))


Ran 1 test in 373.322s

FAILED (errors=1)

============================================================

1014294827 avatar Jun 21 '19 09:06 1014294827

亲们 后来有啥办法了吗 我这边也是 莫名其妙的就断了 而且程序页面好好地 单独执行这个用例也可以 就所有用例连起来 就不行呀

cuixuefei-now avatar Feb 05 '21 11:02 cuixuefei-now

亲们 后来有啥办法了吗 我这边也是 莫名其妙的就断了 而且程序页面好好地 单独执行这个用例也可以 就所有用例连起来 就不行呀

请问,你解决了吗?

xiaotudoushizhenjun avatar Mar 14 '22 07:03 xiaotudoushizhenjun