[I 211116 13:27:35 _device:958] BundleID: com.facebook.WebDriverAgentRunner.xctrunner
[I 211116 13:27:36 _device:961] ProductVersion: 12.5.5
[I 211116 13:27:36 _device:963] DeviceIdentifier: eedb3ab67816fbfa0884a3fbaa4c3508765f8237
[I 211116 13:27:36 _device:802] SignIdentity: 'iPhone Developer: xxxxxxxx@qq.com (xxxxxxxx)'
[I 211116 13:27:36 _device:808] CFBundleExecutable: WebDriverAgentRunner-Runner
[I 211116 13:27:36 _device:839] AppContainer: /private/var/mobile/Containers/Data/Application/CAF7E2BE-7FF6-4E7E-B436-0C628EED769A
[I 211116 13:27:36 _device:879] Launch 'com.facebook.WebDriverAgentRunner.xctrunner' pid: 989
[I 211116 13:27:37 _device:1084] xctrunner quited
[E 211116 13:27:37 _wdaproxy:150] [eedb3ab67816fbfa0884a3fbaa4c3508765f8237] wda started failed
这样启动后退出,是因为证书有问题,还是系统版本低的啊
日志信息不足,无法定位。
你用类似下面的命令来跑,获取更多信息吧。
tidevice -u <替换成你的设备uuid> xctest --bundle_id "*WebDriverAgent*" --debug
我这边运行也出错
(venv) tracy@tracydeMacBook-Air iphnoeDevice % tidevice -u XXXXXX wdaproxy -B com.faw.WebDriverAgentRunner.xctrunner --port 8100
[I 220419 11:26:45 _wdaproxy:125] [00008030-0014445601DA802E] WDA check every 30.0 seconds
[D 220419 11:26:45 _wdaproxy:131] [00008030-0014445601DA802E] launch WDA
[I 220419 11:26:45 _device:964] BundleID: com.faw.WebDriverAgentRunner.xctrunner
[I 220419 11:26:46 _device:980] ProductVersion: 13.3
[I 220419 11:26:46 _device:981] DeviceIdentifier: XXXXXX
[I 220419 11:26:46 _device:817] SignIdentity: 'Apple Development: XXXXXX @qq.com (ULXXXXXX )'
[I 220419 11:26:46 _device:823] CFBundleExecutable: WebDriverAgentRunner-Runner
[I 220419 11:26:46 _device:854] AppContainer: /private/var/mobile/Containers/Data/Application/9CDACF5E-065F-4339-AB39-231FC804A1E8
[I 220419 11:26:46 _device:894] Launch 'com.faw.WebDriverAgentRunner.xctrunner' pid: 6417
[I 220419 11:26:46 _device:1030] Test runner ready detected
[I 220419 11:26:46 _device:1022] Start execute test plan with IDE version: 29
[I 220419 11:26:47 _device:930] WebDriverAgent start successfully
[E 220419 11:26:51 _instruments:574] drain error
Traceback (most recent call last):
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_instruments.py", line 564, in _drain
self._drain_single_message()
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_instruments.py", line 587, in _drain_single_message
mheader, payload = self.recv_dtx_message()
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_instruments.py", line 481, in recv_dtx_message
data = self.psock.recvall(0x20)
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_safe_socket.py", line 101, in recvall
chunk = self._sock.recv(size - len(buf))
socket.timeout: timed out
使用 tidevice -u XXXX xctest --bundle_id "WebDriverAgent" --debug 命令运行结果
[I 220419 11:29:31 _device:930] WebDriverAgent start successfully
[D 220419 11:29:31 _instruments:609] Ignore notification from server: 23, 0x2, ('outputReceived:fromProcess:atTime:', ['2022-04-19 11:29:31.423741+0800 WebDriverAgentRunner-Runner[6425:1618969] ServerURLHere->http://localhost:8100<-ServerURLHere\n', 6425, 4696892085441])
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:0 flags:2 conv:0 ('outputReceived:fromProcess:atTime:', ['2022-04-19 11:29:31.424025+0800 WebDriverAgentRunner-Runner[6425:1619001] Using singleton test manager\n', 6425, 4696892092098])
[D 220419 11:29:31 _device:927] logProcess: 2022-04-19 11:29:31.424025+0800 WebDriverAgentRunner-Runner[6425:1619001] Using singleton test manager
[D 220419 11:29:31 _instruments:609] Ignore notification from server: 24, 0x2, ('outputReceived:fromProcess:atTime:', ['2022-04-19 11:29:31.424025+0800 WebDriverAgentRunner-Runner[6425:1619001] Using singleton test manager\n', 6425, 4696892092098])
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.357 WebDriverAgentRunner-Runner[6425:1618969] Done initializing for UI testing.\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.357 WebDriverAgentRunner-Runner[6425:1618969] Loading test suite...\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.378 WebDriverAgentRunner-Runner[6425:1618969] Finished loading test suite, took 0.021s\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.378 WebDriverAgentRunner-Runner[6425:1618969] <XCTWaiter: 0x283ed7640, state: XCTWaiterStateResolved> entering wait loop for 599.58s with expectations: `preparing execution worker`\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.378 WebDriverAgentRunner-Runner[6425:1618969] Returning result XCTWaiterResultCompleted for waiter <XCTWaiter: 0x283ed7640, state: XCTWaiterStateFinished>\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.378 WebDriverAgentRunner-Runner[6425:1618969] Entering test execution event loop\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.378 WebDriverAgentRunner-Runner[6425:1618969] -[XCTRunnerIDESession testBundleWillStart:]\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.378 WebDriverAgentRunner-Runner[6425:1618969] Running suite...\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.378 WebDriverAgentRunner-Runner[6425:1618969] -[XCTRunnerIDESession testSuiteWillStart:]\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testSuite:didStartAt:', ['All tests', '2022-04-19 03:29:31 +0000'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testSuite:didStartAt:', ['WebDriverAgentRunner.xctest', '2022-04-19 03:29:31 +0000'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.379 WebDriverAgentRunner-Runner[6425:1618969] -[XCTRunnerIDESession testSuiteWillStart:]\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testSuite:didStartAt:', ['UITestingUITests', '2022-04-19 03:29:31 +0000'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.379 WebDriverAgentRunner-Runner[6425:1618969] -[XCTRunnerIDESession testSuiteWillStart:]\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.379 WebDriverAgentRunner-Runner[6425:1618969] <XCTContext: 0x280d1e0c0> started activity <XCActivityRecord: 0x2836ebb60> 2022-04-19 03:29:31 +0000: Suite Set Up\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testCase:method:willStartActivity:', ['none', 'none', XCActivityRecord(activityType=com.apple.dt.xctest.activity-type.internal, attachments=[], finish=None, start=2022-04-19 03:29:31.378759, title=Suite Set Up, uuid=0e3a9d9c-dd4b-420b-b537-346dba2e979e)])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.413 WebDriverAgentRunner-Runner[6425:1618969] <XCTContext: 0x280d1e0c0> finished activity <XCActivityRecord: 0x2836ebb60> 2022-04-19 03:29:31 +0000: Suite Set Up (0.034261s)\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testCase:method:didFinishActivity:', ['none', 'none', XCActivityRecord(activityType=com.apple.dt.xctest.activity-type.internal, attachments=[], finish=2022-04-19 03:29:31.413020, start=2022-04-19 03:29:31.378759, title=Suite Set Up, uuid=0e3a9d9c-dd4b-420b-b537-346dba2e979e)])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testCaseDidStartForTestClass:method:', ['UITestingUITests', 'testRunner'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.414 WebDriverAgentRunner-Runner[6425:1618969] -[XCTRunnerIDESession testCaseWillStart:] UITestingUITests testRunner\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.414 WebDriverAgentRunner-Runner[6425:1618969] <XCTContext: 0x280d17080> started activity <XCActivityRecord: 0x2836eafd0> 2022-04-19 03:29:31 +0000: Start Test at 2022-04-19 11:29:31.414\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testCase:method:willStartActivity:', ['none', 'none', XCActivityRecord(activityType=com.apple.dt.xctest.activity-type.internal, attachments=[], finish=None, start=2022-04-19 03:29:31.414088, title=Start Test at 2022-04-19 11:29:31.414, uuid=b220da40-cd90-4979-ace2-472e9676935f)])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ["11:29:31.414 WebDriverAgentRunner-Runner[6425:1618969] Creating future for 'getting screen identifiers' with timeout 30.00\n"])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.414 WebDriverAgentRunner-Runner[6425:1618969] <XCTWaiter: 0x283efddc0, state: XCTWaiterStateResolved> entering wait loop for 30.00s with expectations: `getting screen identifiers`\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.414 WebDriverAgentRunner-Runner[6425:1618969] Returning result XCTWaiterResultCompleted for waiter <XCTWaiter: 0x283efddc0, state: XCTWaiterStateFinished>\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.414 WebDriverAgentRunner-Runner[6425:1618969] <XCTContext: 0x280d17080> finished activity <XCActivityRecord: 0x2836eafd0> 2022-04-19 03:29:31 +0000: Start Test at 2022-04-19 11:29:31.414 (0.000398993s)\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testCase:method:didFinishActivity:', ['none', 'none', XCActivityRecord(activityType=com.apple.dt.xctest.activity-type.internal, attachments=[], finish=2022-04-19 03:29:31.414487, start=2022-04-19 03:29:31.414088, title=Start Test at 2022-04-19 11:29:31.414, uuid=b220da40-cd90-4979-ace2-472e9676935f)])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.415 WebDriverAgentRunner-Runner[6425:1618969] <XCTContext: 0x280d17080> started activity <XCActivityRecord: 0x2836eaf80> 2022-04-19 03:29:31 +0000: Set Up\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testCase:method:willStartActivity:', ['none', 'none', XCActivityRecord(activityType=com.apple.dt.xctest.activity-type.internal, attachments=[], finish=None, start=2022-04-19 03:29:31.414653, title=Set Up, uuid=25d035ee-9bb0-4270-acc7-e50a2a25a14d)])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.415 WebDriverAgentRunner-Runner[6425:1618969] <XCTWaiter: 0x283efdc70, state: XCTWaiterStateResolved> entering wait loop for 2592000.00s with expectations: `failable invocation block completion`\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.415 WebDriverAgentRunner-Runner[6425:1618969] Returning result XCTWaiterResultCompleted for waiter <XCTWaiter: 0x283efdc70, state: XCTWaiterStateFinished>\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.415 WebDriverAgentRunner-Runner[6425:1618969] <XCTContext: 0x280d17080> finished activity <XCActivityRecord: 0x2836eaf80> 2022-04-19 03:29:31 +0000: Set Up (0.000211s)\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_testCase:method:didFinishActivity:', ['none', 'none', XCActivityRecord(activityType=com.apple.dt.xctest.activity-type.internal, attachments=[], finish=2022-04-19 03:29:31.414864, start=2022-04-19 03:29:31.414653, title=Set Up, uuid=25d035ee-9bb0-4270-acc7-e50a2a25a14d)])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.415 WebDriverAgentRunner-Runner[6425:1618969] _assertObjectsInvalidAfterScope\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ["11:29:31.424 WebDriverAgentRunner-Runner[6425:1618969] Creating future for 'getting screen identifiers' with timeout 30.00\n"])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.424 WebDriverAgentRunner-Runner[6425:1618969] <XCTWaiter: 0x283edf090, state: XCTWaiterStateResolved> entering wait loop for 30.00s with expectations: `getting screen identifiers`\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[D 220419 11:29:31 _instruments:596] RECV DTXMessage: expects_reply:1 flags:2 conv:0 ('_XCT_logDebugMessage:', ['11:29:31.424 WebDriverAgentRunner-Runner[6425:1618969] Returning result XCTWaiterResultCompleted for waiter <XCTWaiter: 0x283edf090, state: XCTWaiterStateFinished>\n'])
[D 220419 11:29:31 _instruments:395] SEND DTXMessage: channel:1 expect_reply:0 data_length:48, data...
[E 220419 11:29:35 _instruments:574] drain error
Traceback (most recent call last):
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_instruments.py", line 564, in _drain
self._drain_single_message()
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_instruments.py", line 587, in _drain_single_message
mheader, payload = self.recv_dtx_message()
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_instruments.py", line 481, in recv_dtx_message
data = self.psock.recvall(0x20)
File "/Users/tracy/PycharmProjects/iphnoeDevice/venv/lib/python3.8/site-packages/tidevice/_safe_socket.py", line 101, in recvall
chunk = self._sock.recv(size - len(buf))
socket.timeout: timed out
[D 220419 11:29:35 _instruments:576] dtxm socket closed
[I 220419 11:29:35 _device:1102] xctrunner quited