user1072692 user1072692 - 1 year ago 151
iOS Question

Appium test - "Sdk 9.3 was not in the list of simctl sdks"

I'm a linux devops guy being forced into doing apple stuff and I'm very lost on everything...

I'm trying to run a test suite for an iPad app and I keep getting this error: "[XCUITest] Error: Sdk '9.3' was not in list of simctl sdks". I know it's a missing dependency, I probably need to install this Sdk 9.3, but I really have no idea how to go about doing that and google is not being helpful at all.

Here's the log trace:

[11:01:58][Step 2/3] [Appium] Creating new XCUITestDriver session
[11:01:58][Step 2/3] [Appium] Capabilities:
[11:01:58][Step 2/3] [Appium] app: '/Volumes/BuildData/teamcity/buildAgent/work/c715626955d98290/.qa_atom/REDACTED.app'
[11:01:58][Step 2/3] [Appium] orientation: 'LANDSCAPE'
[11:01:58][Step 2/3] [Appium] noReset: false
[11:01:58][Step 2/3] [Appium] newCommandTimeout: 9000
[11:01:58][Step 2/3] [Appium] realDeviceLogger: '/Users/REDACTED/projects'
[11:01:58][Step 2/3] [Appium] platformVersion: '9.3'
[11:01:58][Step 2/3] [Appium] automationName: 'XCUITEST'
[11:01:58][Step 2/3] [Appium] platformName: 'iOS'
[11:01:58][Step 2/3] [Appium] deviceName: 'iPad Air 2'
[11:01:58][Step 2/3] [Appium] fullReset: false
[11:01:58][Step 2/3] [Appium] nativeWebTap: true
[11:01:58][Step 2/3] [debug] [XCUITest] XCUITestDriver version: 2.3.0
[11:01:58][Step 2/3] [BaseDriver] Session created with session id: e9d0a596-854e-4dbd-997c-5d12d517e4c8
[11:01:58][Step 2/3] [debug] [XCUITest] Xcode version set to '8.0'
[11:01:59][Step 2/3] [debug] [XCUITest] iOS SDK Version set to '10.0'
[11:02:00][Step 2/3] [XCUITest] Error: Sdk '9.3' was not in list of simctl sdks
[11:02:00][Step 2/3] at getDevices$ (lib/simctl.js:179:13)
[11:02:00][Step 2/3] at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[11:02:00][Step 2/3] at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[11:02:00][Step 2/3] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[11:02:00][Step 2/3] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[11:02:00][Step 2/3] at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:108:47)
[11:02:00][Step 2/3] at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:119:28
[11:02:00][Step 2/3] at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)
[11:02:00][Step 2/3] at nextTickCallbackWith0Args (node.js:452:9)
[11:02:00][Step 2/3] at process._tickCallback (node.js:381:13)
[11:02:00][Step 2/3] [Error: Sdk '9.3' was not in list of simctl sdks]
[11:02:00][Step 2/3] [debug] [XCUITest] Running iOS simulator reset flow
[11:02:00][Step 2/3] [MJSONWP] Encountered internal error running command: Error: Sdk '9.3' was not in list of simctl sdks
[11:02:00][Step 2/3] at getDevices$ (lib/simctl.js:179:13)
[11:02:00][Step 2/3] at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[11:02:00][Step 2/3] at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[11:02:00][Step 2/3] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[11:02:00][Step 2/3] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[11:02:00][Step 2/3] at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:108:47)
[11:02:00][Step 2/3] at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:119:28
[11:02:00][Step 2/3] at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)
[11:02:00][Step 2/3] at nextTickCallbackWith0Args (node.js:452:9)
[11:02:00][Step 2/3] at process._tickCallback (node.js:381:13)

Answer Source

I think it is as simple as opening Xcode and then jump into the preferences to download the simulator with the older OS. Xcode 8 relates to ios 10. Xcode 7.3.x relates to ios 9.3

You might also need to check your appium configs to make sure you dont just need to tell it to use 10.0 instead of 9.3. A simple grep on your repo should help you find that

Another solution would be to download xcode 7.3.1 from Apple at https://developer.apple.com/download/ Then once you install it make sure you do an xcode select from your terminal like:

xcode-select -switch /path/to/new/Xcode.app/Contents/Developer/

Then it should find the older version when you re run your test

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download