Simctl error running 'install'

I have no idea what I’m doing wrong - any help is appreciated!

Running xCode 8.2
iOS 10.2

    [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"newCommandTimeout":999999,"platformName":"iOS","platformVersion":"10.2","deviceName":"iPhone 7","app":"/Users/username/Desktop/framework/app/TestApp.app","locale":"en_US","language":"en","automationName":"XCUITest"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"newCommandTimeout":999999,"platformName":"iOS","platformVersion":"10.2","deviceName":"iPhone 7","app":"/Users/username/Desktop/framework/app/TestApp.app","locale":"en_US","language":"en","automationName":"XCUITest"},null,null,null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1490998032571 (15:07:12 GMT-0700 (PDT))
[Appium] Creating new XCUITestDriver (v2.25.1) session
[Appium] Capabilities:
[Appium]   newCommandTimeout: 999999
[Appium]   platformName: 'iOS'
[Appium]   platformVersion: '10.2'
[Appium]   deviceName: 'iPhone 7'
[Appium]   app: '/Users/username/Desktop/framework/app/TestApp.app'
[Appium]   locale: 'en_US'
[Appium]   language: 'en'
[Appium]   automationName: 'XCUITest'
[debug] [XCUITest] XCUITestDriver version: 2.25.1
[BaseDriver] Session created with session id: 005e1450-e9fa-413b-9172-e833ee768abd
[debug] [XCUITest] Xcode version set to '8.2' (tools v8.2.0.0.1.1480973914)
[debug] [XCUITest] iOS SDK Version set to '10.2'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1490998032798 (15:07:12 GMT-0700 (PDT))
[iOSSim] Constructing iOS simulator for Xcode version 8.2 with udid 'A67FEC41-AE21-4677-ACAD-D0C7CB6CD941'
[XCUITest] Determining device to run tests on: udid: 'A67FEC41-AE21-4677-ACAD-D0C7CB6CD941', real device: false
[BaseDriver] Using local app '/Users/username/Desktop/framework/app/TestApp.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1490998032992 (15:07:12 GMT-0700 (PDT))
[debug] [XCUITest] Checking whether app '/Users/username/Desktop/framework/app/TestApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/username/Desktop/framework/app/TestApp.app': 'com.TestApp.app'
[debug] [BaseDriver] Event 'resetStarted' logged at 1490998032997 (15:07:12 GMT-0700 (PDT))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1490998033094 (15:07:13 GMT-0700 (PDT))
[debug] [iOSLog] Starting iOS 10.2 simulator log capture
[debug] [iOSLog] System log path: /Users/username/Library/Logs/CoreSimulator/A67FEC41-AE21-4677-ACAD-D0C7CB6CD941/system.log
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1490998033210 (15:07:13 GMT-0700 (PDT))
[XCUITest] Setting up simulator
[debug] [iOSSim] Checking whether simulator has been run before
[debug] [iOSSim] Simulator has not been run before
[debug] [iOS] No simulator directories found.
[debug] [iOSSim] Attempting to launch and quit the simulator, to create directory structure
[debug] [iOSSim] Will launch with Safari? false
[iOSSim] Starting simulator with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID A67FEC41-AE21-4677-ACAD-D0C7CB6CD941 -ConnectHardwareKeyboard 0
[iOSSim] Simulator booted in 35822ms
[debug] [iOSSim] Checking whether simulator has been run before
[debug] [iOSSim] Simulator has been run before
[debug] [iOSSim] Killing all iOS Simulators
^[[C[debug] [iOSSim] Using fkill to kill processes: 31863
[debug] [iOS] Setting locale information
[debug] [iOSSim] New language: en
[debug] [iOSSim] No locale updates necessary.
[debug] [iOS] No iOS / app preferences to set
[XCUITest] Simulator with udid 'A67FEC41-AE21-4677-ACAD-D0C7CB6CD941' not booted. Booting up now
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOSSim] Simulator is not running. Continuing...
[iOSSim] Starting simulator with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID A67FEC41-AE21-4677-ACAD-D0C7CB6CD941 -ConnectHardwareKeyboard 0
[debug] [XCUITest] Installing /Users/username/Desktop/framework/app/TestApp.app on Simulator with UUID 'A67FEC41-AE21-4677-ACAD-D0C7CB6CD941'...
[iOSSim] Simulator booted in 20047ms
[debug] [BaseDriver] Event 'simStarted' logged at 1490998100738 (15:08:20 GMT-0700 (PDT))
[simctl] Error: simctl error running 'install': An error was encountered processing the command (domain=MIInstallerErrorDomain, code=34):
Rejecting downgrade of system/internal app com.TestApp.app: installed version is 17.11, proposed version is 17.11
    at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:60:13)
    at simCommand$ (../../lib/simctl.js:26:11)
    at tryCatch (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
 Error: simctl error running 'install': An error was encountered processing the command (domain=MIInstallerErrorDomain, code=34):
Rejecting downgrade of system/internal app com.TestApp.app: installed version is 17.11, proposed version is 17.11
    at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:60:13)
    at simCommand$ (../../lib/simctl.js:26:11)
    at tryCatch (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] Error: simctl error running 'install': An error was encountered processing the command (domain=MIInstallerErrorDomain, code=34):
