assistd / go-ios

MIT License
2 stars 0 forks source link

重启几次手机后,wdb卡主 #39

Closed prife closed 1 year ago

prife commented 1 year ago

现象

  1. tidevice list命令卡主、go-ios卡主
  2. 插拔手机无反应

复现步骤

  1. 启动HAProxy、wdb
  2. 依次执行
    1. tidevice reboot
    2. tidevice developer,如果卡主,按ctrl-c终止
    3. idevicediagnostics restart
    4. tidevice info测试是否卡主
    5. 重复以上步骤

使用未添加conn.Close版本的relay程序取代wdb,如此几轮以后必现

解决

  1. 重启wdb后,问题消失
mutu1213 commented 1 year ago

已复现 huji@BRIANHU-MB2:/Users/huji/work/ct/ios/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.0 $ tidevice reboot

Traceback (most recent call last): File "/usr/local/bin/tidevice", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/tidevice/main.py", line 965, in main actionsargs.subparser File "/usr/local/lib/python3.9/site-packages/tidevice/main.py", line 180, in cmd_reboot d = _udid2device(args.udid) File "/usr/local/lib/python3.9/site-packages/tidevice/main.py", line 77, in _udid2device _udid = _complete_udid(udid) File "/usr/local/lib/python3.9/site-packages/tidevice/main.py", line 45, in _complete_udid infos = um.device_list() File "/usr/local/lib/python3.9/site-packages/tidevice/_usbmux.py", line 81, in device_list data = self.send_recv(payload, timeout=10) File "/usr/local/lib/python3.9/site-packages/tidevice/_usbmux.py", line 54, in send_recv data = s.send_recv_packet(payload, timeout) File "/usr/local/lib/python3.9/site-packages/tidevice/_safe_socket.py", line 257, in send_recv_packet return self.recv_packet() File "/usr/local/lib/python3.9/site-packages/tidevice/_safe_socket.py", line 252, in recv_packet return self.psock.recv_packet(header_size) File "/usr/local/lib/python3.9/site-packages/tidevice/_safe_socket.py", line 197, in recv_packet header = self.recvall(16) File "/usr/local/lib/python3.9/site-packages/tidevice/_safe_socket.py", line 113, in recvall chunk = self._sock.recv(size - len(buf)) socket.timeout: timed out huji@BRIANHU-MB2:/Users/huji/work/ct/ios/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.0 $ idevicediagnostics restart ERROR: Could not connect to lockdownd, error code -8 huji@BRIANHU-MB2:/Users/huji/work/ct/ios/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.0 $ idevicediagnostics restart ERROR: Could not connect to lockdownd, error code -8

// 关闭wdb进程 huji@BRIANHU-MB2:/Users/huji/work/ct/ios/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.0 $ idevicediagnostics restart Restarting device.