mac系统执行macaca-test-sample报错
-
Macaca Version: 1.1.5
-
Macaca Doctor: Node.js checklist:
node env: /usr/local/bin/node node version: v4.6.0
iOS checklist:
Xcode is installed at:
/Applications/tool/Xcode.app/Contents/DeveloperXcode Command Line Tools is ready, version: 2343. ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxyAndroid checklist:
JAVA version is
1.8.0_102JAVA_HOME is set to/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/HomeANDROID_HOME is set to/Applications/tool/adt-bundle-mac-x86_64-20131030/sdkPlatforms is set to/Applications/tool/adt-bundle-mac-x86_64-20131030/sdk/platforms/android-19Android tools is set to/Applications/tool/adt-bundle-mac-x86_64-20131030/sdk/tools/androidADB tool is set to/Applications/tool/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adbInstalled driver list:
ios: 1.0.38
Platform: mac
- Operate System:mac
- Programming Language:js
macaca run --verbose报错如下: macaca mobile sample
1) "before all" hook 2) "after all" hook0 passing (1s)
2 failing
macaca mobile sample "before all" hook: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Applications/code/macaca-test-sample/app/ios-app-bootstrap.zip"})] getaddrinfo ENOTFOUND localhost localhost:3456 Error: getaddrinfo ENOTFOUND localhost localhost:3456 at errnoException (dns.js:27:10) at GetAddrInfoReqWrap.onlookup as oncomplete
macaca mobile sample "after all" hook: [quit()] getaddrinfo ENOTFOUND localhost localhost:3456 Error: getaddrinfo ENOTFOUND localhost localhost:3456 at errnoException (dns.js:27:10) at GetAddrInfoReqWrap.onlookup as oncomplete
Test completed!
端口占用啦?
@xudafeng 端口没有占用 我刚看了下上面的日志 漏了 重新跑了下
mac:macaca-test-sample mac$ macaca run -d macaca-test/macaca-mobile-browser-sample.test.js --verbose
>> request.js:23:12 [master] pid:521 get remote update info failed.
>> index.js:17:12 [master] pid:526 webdriver server start with config:
{ port: 3456,
ip: '172.31.218.249',
host: 'mac.local',
loaded_time: '2016-10-18 15:33:55' }
>> middlewares.js:17:10 [master] pid:526 base middlewares attached
>> router.js:129:10 [master] pid:526 router set
>> webdriver sdk launched
>>
>>
>> macaca mobile sample
>> responseHandler.js:11:12 [master] pid:526 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"10.0","deviceName":"iPhone 5s","browserName":"Safari"}}
>> session.js:47:10 [master] pid:526 Creating session, sessionId: 5ddf4a83-d2d3-481d-9326-666d9eb67e05.
>> macaca-ios.js:189:10 [master] pid:526 Get available devices [{"name":"iPhone 5","udid":"3ABA49D7-F607-41AD-8812-B05EBF32F8D5","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 5s","udid":"F2608289-32A7-47BD-A147-C00072B17B0C","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6","udid":"31E5C21F-1524-4906-B1DF-F860588FA011","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6 Plus","udid":"7FFD96EC-3B66-45EF-87BF-B917724CF7B2","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6s","udid":"7826246A-7008-46E9-87A8-32458AA3CD30","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6s Plus","udid":"CBACB8AD-2152-4DF5-95EA-E517421F8437","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 7","udid":"23AD0DFD-6AD7-47E2-9155-534EFFEB38A3","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 7 Plus","udid":"07672758-B92E-4D3A-BB13-1805FF840646","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone SE","udid":"F256001E-9A08-421D-B21E-FEF6AA2C29C8","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPad Retina","udid":"CA1A58E7-06FF-4379-85BC-9CD629F45D15","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPad Air","udid":"EA117FFC-C817-4A38-BC5B-664367D10E9B","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPad Air 2","udid":"B43EEFF8-23B7-400C-9BED-44FED333BF5B","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"Apple TV 1080p","udid":"E09DC03A-3B01-46F4-A1FF-2063B16FEE0B","state":"Shutdown","available":true,"runtime":"tvOS 10.0"},{"name":"Apple Watch - 38mm","udid":"3CEC4400-711D-44D4-89CC-DA1D35510774","state":"Shutdown","available":true,"runtime":"watchOS 3.0"},{"name":"Apple Watch - 42mm","udid":"E90ED5BE-B3CD-46A9-A8FF-EFD018FD5825","state":"Shutdown","available":true,"runtime":"watchOS 3.0"},{"name":"Apple Watch Series 2 - 38mm","udid":"666A3536-23A7-4002-8300-F9D3D9D8F48B","state":"Shutdown","available":true,"runtime":"watchOS 3.0"},{"name":"Apple Watch Series 2 - 42mm","udid":"134BF95C-0513-4A62-91AB-76A23ECA07DC","state":"Shutdown","available":true,"runtime":"watchOS 3.0"}]
>> macaca-ios.js:228:12 [master] pid:526 Kill simulator failed Error: Command failed: /bin/sh -c killAll Simulator
No matching processes belonging to you were found
>> macaca-ios.js:234:12 [master] pid:526 Shutdown simulator F2608289-32A7-47BD-A147-C00072B17B0C failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "F2608289-32A7-47BD-A147-C00072B17B0C"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to shutdown device in current state: Shutdown
>> xctest-client.js:43:14 [master] pid:526 project path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
>> macaca-ios.js:133:10 [master] pid:526 {
"bundleId": "com.apple.mobilesafari",
"platformName": "iOS",
"platformVersion": "10.0",
"browserName": "Safari"
}
>> xctest-client.js:183:12 [master] pid:526 xcode version: 8.0
>> WebDriverAgent version: 1.0.28
>> xctest-client.js:156:14 [master] pid:526 2016-10-18 15:34:11.369 xcodebuild[630:7008] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-drmzhetqodgefhaqpyureuezairh/Logs/Test/A324BF71-8E85-4C61-95F3-8731C2B0855F/Session-WebDriverAgentRunner-2016-10-18_153411-ghi98L.log
>> xctest-client.js:156:14 [master] pid:526 2016-10-18 15:34:11.370 xcodebuild[630:6966] [MT] IDETestOperationsObserverDebug: (AB7BD95C-4BCF-458B-9E1F-1FC6D4EB6E02) Beginning test session WebDriverAgentRunner-AB7BD95C-4BCF-458B-9E1F-1FC6D4EB6E02 at 2016-10-18 15:34:11.368 with Xcode 8A218a on target <DVTiPhoneSimulator: 0x7f91e78226d0> {
SimDevice: SimDevice : iPhone 5s (F2608289-32A7-47BD-A147-C00072B17B0C) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-5s } runtime={ SimRuntime : 10.0 (14A345) - com.apple.CoreSimulator.SimRuntime.iOS-10-0 }
} (10.0 (14A345))
>> proxy.js:54:14 [master] pid:526 Proxy: /session:POST to http://172.31.218.249:8100/session:POST with body: {"desiredCapabilities":{"bundleId":"com.apple.mobilesafari"}}
>> responseHandler.js:54:12 [master] pid:526 Send Error Respone to Client: Error: Command failed: /bin/sh -c xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/"
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.apple.mobilesafari" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
>> responseHandler.js:60:14 [master] pid:526 Error: Command failed: /bin/sh -c xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/"
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.apple.mobilesafari" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Error: Command failed: /bin/sh -c xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/"
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.apple.mobilesafari" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
>>
>> 1) "before all" hook
>> responseHandler.js:11:12 [master] pid:526 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
>> responseHandler.js:23:14 [master] pid:526 Send HTTP Respone to Client: 405 Method Not Allowed
>>
>> 2) "after all" hook
>>
>>
>> 0 passing (37s)
>> 2 failing
>>
>> 1) macaca mobile sample "before all" hook:
Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"10.0","deviceName":"iPhone 5s","browserName":"Safari"})] The environment you requested was unavailable.
at node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/webdriver.js:134:15
at Request._callback (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
at endReadableNT (_stream_readable.js:921:12)
>> 2) macaca mobile sample "after all" hook:
Error: [quit()] Unexpected data in simpleCallback.
at exports.newError (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/utils.js:139:13)
at null.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/callbacks.js:42:12)
at cb (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/webdriver.js:165:22)
at node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/webdriver.js:179:5
at Request._callback (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
at endReadableNT (_stream_readable.js:921:12)
>>
>> Test completed!
mac:macaca-test-sample mac$
xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/" 这个你可以直接运行吗
@zenzhu 不能
mac:changshutest mac$ xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/"
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.apple.mobilesafari" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
你是不是模拟器有什么特别设置 这是 苹果默认的命令 你手动打开模拟试试
@zenzhu 没有特别设置的 手工打开模拟意思是?
@zenzhu 我把模拟器重置reset content and setting成功后,执行xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/" 是ok的,可以执行,但是一旦跑macaca run -d macaca-test/macaca-mobile-browser-sample.test.js --verbose就不行 但是模拟器中的webdriver是安装成功的
那你报的错 还是上面的错吗
@zenzhu 是的 还是一样的
@CodeToSurvive1 这个问题暂时搁置一下,好像是 iOS 10 的问题。
@zenzhu 不好意思 我昨天看这个issue以为是我那个 就在这个下面评论了 实际上我提的issue相同的问题是 https://github.com/alibaba/macaca/issues/261
@zenzhu 我也遇到了这个问题
运行环境是IOS10 Xcode8
webdriver已经安装成功,多次尝试打开webdriver,闪退
引用@CodeToSurvive1: 我把模拟器重置reset content and setting成功后,执行xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/" 是ok的,可以执行,但是一旦跑macaca run -d macaca-test/macaca-mobile-browser-sample.test.js --verbose就不行 但是模拟器中的webdriver是安装成功的
esponseHandler.js:54:12 [master] pid:7757 Send Error Respone to Client: Error: Command failed: xcrun simctl openurl "010B5272-C069-4D11-B22A-D121DD55DCF4" "http://macacajs.github.io/macaca/" An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1): The request to open "com.apple.mobilesafari" failed. The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
responseHandler.js:60:14 [master] pid:7757 Error: Command failed: xcrun simctl openurl "010B5272-C069-4D11-B22A-D121DD55DCF4" "http://macacajs.github.io/macaca/" An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1): The request to open "com.apple.mobilesafari" failed. The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Error: Command failed: xcrun simctl openurl "010B5272-C069-4D11-B22A-D121DD55DCF4" "http://macacajs.github.io/macaca/" An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1): The request to open "com.apple.mobilesafari" failed. The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
1) "before all" hookresponseHandler.js:11:12 [master] pid:7757 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {} responseHandler.js:23:14 [master] pid:7757 Send HTTP Respone to Client: 405 Method Not Allowed responseHandler.js:11:12 [master] pid:7757 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {} responseHandler.js:23:14 [master] pid:7757 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook0 passing (59s)
2 failing
macaca mobile sample "before all" hook: Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"10.0","deviceName":"iPhone 7","browserName":"Safari"})] The environment you requested was unavailable. at node_modules/macaca-wd/wd/lib/webdriver.js:134:15 at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7) at Request.self.callback (node_modules/request/request.js:368:22) at Request.
(node_modules/request/request.js:1219:14) at IncomingMessage. (node_modules/request/request.js:1167:12) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) macaca mobile sample "after all" hook: Error: [quit()] Unexpected data in simpleCallback. at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13) at .
(node_modules/macaca-wd/wd/lib/callbacks.js:42:12) at cb (node_modules/macaca-wd/wd/lib/webdriver.js:165:22) at node_modules/macaca-wd/wd/lib/webdriver.js:179:5 at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7) at Request.self.callback (node_modules/request/request.js:368:22) at Request. (node_modules/request/request.js:1219:14) at IncomingMessage. (node_modules/request/request.js:1167:12) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)
macaca doctor
macaca-doctor version: 1.0.23
Node.js checklist:
node env: /usr/local/bin/node node version: v4.5.0
iOS checklist:
Xcode is installed at: /Applications/Xcode.app/Contents/Developer
Xcode Command Line Tools is ready, version: 2345.1.
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy
Android checklist:
JAVA version is 1.8.0_101
JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
ANDROID_HOME is set to /usr/local/opt/android-sdk
platforms directory is not exist
Installed driver list:
electron: 1.1.4 ios: 1.0.40
request.js:24:12 [master] pid:13268 get remote update info failed. index.js:17:12 [master] pid:13269 webdriver server start with config: { port: 3456, verbose: false, always: true, window: true, ip: '192.168.1.64', host: 'VeradeMacBook-Pro.local', loaded_time: '2016-11-03 15:18:53' } middlewares.js:17:10 [master] pid:13269 base middlewares attached router.js:129:10 [master] pid:13269 router set webdriver sdk launched
macaca mobile sample
responseHandler.js:11:12 [master] pid:13269 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/vera/macaca-test-sample/app/ios-app-bootstrap.zip"}} session.js:47:10 [master] pid:13269 Creating session, sessionId: 119fe3df-a61d-4979-be8c-dc991d9f6cae. helper.js:196:12 [master] pid:13269 Unzipping local app form /Users/vera/macaca-test-sample/app/ios-app-bootstrap.zip macaca-ios.js:194:10 [master] pid:13269 Get available devices [{"name":"iPhone 4s","udid":"325BC920-7776-449E-961D-5715BD78BE2C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"4B6F06C2-9125-451C-807E-9A0B92CE6A38","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"689FF5FD-0B58-484F-938A-209D02E78260","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"49418923-1439-4E95-99FE-3CF8950095DF","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"9ED0F1A7-2DF6-4092-8A3B-CDEE4929CE80","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"F419492A-CAC5-4A67-9856-D9AB21B1F339","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"521CADC2-626A-477E-9387-92EFA001DB1B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"8B5AEB6A-613F-41F0-8926-CB7EA535BE4A","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"0A34F3EF-468A-4DC5-9CD7-98DB357B8E6F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"88130E38-B512-415E-B86C-03BE1A06001B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"1FF90588-6763-4EF3-BF6C-2E0DE17012C7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"AF9EB2DB-8C8C-4DFB-92DB-DC5D21BCEA36","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"958AB352-E51B-4F2C-BE19-3DFB707260CD","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone 5s","udid":"FAE1C388-0874-4DE6-8309-0099E54CBC4D","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone 6","udid":"D604AF53-77F1-4323-9B14-7055ECCA40A5","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone 6 Plus","udid":"62FA5269-3F1D-4D4F-B659-6677BC8C124F","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone 6s","udid":"31AF9854-5F84-4033-8F84-CBB3B80BE1E9","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone 6s Plus","udid":"5EA04CC0-0AB5-4CA9-B0D1-08F3F10FF272","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone 7","udid":"19B907B3-08B6-46CF-B6FB-3DBC1FA93C14","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone 7 Plus","udid":"90A95CE4-DD0C-4B38-BD2A-E96821E26C02","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPhone SE","udid":"5879488F-80E8-420B-9551-F2173E23E6C0","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPad Retina","udid":"2E7F0FC7-304B-4B09-810B-86AAFADB9143","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPad Air","udid":"44BAEE9A-B7EC-44B3-B669-B949CAE0F333","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"iPad Air 2","udid":"05014E99-AC84-4565-B451-AAED96F9D6CC","state":"Shutdown","available":true,"runtime":"iOS 10.1"},{"name":"Apple TV 1080p","udid":"3F388066-0A20-4C1D-8831-4FE10C7EDE0C","state":"Shutdown","available":true,"runtime":"tvOS 10.0"},{"name":"Apple Watch - 38mm","udid":"EDCBF8C6-625A-45FC-BEE4-D3C100EBB299","state":"Shutdown","available":true,"runtime":"watchOS 3.1"},{"name":"Apple Watch - 42mm","udid":"DDB63570-A012-4F7F-9016-BDF0703D1751","state":"Shutdown","available":true,"runtime":"watchOS 3.1"},{"name":"Apple Watch Series 2 - 38mm","udid":"6210729F-0E1F-4077-B300-3C58570DBD43","state":"Shutdown","available":true,"runtime":"watchOS 3.1"},{"name":"Apple Watch Series 2 - 42mm","udid":"0B781863-B26A-4439-B58B-DA1A724AD40F","state":"Shutdown","available":true,"runtime":"watchOS 3.1"}] CFBundleIdentifier is xudafeng.ios-app-bootstrap Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist macaca-ios.js:237:12 [master] pid:13269 Shutdown simulator FAE1C388-0874-4DE6-8309-0099E54CBC4D failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "FAE1C388-0874-4DE6-8309-0099E54CBC4D" An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163): Unable to shutdown device in current state: Shutdown
responseHandler.js:54:12 [master] pid:13269 Send Error Respone to Client: Error: Simulator FAE1C388-0874-4DE6-8309-0099E54CBC4D is not booted. responseHandler.js:60:14 [master] pid:13269 Error: Simulator FAE1C388-0874-4DE6-8309-0099E54CBC4D is not booted. at /usr/local/lib/node_modules/macaca-ios/lib/macaca-ios.js:254:20 at process._tickCallback (node.js:369:9)
Error: Simulator FAE1C388-0874-4DE6-8309-0099E54CBC4D is not booted. at /usr/local/lib/node_modules/macaca-ios/lib/macaca-ios.js:254:20 at process._tickCallback (node.js:369:9)
1) "before all" hookresponseHandler.js:11:12 [master] pid:13269 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {} responseHandler.js:23:14 [master] pid:13269 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook0 passing (35s)
2 failing
macaca mobile sample "before all" hook: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/vera/macaca-test-sample/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable. Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] The environment you requested was unavailable. at node_modules/macaca-wd/wd/lib/webdriver.js:134:15 at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7) at Request.self.callback (node_modules/request/request.js:368:22) at Request.
(node_modules/request/request.js:1219:14) at IncomingMessage. (node_modules/request/request.js:1167:12) at endReadableNT (_stream_readable.js:921:12) macaca mobile sample "after all" hook: Error: [quit()] Unexpected data in simpleCallback. at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13) at null.
(node_modules/macaca-wd/wd/lib/callbacks.js:42:12) at cb (node_modules/macaca-wd/wd/lib/webdriver.js:165:22) at node_modules/macaca-wd/wd/lib/webdriver.js:179:5 at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7) at Request.self.callback (node_modules/request/request.js:368:22) at Request. (node_modules/request/request.js:1219:14) at IncomingMessage. (node_modules/request/request.js:1167:12) at endReadableNT (_stream_readable.js:921:12) Test completed!
我是直接git下来的sample代码,可以运行桌面,但是不能运行iOS,求助 每次运行,不知为何自动打开的 iPhone SE 10.1 模拟器
升级iOS驱动,参考 https://testerhome.com/topics/6314
@zenzhu @xudafeng 这个问题是否有进展呢?
10.x的系统可以运行啊
ios 10.1 iPhone 6 还是不行,出现的问题跟上面的一样
我本地 driver 的版本:
Installed driver list:
android: 1.1.1
chrome: 1.0.5
electron: 1.1.4
ios: 1.0.43
@xudafeng
升级ios驱动