Unable to launch Appium for iOS

Hello. It’s time to write post, cause after 2 days of struggling with this error, I’m going mad.

I have problem with launch Appium on:

  • OS X 10.9.4
  • Appium 1.3.6 (GUI, not tried from console yet)
  • Simulator with version: 7.0 or 8.1
  • application: .app (builded by me in XCode) or .ipa (builded by developer who has certs to build it)

Error is always the same:

error: Log capture did not start in a reasonable amount of time
error: Could not pre-launch appium: Error: Log capture did not start in a reasonable amount of time

Appium can close my Simulator, but can’t run it.
If you have any suggestions, I’ll be very glad.

My log:

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --command-timeout “7200” --pre-launch --platform-version “8.1” --platform-name “iOS” --app “my.application” --udid “BF0CF896-400A-4CF8-8501-C4EC41D451BA” --show-ios-log --device-name “iPhone 6 (8DB01BD3-E974-4BA6-AB40-50182BFD8800)”

info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app

info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 16ba937f-5f55-4b88-a5d8-051949721ea4

info: [debug] Removing any remaining instruments sockets

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

info: [debug] Setting Xcode folder

info: [debug] Setting Xcode version

info: [debug] Setting iOS SDK Version

info: [debug] Getting sdk version from xcrun with a timeout

info: [debug] iOS SDK Version set to 8.1

info: [debug] Not checking whether simulator is available since we’re on a real device
info: [debug] Detecting automation tracetemplate

info: [debug] Not auto-detecting udid, running on sim

info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/my.application/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/my.application/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/kusia/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:“/Applications/Appium.app/Contents/Resources/node/bin/node”,“commandProxyClientPath”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js”,“instrumentsSock”:“/tmp/instruments_sock”,“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“grouped”}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

info: [debug] Dynamic bootstrap path: /Users/kusia/Library/Application Support/appium/bootstrap/bootstrap-2911698fabce8e2c.js

info: [debug] Reusing dynamic bootstrap: /Users/kusia/Library/Application Support/appium/bootstrap/bootstrap-2911698fabce8e2c.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iPhone 6 (8DB01BD3-E974-4BA6-AB40-50182BFD8800)”,“platformVersion”:“8.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 6 (8DB01BD3-E974-4BA6-AB40-50182BFD8800) (8.1 Simulator)’

info: [debug] Not setting device type since we’re on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we’re on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons

info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we’re using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole

info: [debug] Cleaning up appium session

error: Log capture did not start in a reasonable amount of time

error: Could not pre-launch appium: Error: Log capture did not start in a reasonable amount of time

Also my Appium iOS Settings:
App Path: path to my .app or .ipa
BundleId: my bundle id
Force device: my simulator, on iOS 7 or iOS 8.1
Platform Version: 7.0 or 8.1
UDID: id of simulator
Show simulator log

General settings:
Prelaunch Application

Other settings are default or not checked.


When I disable prelaunch, server started, but when I click Inspector error is:

Could Not Launch Appium Inspector
Could not start a new session
Be sure the Appium server is running with an application opened by using the “App Path” parameter in Appium.app (along with package and activity for Android) or by connecting with selenium client and supplying this in the desired capabilities object.

in console:

error: Log capture did not start in a reasonable amount of time
error: Failed to start an Appium session, err was: Error: Log capture did not start in a reasonable amount of time
error: Could not initialize ideviceinstaller; make sure it is installed and works on your system.

in log always is something like:

“info: [debug] Not checking whether simulator is available since we’re on a real device”
“info: [debug] Final device string is: ‘iPhone 5 iOS 7 (some id) (7.0 Simulator)’
info: [debug] Not setting device type since we’re on a real device”

so I don’t know, is Appium trying to run my ap on real device (I haven’t real device) or simulator.

remove (for now at least)

 --udid "BF0CF896-400A-4CF8-8501-C4EC41D451BA" 

and replace

--device-name "iPhone 6 (8DB01BD3-E974-4BA6-AB40-50182BFD8800)"

with

 --device-name "iPhone 6"

I can’t do it because I’m not using any script, I try to launch Appium.app (GUI). There is drop-down list, where all my simulators are listed. All these simulators have ids. I deleted this id from selected simulator and uncheck “UDID”. Effect is:

Could Not Launch Appium Inspector
Could not start a new session
Be sure the Appium server is running with an application opened by using the “App Path” parameter in Appium.app (along with package and activity for Android) or by connecting with selenium client and supplying this in the desired capabilities object.

in console:

Launching Appium with command: ‘/Applications/Appium 2.app/Contents/Resources/node/bin/node’ lib/server/main.js --command-timeout “7200” --platform-version “7.0” --platform-name “iOS” --app “myApplication” --show-ios-log --device-name “iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500)”

info: Welcome to Appium v1.3.6 (REV 004f52f249d3513809e7d0734d9205d1fec19f8e)

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

