New Xcode breaks iOS Emulator initiation

I had the same issue before I used the Appium 1.4.11.
Did you set the following?
Select Use External NodeJS Binary to “Your local node bin folder path”
Select Use External Appium Package to “Your Appium Local clone folder path”

I’m seeing the same error that @pavelzagalsky and @snake_King are seeing. Do you have any idea why we might be seeing this ? I tried reading the documentation for running Appium on OSX (running-on-osx.md), but it contains no information regarding this issue. I am using Xcode version 7.0 to build my projects.

Thanks in advance.

Like some others in this thread, I forgot to restart Node. Now I see Appium running in my terminal but it appears that I’ve encountered some other issues as well. I must be on the right track since a few of you said the same thing. Thanks!

Went through all of the suggestions below to get appium 1.4.11. My reset.sh script fails. Can someone post appium.dmg for 1.4.11 please? I have OS X Yosemite 10.10.5 , Xcode 7.0 and command line tools and any other updates suggested were updated

   * Determining platform

* Platform is mac

---- Resetting / Initializing Appium ----

RESETTING NPM

* Installing new or updated NPM modules (including devDeps)

RESETTING GENERAL

* Setting git revision data

RESETTING IOS

---------------------------------------------------

WARNING: you do not appear to have iOS7/8 SDK active

---------------------------------------------------

* Setting iOS config to Appium's version

* Cloning/updating libimobiledevice-macosx

* Copying libimobiledevice-macosx to build

* Cloning/updating deviceconsole

* Building deviceconsole

* Copying deviceconsole to build

RESETTING ANDROID

* Configuring Android bootstrap

---- FAILURE: reset.sh exited with status 1 ----

---- Retry with --verbose to see errors ----

Based on the above result, you are good with iOS reset settings. Could you post the Appium log details if it is not working for iOS?

Trying to execute arc using appium.txt “https://github.com/appium/sample-code/tree/master/sample-code/examples/ruby/arc_ios_catalog”. Changed to match my env
[caps]
platformName = “ios”
deviceName = “iPhone 6s”
platformVersion = “9.0”
app = “…/UICatalog.app.zip”

