1
Appium 1.5.0 
Xcode  7.3
IOS 10.11.4 OSX EI Capitan
Using on:Simulator iOS 8.1

例外:

[Appium] Had trouble ending session 93536764-0715-4f18-a8b0-4a06335e2d94: Instruments did not terminate after 5 seconds!
[Appium] Removing session 93536764-0715-4f18-a8b0-4a06335e2d94 from our master session list
[MJSONWP] Encountered internal error running command: Error: Instruments did not terminate after 5 seconds!
    at Instruments.callee$2$0$ (lib/instruments.js:338:15)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:104:47)
    at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:115:28
    at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

有谁知道为什么会出现这个错误?这是在 Appium 关闭会话时测试结束时出现的。

异常前的日志:

[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["93536764-0715-4f18-a8b0-4a06335e2d94"]
[debug] [iOS] Deleting ios session
[debug] [UIAuto] Destroying instruments client socket.
[debug] [UIAuto] Closing socket server.
[debug] [Instruments] Starting shutdown.
[debug] [Instruments] Sending sigterm to instruments
[debug] [UIAuto] Instruments socket server was closed
[debug] [Instruments] [INST] 2016-06-16 09:38:25 +0000 Debug: Running system command #173: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:26 +0000 Debug: Got new command 173 from instruments: au.getElement('1037').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:26 +0000 Debug: evaluating au.getElement('1037').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:26 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:26 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:26 +0000 Debug: Running system command #174: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:27 +0000 Debug: Got new command 174 from instruments: au.getElement('1038').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:27 +0000 Debug: evaluating au.getElement('1038').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:27 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:27 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:27 +0000 Debug: Running system command #175: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:28 +0000 Debug: Got new command 175 from instruments: au.getElement('1039').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:28 +0000 Debug: evaluating au.getElement('1039').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:28 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:28 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:28 +0000 Debug: Running system command #176: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:29 +0000 Debug: Got new command 176 from instruments: au.getElement('1040').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:29 +0000 Debug: evaluating au.getElement('1040').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:29 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:29 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:29 +0000 Debug: Running system command #177: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:30 +0000 Debug: Got new command 177 from instruments: au.getElement('1041').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:30 +0000 Debug: evaluating au.getElement('1041').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:30 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:30 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:30 +0000 Debug: Running system command #178: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:31 +0000 Debug: Got new command 178 from instruments: au.getElement('1042').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:31 +0000 Debug: evaluating au.getElement('1042').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:31 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:31 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:31 +0000 Debug: Running system command #179: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:32 +0000 Debug: Got new command 179 from instruments: au.getElement('1028').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:32 +0000 Debug: evaluating au.getElement('1028').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:32 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:32 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:32 +0000 Debug: Running system command #180: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:33 +0000 Debug: Got new command 180 from instruments: au.getElement('1029').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:33 +0000 Debug: evaluating au.getElement('1029').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:33 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:33 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:33 +0000 Debug: Running system command #181: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:34 +0000 Debug: Got new command 181 from instruments: au.getElement('1030').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:34 +0000 Debug: evaluating au.getElement('1030').isDisplayed()
 [debug] [Instruments] [INST] 2016-06-16 09:38:34 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:34 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:34 +0000 Debug: Running system command #182: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:35 +0000 Debug: Got new command 182 from instruments: au.getElement('1031').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:35 +0000 Debug: evaluating au.getElement('1031').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:35 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:35 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:35 +0000 Debug: Running system command #183: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:36 +0000 Debug: Got new command 183 from instruments: au.getElement('1032').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:36 +0000 Debug: evaluating au.getElement('1032').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:36 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:36 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:36 +0000 Debug: Running system command #184: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:37 +0000 Debug: Got new command 184 from instruments: au.getElement('1033').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:37 +0000 Debug: evaluating au.getElement('1033').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:37 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:37 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:37 +0000 Debug: Running system command #185: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:38 +0000 Debug: Got new command 185 from instruments: au.getElement('1034').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:38 +0000 Debug: evaluating au.getElement('1034').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:38 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:38 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:38 +0000 Debug: Running system command #186: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:39 +0000 Debug: Got new command 186 from instruments: au.getElement('1035').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:39 +0000 Debug: evaluating au.getElement('1035').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:39 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:39 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:39 +0000 Debug: Running system command #187: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":true}...
[debug] [Instruments] [INST] 2016-06-16 09:38:40 +0000 Debug: Got new command 187 from instruments: au.getElement('1036').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:40 +0000 Debug: evaluating au.getElement('1036').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:40 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:40 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:40 +0000 Debug: Running system command #188: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:41 +0000 Debug: Got new command 188 from instruments: au.getElement('1037').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:41 +0000 Debug: evaluating au.getElement('1037').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:41 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-16 09:38:41 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-06-16 09:38:41 +0000 Debug: Running system command #189: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/4x/vy1bbyh92l9czkyswl5wypt80000gn/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [Instruments] [INST] 2016-06-16 09:38:42 +0000 Debug: Got new command 189 from instruments: au.getElement('1038').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:42 +0000 Debug: evaluating au.getElement('1038').isDisplayed()
[debug] [Instruments] [INST] 2016-06-16 09:38:42 +0000 Debug: evaluation finished
4

1 回答 1

1

Ru使用应用程序的调试版本??iOS 需要调试应用程序您是否在 iOS 设备的开发人员选项中启用了 ui 自动化?

看起来像来自 appium 的问题 - Appium Bug

于 2016-07-12T17:48:51.030 回答