info: [debug] Non-default server args: {“app”:“myApplication”,“deviceName”:“iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500)”,“platformName”:“iOS”,“platformVersion”:“7.0”,“showIOSLog”:true,“defaultCommandTimeout”:7200}
info: Console LogLevel: debug

info: → GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}

info: ← GET /wd/hub/status 200 8.247 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}

info: → GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}

info: ← GET /wd/hub/status 200 3.258 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}

info: → GET /wd/hub/sessions {}

info: [debug] Responding to client with success: {“status”:0,“value”:}
info: ← GET /wd/hub/sessions 200 0.988 ms - 23 {“status”:0,“value”:}
info: → POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“7.0”,“newCommandTimeout”:“999999”,“automationName”:“Appium”,“deviceName”:“iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500)”}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/673.4 Darwin/13.3.0 (x86_64) (MacBookPro8%2C2)
info: [debug] App is an iOS bundle, will attempt to run as pre-existing

info: [debug] Creating new appium session 1ae3f2b9-522a-4cf6-b3df-21e4a475d9c7
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder

info: [debug] Setting Xcode version

info: [debug] Setting iOS SDK Version

info: [debug] Getting sdk version from xcrun with a timeout

info: [debug] iOS SDK Version set to 8.0

info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode 6.0.app/Contents/Developer/usr/bin/instruments

info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.0”,“iOSSDKVersion”:“8.0”,“deviceName”:“iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500)”,“platformVersion”:“7.0”}

info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500) (7.0 Simulator)’

info: [debug] Cleaning up appium session
info: [debug] Error: Could not find a device to launch. You requested ‘iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500) (7.0 Simulator)’, but the available devices were: [“iPad 2 (8.0 Simulator) [943A7599-5AC3-4A47-89FE-6A2B1D971DE2]”,“iPad Air (8.0 Simulator) [74ADF11C-30D1-4788-BB08-B6B96CFB3792]”,“iPad Retina (8.0 Simulator) [5D89C54B-FD2C-4FDF-9097-231117041708]”,“iPhone 4s (8.0 Simulator) [2F88059E-0FB2-47A3-A63C-2BCC47742B06]”,“iPhone 5 (8.0 Simulator) [4D83AB08-625F-4E53-A34E-051D1CDEF727]”,“iPhone 5s (8.0 Simulator) [545A4765-F808-42BE-A416-9A057781942E]”,“iPhone 6 (8.0 Simulator) [BF0CF896-400A-4CF8-8501-C4EC41D451BA]”,“iPhone 6 Plus (8.0 Simulator) [3646BEC6-C424-4DBE-BDB3-341AD9730B76]”]
at noDevicesError (/Applications/Appium 2.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1106:10)
at null. (/Applications/Appium 2.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1112:16)
at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:525:46
at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:254:17
at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:151:21
at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:251:21
at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:615:34
at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:516:25
at /Applications/Appium 2.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:111:7
at ChildProcess.exithandler (child_process.js:735:7)

error: Could not find a device to launch. You requested ‘iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500) (7.0 Simulator)’, but the available devices were: [“iPad 2 (8.0 Simulator) [943A7599-5AC3-4A47-89FE-6A2B1D971DE2]”,“iPad Air (8.0 Simulator) [74ADF11C-30D1-4788-BB08-B6B96CFB3792]”,“iPad Retina (8.0 Simulator) [5D89C54B-FD2C-4FDF-9097-231117041708]”,“iPhone 4s (8.0 Simulator) [2F88059E-0FB2-47A3-A63C-2BCC47742B06]”,“iPhone 5 (8.0 Simulator) [4D83AB08-625F-4E53-A34E-051D1CDEF727]”,“iPhone 5s (8.0 Simulator) [545A4765-F808-42BE-A416-9A057781942E]”,“iPhone 6 (8.0 Simulator) [BF0CF896-400A-4CF8-8501-C4EC41D451BA]”,“iPhone 6 Plus (8.0 Simulator) [3646BEC6-C424-4DBE-BDB3-341AD9730B76]”]

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Could not find a device to launch. You requested ‘iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500) (7.0 Simulator)’, but the available devices were: ["iPad 2 (8.0 Simulator) [943A7599-5AC3-4A47-89FE-6A2B1D971DE2]","iPad Air (8.0 Simulator) [74ADF11C-30D1-4788-BB08-B6B96CFB3792]","iPad Retina (8.0 Simulator) [5D89C54B-FD2C-4FDF-9097-231117041708]","iPhone 4s (8.0 Simulator) [2F88059E-0FB2-47A3-A63C-2BCC47742B06]","iPhone 5 (8.0 Simulator) [4D83AB08-625F-4E53-A34E-051D1CDEF727]","iPhone 5s (8.0 Simulator) [545A4765-F808-42BE-A416-9A057781942E]","iPhone 6 (8.0 Simulator) [BF0CF896-400A-4CF8-8501-C4EC41D451BA]","iPhone 6 Plus (8.0 Simulator) [3646BEC6-C424-4DBE-BDB3-341AD9730B76]"])”,“origValue”:“Could not find a device to launch. You requested ‘iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500) (7.0 Simulator)’, but the available devices were: ["iPad 2 (8.0 Simulator) [943A7599-5AC3-4A47-89FE-6A2B1D971DE2]","iPad Air (8.0 Simulator) [74ADF11C-30D1-4788-BB08-B6B96CFB3792]","iPad Retina (8.0 Simulator) [5D89C54B-FD2C-4FDF-9097-231117041708]","iPhone 4s (8.0 Simulator) [2F88059E-0FB2-47A3-A63C-2BCC47742B06]","iPhone 5 (8.0 Simulator) [4D83AB08-625F-4E53-A34E-051D1CDEF727]","iPhone 5s (8.0 Simulator) [545A4765-F808-42BE-A416-9A057781942E]","iPhone 6 (8.0 Simulator) [BF0CF896-400A-4CF8-8501-C4EC41D451BA]","iPhone 6 Plus (8.0 Simulator) [3646BEC6-C424-4DBE-BDB3-341AD9730B76]"]”},“sessionId”:null}
info: ← POST /wd/hub/session 500 661.240 ms - 1536

