alibaba / alibaba/tidevice

执行tidevice ps和tidevice kill com.xxxxx时,会出现以下报错:

Open
#249 7 comments 0 reactions 0 assignees View on GitHub
bug challenge
Dominant language
Python
Stars
2.6k
Forks
469
PR merge metrics
No merged PRs in 30d

Description

Traceback (most recent call last):
File "E:\Python\Python38\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "E:\Python\Python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "E:\Python\Python38\Scripts\tidevice.exe\__main__.py", line 7, in
File "E:\Python\Python38\lib\site-packages\tidevice\__main__.py", line 951, in main
actions[args.subparser](args)
File "E:\Python\Python38\lib\site-packages\tidevice\__main__.py", line 362, in cmd_kill
pid = d.app_kill(args.name)
File "E:\Python\Python38\lib\site-packages\tidevice\_device.py", line 690, in app_kill
return self.app_stop(*args, **kwargs)
File "E:\Python\Python38\lib\site-packages\tidevice\_device.py", line 674, in app_stop
with self.connect_instruments() as ts:
File "E:\Python\Python38\lib\site-packages\tidevice\_device.py", line 792, in connect_instruments
conn = self.start_service(
File "E:\Python\Python38\lib\site-packages\tidevice\_device.py", line 483, in start_service
return self._unsafe_start_service(name)
File "E:\Python\Python38\lib\site-packages\tidevice\_device.py", line 522, in _unsafe_start_service
conn = self.create_inner_connection(data['Port'], _ssl=_ssl, ssl_dial_only=ssl_dial_only)
File "E:\Python\Python38\lib\site-packages\tidevice\_device.py", line 294, in create_inner_connection
psock.switch_to_ssl(self.ssl_pemfile_path)
File "E:\Python\Python38\lib\site-packages\tidevice\_safe_socket.py", line 142, in switch_to_ssl
ssock = context.wrap_socket(self._sock, server_hostname="iphone.localhost")
File "E:\Python\Python38\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "E:\Python\Python38\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "E:\Python\Python38\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。

测试环境:Windows 10
设备:ipad pro以及ipad 5
设备版本:15.2,15.4.1
tidevice版本:0.6.4

想请教下可能是什么原因导致的?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `tidevice ps` and `tidevice kill com.xxxxx` on the reported Windows 10 and iOS versions. Trace the connection path through `tidevice/_device.py`, especially `app_kill`, `app_stop`, `connect_instruments`, and `create_inner_connection`, then inspect `_safe_socket.py` at `switch_to_ssl`. Done means identifying and addressing the SSL connection abort so both commands complete without this traceback.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, python
Domain
devtools, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.