问题:
使用Apppium1.6启动ios9.3报错Original error: Sdk '9.3.5' was not in list of simctl sdks
我的启动配置如下
{
"platformName": "ios",
"platformVersion": "9.3.5",
"bundleId": "com.wuba.zhuanzhuan",
"app": "/Users/a58/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/zhuanzhuan.app",
"platformName": "ios",
"platformVersion": "9.3.5",
"bundleId": "com.wuba.zhuanzhuan",
"app": "/Users/a58/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/zhuanzhuan.app",
"deviceName": “iPhone 5s",
"automationName": "XCUITest"
}
详细错误日志如下:
[Appium] Creating new XCUITestDriver (v2.30.0) session [Appium] Capabilities: [Appium] app: '/Users/a58/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/zhuanzhuan.app' [Appium] automationName: 'XCUITest' [Appium] bundleId: 'com.wuba.zhuanzhuan' [Appium] deviceName: 'ZhuanZhuan (9.3.5)' [Appium] platformName: 'ios' [Appium] platformVersion: '9.3.5' [Appium] newCommandTimeout: 0 [Appium] connectHardwareKeyboard: true [XCUITest] XCUITestDriver version: 2.30.0 [BaseDriver] Session created with session id: f068f200-be55-4b67-a551-2a79a1ab638a [XCUITest] Xcode version set to '8.3.3' [XCUITest] iOS SDK Version set to '10.3' [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1502536297412 (19:11:37 GMT+0800 (CST)) [XCUITest] Error: Sdk '9.3.5' was not in list of simctl sdks at getDevices$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/node-simctl/lib/simctl.js:230:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at process._tickCallback (internal/process/next_tick.js:103:7) Error: Sdk '9.3.5' was not in list of simctl sdks at getDevices$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/node-simctl/lib/simctl.js:230:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at process._tickCallback (internal/process/next_tick.js:103:7) [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on. [MJSONWP] Encountered internal error running command: Error: Sdk '9.3.5' was not in list of simctl sdks at getDevices$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/node-simctl/lib/simctl.js:230:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at process._tickCallback (internal/process/next_tick.js:103:7)
解决方法:
将"platformVersion": "9.3.5”改为9.3,因为9.3.5确实不存在,所以即使我的ios系统真的是9.3.5,也写9.3就好