error: Failed to start an Appium session, err was: Error: Could not find a device to launch. You requested ‘iPhone 5 iOS 7 (9BB5E703-71D0-452C-8775-8EEEA497E500) (7.0 Simulator)’, but the available devices were: [“iPad 2 (8.0 Simulator) [943A7599-5AC3-4A47-89FE-6A2B1D971DE2]”,“iPad Air (8.0 Simulator) [74ADF11C-30D1-4788-BB08-B6B96CFB3792]”,“iPad Retina (8.0 Simulator) [5D89C54B-FD2C-4FDF-9097-231117041708]”,“iPhone 4s (8.0 Simulator) [2F88059E-0FB2-47A3-A63C-2BCC47742B06]”,“iPhone 5 (8.0 Simulator) [4D83AB08-625F-4E53-A34E-051D1CDEF727]”,“iPhone 5s (8.0 Simulator) [545A4765-F808-42BE-A416-9A057781942E]”,“iPhone 6 (8.0 Simulator) [BF0CF896-400A-4CF8-8501-C4EC41D451BA]”,“iPhone 6 Plus (8.0 Simulator) [3646BEC6-C424-4DBE-BDB3-341AD9730B76]”]

info: → GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}
info: ← GET /wd/hub/status 200 0.905 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}

info: → GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}
info: ← GET /wd/hub/status 200 1.280 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.3.6”,“revision”:“004f52f249d3513809e7d0734d9205d1fec19f8e”}}}

Same issue here.
When I use a simulator, it gives a loop trying to install the app.
I created an issue here on the forum, it’s been watched over 70 times, but no respons yet.

1 Like

Bart_Van_Raemdonck, did you tried run it from any script? Or from console (with Appium as application on node.js server)? Did it work?

Can you upload a screenshot of your iOS settings?

This device is simulator.

Below is what I’d do based on my experience with the Appium GUI App.

  1. either provide app or bundleID - not both. If the app is already installed, untick the App path.
  2. Remove the string after iPhone 5 in the Device name (you can edit the text in the dropdown).
  3. untick UDID since youre using a simulator
  4. platform version - are you sure this is the correct platform version? Isn’t it 7.1?

Once you do the above, click on the apple icon on the appium toolbar -This will save your settings.

If you click outside the window, it will not save your settings.

4 Likes

Things went forward, now it works! Thank you very much, Simon_K!!!

I also re-builded project in Xcode (6.0) get application “.app” from path:
/Users/myuser/Library/Developer/Xcode/DeriviedData/myapp-appid/Build/Products/Debug-iphonesimulator/MyApplication.app

Hi
Could you please upload the screenshot of your iOS settings again? The images seem expired.
I ran into the same problem. Could you please help by sharing your settings?
Thanks!

As per the attached screenshot, facing the same issue. So what changes need to be done

Hi Simon,

I tried your solution but its not working for me. Can you please help me

The below is the image of the error

Hi Guys,

I found the solution. Just change the ip from your local ip to “127.0.0.1”

Could not get list of sessions from Appium Server

Be sure the Appium server is running with an application opened by using the “App Path” parameter in Appium.app (along with package and activity for Android) or by connecting with selenium client and supplying this in the desired capabilities object.

i am unable to start session in my mac

i am getting the above error.
my OS version is : 10.11.2
Xcode: 8.2.1
appium: 1.5.3
iOS: iPhone 6s(10.2.1)

I am also not able to launch Appium Inspector

OS version I am using 10.11.6
xcode Version 8.2.1
appium 1.5.3
android phone 6.0

I got solution

I wanted to launch chrome browser on android device , so set properies on appium GUI on mac like below

It was not worked, then set app path to null and again selected browser and platform and other properties like mentioned in above screenshot
and appium inspector started working.