Anyones-Mac-mini:arc_ios_catalog pmacharl$ arc
/Users/pmacharl/.rvm/gems/ruby-2.0.0-p647/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/response.rb:71:in `assert_ok': Could not find a device to launch. You requested 'iPhone (9.0 Simulator)', but the available devices were: ["iPad 2 (9.0) [53749D48-6190-4DFC-8DF8-CA56F110DF12]","iPad Air (9.0) [3DF15A22-F0F6-4BB1-80EC-27AF9A2D9BE6]","iPad Air 2 (9.0) [7679BF6A-F00E-4465-B3A6-39C83C900254]","iPad Retina (9.0) [B070B8FC-B717-4A2E-BEF6-079359E13C33]","iPhone 4s (9.0) [84FE07C0-D630-4112-A83A-6AEC461FD2C9]","iPhone 5 (9.0) [1787FF71-450B-466A-BAA4-8A8B55EE0B4D]","iPhone 5s (9.0) [3D1E19A3-B1CD-4E36-8DDB-4B162DAA1960]","iPhone 6 (9.0) [B3C53332-9565-4EFA-AA32-3DC0BDAD4842]","iPhone 6 (9.0) + Apple Watch - 38mm (2.0) [5A7426A7-634C-4702-99B0-843ED517D495]","iPhone 6 Plus (9.0) [002BE7DB-A6BA-4C63-9336-F1249689A708]","iPhone 6 Plus (9.0) + Apple Watch - 42mm (2.0) [04DD677D-887C-454B-85BE-3EECDA17F048]","iPhone 6s (9.0) [481537FC-54F3-4552-9F14-FB9E7EA96319]","iPhone 6s Plus (9.0) [0B4BAF0C-B1D9-40CF-B955-0798405B632D]"] (Selenium::WebDriver::Error::WebDriverError)

I don’t see any activity on appium server …But here is the log

Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --debug-log-spacing --platform-version "8.1" --platform-name "iOS" --show-ios-log --default-device

info: Welcome to Appium v1.4.8 (REV c8179bd8352d3c62d98fa58b324491230df9342a)

info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"platformName":"iOS","platformVersion":"8.1","defaultDevice":true,"showIOSLog":true,"defaultCommandTimeout":7200,"debugLogSpacing":true}
info: Console LogLevel: debug

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: <-- GET /wd/hub/status 200 11.405 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: <-- GET /wd/hub/status 200 3.888 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}
info: <-- GET /wd/hub/status 200 1.656 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}
info: <-- GET /wd/hub/status 200 1.449 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}
info: <-- GET /wd/hub/status 200 1.083 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

You have to upgrade your Appium to 1.4.11 to work with iOS9 Simulators. Please check your settings.

I believe my original post was an attempt to upgrade to 1.4.11 as it was said to run reset.sh (after checking out latest appium code base) I did and ran into errors with that. And then you are suggesting me the same again ? Here is the error once again when I run reset.sh

RESETTING ANDROID

* Configuring Android bootstrap

---- FAILURE: reset.sh exited with status 1

---- Retry with --verbose to see errors ----

Note: I am NOT allowed to upgrade node or npm (or its dependencies) on the machine [someone suggested npm install -g [email protected]] as it is shared. Hence looking for a 1.4.11 dmg

I have totally understand your issue, did you continued the remaining steps mentioned in the 1.4.11 upgrade after the error message?. Since your iOS reset looks fine, if you have followed the remaining steps 3-7 it should work.

Hi Sruthi,

When i followed the steps mentioned, after executing ./reset.sh, below is the error faced.

  • Determining platform
  • Platform is mac
    ---- Resetting / Initializing Appium ----
    RESETTING NPM
  • Installing new or updated NPM modules (including devDeps)
    ---- FAILURE: reset.sh exited with status 1 ----
    ---- Retry with --verbose to see errors ----

when execuited ./reset.sh --verbose command,
npm WARN package.json [email protected] No License field.
issues were observed.

Please let me know, where i would be wrong.
Thanks!

Yes that fixed it. I was able to use developer settings, point node to /usr/local/bin/node and appium to appium source code folder.
Appreciate the help. Pasting once again Sruthi’s instructions from above with slight modification.

Here are the steps to re-config your Appium (Mac app/Windows EXE) client point to latest Appium version 1.4.12 (as of data 9/30/2015)

Clone this Appium git to your local git clone https://github.com/appium/appium.git
Once the download is complete, Run reset.sh (It is okay, if you run into “---- FAILURE: reset.sh exited with status 1”)
Open Appium Client
Select “Developer settings” and enable it.
Select Use External NodeJS Binary to “Your local node bin folder path”
Select Use External Appium Package to “Your Appium Local clone folder path”
Start the Appium Server.

@machzqcq,

Also when ./reset.sh is executed, the below logs were not seen in the console.
RESETTING GENERAL

  • Setting git revision data
    RESETTING IOS

WARNING: you do not appear to have iOS7/8 SDK active

  • Setting iOS config to Appium’s version
  • Cloning/updating libimobiledevice-macosx
  • Copying libimobiledevice-macosx to build
  • Cloning/updating deviceconsole
  • Building deviceconsole
  • Copying deviceconsole to build

On my console, the below log statements were only executed.

Determining platform
Platform is mac
---- Resetting / Initializing Appium ----
RESETTING NPM
Installing new or updated NPM modules (including devDeps)
---- FAILURE: reset.sh exited with status 1 ----
---- Retry with --verbose to see errors ----

Something went wrong in my execution? Please let me know your inputs!
Thanks!

After following your instructions I am able to start latest appium from UI but while opening inspector I am getting error
error: Failed to start an Appium session, err was: Error: Could not find a device to launch. You requested ‘iPhone 6 (8.4)’, but the available devices were: ["iPad 2 (9.0)

and here is the message I get while click on Launch appium:
show-ios-log --device-name “iPhone 6”

info: Welcome to Appium v1.4.13 (REV 88e67ce987d78ce44de252219e07dc176a3511c2)

info: Appium REST http interface listener started on 0.0.0.0:4723

Could you confirm the list of devices available by running the following comment on your terminal.

   instruments -s devices

if the list does not have iPhone 6 (8.4), create one using the Xcode add devices option.

1 Like

I got all devices for platform 9.0 for example.
iPhone 6 (9.0) [789B30D7-41DD-47CB-BBF3-50455B2743F5]
From appium UI iOS settings, I can select iphone 6 but max platform is 8.4

Does anyone know how I can fix this iOS Emulator issue?
Thanks.

Steps:

  1. Upgraded to Xcode 7.0.1 and deleted all my 8.4 simulators leaving only the 9.0 simulators.
  2. Upgraded to Appium 1.4.13.
  3. Started the Appium server,
  4. Executed ./bin/ios-webkit-debug-proxy-launcher.js -c uuid:27753 -d.
  5. Opened up the simulator in Xcode.
  6. Ran the iOS simulator script to load Safari browser in the simulator

Actual Results:
When I run my iOS simulator script to launch Safari, it fails to launch Safari on the simulator and produces this error
Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
) (WARNING: The server did not provide any stacktrace information)

info: [debug] Creating new appium session 868f1127-e0a8-4dd2-9084-7e4141922313

info: [debug] Removing any remaining instruments sockets

info: [debug] Cleaned up instruments socket /tmp/instruments_sock

info: [debug] Setting Xcode version

info: [debug] Xcode version set to 7.0.1

info: [debug] Setting iOS SDK Version

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”},“isShuttingDown”:false},“sessionId”:“868f1127-e0a8-4dd2-9084-7e4141922313”}
info: <-- GET /wd/hub/status 200 1.463 ms - 179 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”},“isShuttingDown”:false},“sessionId”:“868f1127-e0a8-4dd2-9084-7e4141922313”}

info: [debug] Cleaning up appium session

error: Could not determine iOS SDK version

info: [debug] Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version

at ChildProcess.exithandler (child_process.js:751:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n)”,“cause”:{“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:"/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version"},“isOperational”:true,“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:"/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version",“origValue”:“Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 9308.575 ms - 525

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 1.138 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 0.675 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 0.698 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 0.935 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 0.653 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 0.771 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 0.659 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 0.822 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}
info: <-- GET /wd/hub/status 200 1.612 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“88e67ce987d78ce44de252219e07dc176a3511c2”}}}

info: --> POST /wd/hub/session {“desiredCapabilities”:{“app”:“safari”,“platformName”:“iOS”,“deviceName”:“iPhone 6”,“platformVersion”:“9.0”}}

info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.8.0_60)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***

info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: [debug] Configuring Safari session
info: [debug] We’re on iOS8+ so not copying mobile safari app
info: [debug] Creating new appium session df61b545-adf4-4d3b-a374-aabc163c4df4
info: [debug] Removing any remaining instruments sockets

info: [debug] Cleaned up instruments socket /tmp/instruments_sock

info: [debug] Setting Xcode version

error: Could not determine iOS SDK version

info: [debug] Xcode version set to 7.0.1
info: [debug] Setting iOS SDK Version
info: [debug] Cleaning up appium session
info: [debug] undefined
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n)”,“cause”:{“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:"/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version"},“isOperational”:true,“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:"/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version",“origValue”:“Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 96.128 ms - 525

error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version

You can manually clear Platform Version and enter the iOS Version based on the simulator or real device availability.

It works thanks a lot :slight_smile:

Thanks, It worked well for the appium App. But when I tried running it from the terminal its showing appium older version. How can I change that ?

Try this

$ npm install -g appium

Or if you want maintain multiple version of appium using avm

$ npm install -g appium-version-manager