Rejecting downgrade of system/internal app com.TestApp.app: installed version is 17.11, proposed version is 17.11
    at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:60:13)
    at simCommand$ (../../lib/simctl.js:26:11)
    at tryCatch (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
 Error: simctl error running 'install': An error was encountered processing the command (domain=MIInstallerErrorDomain, code=34):
Rejecting downgrade of system/internal app com.TestApp.app: installed version is 17.11, proposed version is 17.11
    at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:60:13)
    at simCommand$ (../../lib/simctl.js:26:11)
    at tryCatch (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: simctl error running 'install': An error was encountered processing the command (domain=MIInstallerErrorDomain, code=34):
Rejecting downgrade of system/internal app com.TestApp.app: installed version is 17.11, proposed version is 17.11
    at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:60:13)
    at simCommand$ (../../lib/simctl.js:26:11)
    at tryCatch (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Users/username/Desktop/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
/Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/response.rb:71:in `assert_ok': An unknown server-side error occurred while processing the command. Original error: simctl error running 'install': An error was encountered processing the command (domain=MIInstallerErrorDomain, code=34): (Selenium::WebDriver::Error::UnknownError)
Rejecting downgrade of system/internal app com.TestApp.app: installed version is 17.11, proposed version is 17.11
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:78:in `new'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:78:in `create_response'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/default.rb:90:in `request'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/appium_lib-7.0.0/lib/appium_lib/common/patch.rb:118:in `raw_execute'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:122:in `create_session'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:87:in `initialize'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/common/driver.rb:52:in `new'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/common/driver.rb:52:in `for'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver.rb:86:in `for'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/appium_lib-7.0.0/lib/appium_lib/driver.rb:484:in `start_driver'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/appium_console-1.0.4/lib/start.rb:16:in `<top (required)>'
	from /Users/username/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /Users/username/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/pry_class.rb:91:in `block in load_requires'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/pry_class.rb:90:in `each'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/pry_class.rb:90:in `load_requires'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/pry_class.rb:128:in `initial_session_setup'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/cli.rb:206:in `block in <top (required)>'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/cli.rb:83:in `call'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/cli.rb:83:in `block in parse_options'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/cli.rb:83:in `each'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/pry-0.10.2/lib/pry/cli.rb:83:in `parse_options'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/appium_console-1.0.4/lib/appium_console.rb:49:in `<module:Console>'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/appium_console-1.0.4/lib/appium_console.rb:31:in `<module:Appium>'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/appium_console-1.0.4/lib/appium_console.rb:30:in `<top (required)>'
	from /Users/username/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /Users/username/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
	from /Users/username/.rvm/gems/ruby-2.2.1/gems/appium_console-1.0.4/bin/arc:66:in `<top (required)>'
	from /Users/username/.rvm/gems/ruby-2.2.1/bin/arc:23:in `load'
	from /Users/username/.rvm/gems/ruby-2.2.1/bin/arc:23:in `<main>'
	from /Users/username/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
	from /Users/username/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
[HTTP] <-- POST /wd/hub/session 500 72536 ms - 372

I figured it out. I placed my app inside of the simulator folder already to preview, and having the app be within /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications

was not letting appium install it.

1 Like