Failed to start an Appium session, err was: Error: Instruments crashed on startup

Hi I am new to appium with iOS . When i run the code with all the desi\red capabilities set, i get the following error.:

Failed to start an Appium session, err was: Error: Instruments crashed on startup

I have stared the simulator with other app before running the app.

Please help me out.
I am stuck.
Thanks

1 Like

It is difficult to figure out the problem without the complete logs. Please post the logs of the error. Also, make sure that you have compiled your app for the simulator if you are running it on the simulator.

Also, please add tags to your topic title

1 Like

Hi Pratyush

Thanks for the reply.

Below are the logs of crash

Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1 /Users/ashish/Music/iTunes/iTunes Media/Mobile Applications/bookmyshow 2.4.5/Payload/bookmyshow.app -e UIASCRIPT /Users/ashish/Library/Application Support/appium/bootstrap/bootstrap-3fd3829137e4c5d0.js -e UIARESULTSPATH /tmp/appium-instruments

info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib",“LIB_PATH”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}

info: [debug] And launch timeouts (in ms): {“global”:90000}

info: [debug] [INST STDERR] posix spawn failure; aborting launch (binary == /Users/ashish/Music/iTunes/iTunes Media/Mobile Applications/bookmyshow 2.4.5/Payload/bookmyshow.app/bookmyshow).

Ok. So, Posix spawn failure usually means that either you did not compile your app for the simulator or if you did so, it was not compiled properly.
Make sure that it is compiled properly for the simulator.
Make sure that you are picking the app compiled for simulator and not the one compiled for the real device.

1 Like

Pratyush
Actually I took tge ipa file from iTunes and then extracted it to get app
file.
How can I get app file from iTunes compiled for simulator.Do I need source
code of the application to compile it on simulator. But I believe it is
impossible to get that for an application that has been uploaded on iTunes
Thanks

@Mobile_Automation_Te
As far as I know, you need the source code of the application in order to compile it for the simulator. Getting the ipa file from iTunes and extracting to get .app file won’t work.
You can ask your developers for the source code of the application.

Hi Pratyush

Thanks for your support.

I need to know 1 more thing.
When i compile an app for simulator it gets run over the simulator and an .app file is also build under the products folder. but neither i am able to locate that file in finder nor i am able to copy that file.

And also when i copy the path of file that Xcode gives and use that in appium test script, i always get the bad app error. Please tell me how can i get the app file from Xcode and test that for simulator

Kindly help me get out of this issue.
I am badly stuck.

Thanks

When you compile the project in xcode, make sure that you have selected the appropriate simulator (ipad/iphone) in the top left corner. If device is selected there, it will be compiled for real device.
Once your project is built, a .app file would be generated. It would be lying in your ‘Products’ folder. You can do a right click on it and then ‘show in finder’.
In case you are still not able to access the file, I would suggest you check your OS level permissions. I would suggest you move that file to some other location with global permissions and then provide that path to appium.
Also, if it is giving a bad app error, then you might not have compiled it properly. Make sure that you provided proper provisioning profiles before compiling the project.

I am not even able to copy that file. so how can i change the path of app.

Give proper permission to that folder. That should do the trick. Just ensure that the user that you are logged in with has access to read/write from/to that path.

Thanks Pratyush for your support.

Can you please tell me is it mandatory to have source code of the app in order to test it on ios real device

I have always tried after compiling with source code. I think it might not work just by downloading from the app store as when you compile, you do so with proper provisioning profile, which is a must.

So does this mean we wont be able to test apps like gmail, wattsapp and other ios system apps.

@Mobile_Automation_Te

You must need application.app , one can’t download any_app.ipa and test it.

I’m not sure why as it works fine with any_app.ipk though.

1 Like

I am getting this error too… Don’t know what’s wrong

info: [debug] App is installed.

info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.

info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 058625d85bac3ac57401423cb04c9bef3b6b6106
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 058625d85bac3ac57401423cb04c9bef3b6b6106 com.goodreads.Goodreads -e UIASCRIPT “/Users/mesharma/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}

info: [debug] [INSTSERVER] Instruments exited with code 253

info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iOS Simulator

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID 058625d85bac3ac57401423cb04c9bef3b6b6106
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 058625d85bac3ac57401423cb04c9bef3b6b6106 com.goodreads.Goodreads -e UIASCRIPT “/Users/mesharma/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}

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

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.4”,“revision”:“c8c79a85fbd6870cd6fc3d66d038a115ebe22efe”},“isShuttingDown”:false},“sessionId”:“8556348c-99a0-43ac-8a26-f320d4105f1e”}
info: <-- GET /wd/hub/status 200 0.836 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.4”,“revision”:“c8c79a85fbd6870cd6fc3d66d038a115ebe22efe”},“isShuttingDown”:false},“sessionId”:“8556348c-99a0-43ac-8a26-f320d4105f1e”}

info: [debug] [INSTSERVER] Instruments exited with code 253

info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #2

Hi all,

even i am facing same problem can someone help me out, logs are pasted below.

Enter AppiumTest.setUp()
Enter AppiumTest.startAppiumServer()
Exit AppiumTest.startAppiumServer()
e[36minfoe[39m: Welcome to Appium v1.3.3 (REV 34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78)
e[36minfoe[39m: Appium REST http interface listener started on 127.0.0.1:4723
e[36minfoe[39m: [debug] Non-default server args: {“address”:“127.0.0.1”,“noReset”:true}
e[36minfoe[39m: Console LogLevel: debug
Appium driver port address --> http://127.0.0.1:4723/wd/hub
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“app”:“cisco.MasterFlix”,“platformName”:“ios”,“deviceName”:“iOS”,“udid”:“5336ce7bb0d4355e7f093f7cdfa4f8226840acd3”}}e[39m
e[36minfoe[39m: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
e[36minfoe[39m: [debug] App is an iOS bundle, will attempt to run as pre-existing
e[36minfoe[39m: [debug] Creating new appium session 3506046e-2c5e-44fc-a25b-8c4473c44332
e[36minfoe[39m: [debug] Removing any remaining instruments sockets
e[36minfoe[39m: [debug] Cleaned up instruments socket /tmp/instruments_sock
e[36minfoe[39m: [debug] Setting Xcode folder
e[36minfoe[39m: [debug] Setting Xcode version
e[36minfoe[39m: [debug] Setting iOS SDK Version
e[36minfoe[39m: [debug] Getting sdk version from xcrun with a timeout
e[36minfoe[39m: [debug] iOS SDK Version set to 7.1
e[36minfoe[39m: [debug] Not checking whether simulator is available since we’re on a real device
e[36minfoe[39m: [debug] Detecting automation tracetemplate
e[36minfoe[39m: [debug] Not auto-detecting udid, running on sim
e[36minfoe[39m: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/cisco.MasterFlix/en.lproj/Localizable.strings
e[36minfoe[39m: Will try to parse the plist file as XML
e[36minfoe[39m: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/cisco.MasterFlix/en.lproj/Localizable.strings
e[33mwarne[39m: Could not parse app Localizable.strings; assuming it doesn’t exist
e[36minfoe[39m: [debug] Creating instruments
parseFileSync() is deprecated. Use parseStringSync() instead.
e[36minfoe[39m: [debug] Preparing uiauto bootstrap
e[36minfoe[39m: [debug] Dynamic bootstrap dir: /Users/rajgopal/Library/Application Support/appium/bootstrap
e[36minfoe[39m: [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,“sendKeyStrategy”:“grouped”}
e[36minfoe[39m: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
…
e[36minfoe[39m: [debug] Dynamic bootstrap path: /Users/rajgopal/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js
e[36minfoe[39m: [debug] Reusing dynamic bootstrap: /Users/rajgopal/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js
e[36minfoe[39m: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“5.1”,“iOSSDKVersion”:“7.1”,“deviceName”:“iOS”,“platformVersion”:null}
e[36minfoe[39m: [debug] fixDevice is on
e[36minfoe[39m: [debug] Fixing device. Changed from: “iPhone - Simulator - iOS 7.1” to: “iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1”
e[36minfoe[39m: [debug] Final device string is: ‘iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1’
e[36minfoe[39m: [debug] Not setting device type since we’re on a real device
e[36minfoe[39m: [debug] Checking whether we need to set app preferences
e[36minfoe[39m: [debug] Not setting iOS and app preferences since we’re on a real device
e[36minfoe[39m: [debug] Reset not set, not ending sim or cleaning up app state
e[36minfoe[39m: [debug] Not setting locale because we’re using a real device
e[36minfoe[39m: [debug] No iOS / app preferences to set
e[36minfoe[39m: [debug] Starting iOS device log capture via deviceconsole
e[36minfoe[39m: [debug] Not pre-launching simulator
e[36minfoe[39m: [debug] Creating iDevice object with udid 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3
e[36minfoe[39m: [debug] Couldn’t find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
e[36minfoe[39m: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3 --bundle cisco.MasterFlix
e[36minfoe[39m: [debug] App is installed.
e[36minfoe[39m: [debug] fullReset not requested. No need to install.
e[36minfoe[39m: [debug] Starting command proxy.
e[36minfoe[39m: [debug] Instruments socket server started at /tmp/instruments_sock
e[36minfoe[39m: [debug] Starting instruments
e[36minfoe[39m: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
e[36minfoe[39m: Launching instruments
e[36minfoe[39m: [debug] Attempting to run app on real device with UDID 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3
e[36minfoe[39m: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3 cisco.MasterFlix -e UIASCRIPT “/Users/rajgopal/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
e[36minfoe[39m: [debug] And extra without-delay env: {}
e[36minfoe[39m: [debug] And launch timeouts (in ms): {“global”:90000}
e[36minfoe[39m: [debug] e[33m[INST STDERR] 2015-07-06 17:02:51.668 instruments[1880:52228] Error fetching kdebug eventse[39m
e[36minfoe[39m: [debug] e[90m[INSTSERVER] Instruments exited with code 253e[39m
e[36minfoe[39m: [debug] Killall instruments
e[36minfoe[39m: [debug] Instruments crashed on startup
e[36minfoe[39m: [debug] Attempting to retry launching instruments, this is retry #1
e[36minfoe[39m: [debug] Killall iPhoneSimulator
e[36minfoe[39m: Launching instruments
e[36minfoe[39m: [debug] Attempting to run app on real device with UDID 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3
e[36minfoe[39m: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3 cisco.MasterFlix -e UIASCRIPT “/Users/rajgopal/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
e[36minfoe[39m: [debug] And extra without-delay env: {}
e[36minfoe[39m: [debug] And launch timeouts (in ms): {“global”:90000}
e[36minfoe[39m: [debug] e[33m[INST STDERR] 2015-07-06 17:02:58.374 instruments[1883:52313] Error fetching kdebug eventse[39m
e[36minfoe[39m: [debug] e[90m[INSTSERVER] Instruments exited with code 253e[39m
e[36minfoe[39m: [debug] Killall instruments
e[36minfoe[39m: [debug] Instruments crashed on startup
e[36minfoe[39m: [debug] Attempting to retry launching instruments, this is retry #2
e[36minfoe[39m: [debug] Killall iPhoneSimulator
e[36minfoe[39m: Launching instruments
e[36minfoe[39m: [debug] Attempting to run app on real device with UDID 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3
e[36minfoe[39m: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3 cisco.MasterFlix -e UIASCRIPT “/Users/rajgopal/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
e[36minfoe[39m: [debug] And extra without-delay env: {}
e[36minfoe[39m: [debug] And launch timeouts (in ms): {“global”:90000}
e[36minfoe[39m: [debug] e[33m[INST STDERR] 2015-07-06 17:03:05.077 instruments[1886:52371] Error fetching kdebug eventse[39m
e[36minfoe[39m: [debug] e[90m[INSTSERVER] Instruments exited with code 253e[39m
e[36minfoe[39m: [debug] Killall instruments
e[36minfoe[39m: [debug] Instruments crashed on startup
e[36minfoe[39m: [debug] Attempting to retry launching instruments, this is retry #3
e[36minfoe[39m: [debug] Killall iPhoneSimulator
e[36minfoe[39m: Launching instruments
e[36minfoe[39m: [debug] Attempting to run app on real device with UDID 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3
e[36minfoe[39m: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5336ce7bb0d4355e7f093f7cdfa4f8226840acd3 cisco.MasterFlix -e UIASCRIPT “/Users/rajgopal/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
e[36minfoe[39m: [debug] And extra without-delay env: {}
e[36minfoe[39m: [debug] And launch timeouts (in ms): {“global”:90000}
e[36minfoe[39m: [debug] e[33m[INST STDERR] 2015-07-06 17:03:11.776 instruments[1889:52426] Error fetching kdebug eventse[39m
e[36minfoe[39m: [debug] e[90m[INSTSERVER] Instruments exited with code 253e[39m
e[36minfoe[39m: [debug] Killall instruments
e[36minfoe[39m: [debug] Instruments crashed on startup
e[36minfoe[39m: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
e[36minfoe[39m: [debug] Stopping iOS log capture
e[36minfoe[39m: [debug] Reset not set, not ending sim or cleaning up app state
e[36minfoe[39m: [debug] Cleaning up appium session
e[31merrore[39m: Failed to start an Appium session, err was: Error: Instruments crashed on startup
e[36minfoe[39m: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:387:31)
at null. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
e[36minfoe[39m: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Instruments crashed on startup)”,“origValue”:“Instruments crashed on startup”},“sessionId”:null}

Thanks
Archana

Hi All,

I have the source code took the app from product Harmony.app file still it fail to install the app.
if app is push using xcode it work fine, it look like issue with install the app in to device.

Here is the Appium 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 “7.1.1” --platform-name “iOS” --app “com.logitech.harmonyremote” --udid “13a322d01627e6655e895e7c2c599b51b2c5049f” --show-ios-log --device-name “iPhone 5”

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: {“app”:“com.logitech.harmonyremote”,“udid”:“13a322d01627e6655e895e7c2c599b51b2c5049f”,“deviceName”:“iPhone 5”,“platformName”:“iOS”,“platformVersion”:“7.1.1”,“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.238 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 4.330 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”}}}
info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {“status”:0,“value”:[]}
info: <-- GET /wd/hub/sessions 200 1.118 ms - 23 {“status”:0,“value”:[]}

info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“7.1.1”,“newCommandTimeout”:“999999”,“automationName”:“Appium”,“deviceName”:“iPhone 5”}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/673.6 Darwin/13.4.0 (x86_64) (MacBookAir4%2C2)
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] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session dabd749e-8f1e-4c95-ac3b-50bb042d3f71
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid…
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/com.logitech.harmonyremote/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/com.logitech.harmonyremote/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/logitech/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/logitech/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

info: [debug] Reusing dynamic bootstrap: /Users/logitech/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid 13a322d01627e6655e895e7c2c599b51b2c5049f

info: [debug] App is not installed. Will try to install the app.

info: [debug] Cleaning up appium session

info: [debug] Error: Installing com.logitech.harmonyremote failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Socket. (child_process.js:1183:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:485:12)

error: Failed to start an Appium session, err was: Error: Installing com.logitech.harmonyremote failed

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Installing com.logitech.harmonyremote failed)”,“origValue”:“Installing com.logitech.harmonyremote failed”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 3247.059 ms - 210
info: [IOS_SYSLOG_ROW ] Jul 27 18:50:54 Kumarr mobile_installation_proxy[461] : 0x2c5000 handle_connection: Could not receive request from host.

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.658 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”}}}

info: [IOS_SYSLOG_ROW ] Jul 27 18:51:00 Kumarr wifid[15] : WiFi:[459696060.402155]: WiFiLocaleManagerCheckLocale: location service or wifi is off, set locale to default

info: [IOS_SYSLOG_ROW ] Jul 27 18:51:00 Kumarr wifid[15] : WiFi:[459696060.402850]: new locale: , locale:

Hi Can somebody help me on this .

I am getting same error while running on real iphone device

Logs::
aunching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --session-override --platform-version “8.1” --platform-name “iOS” --app “/Users/itgteam12/Library/Developer/Xcode/DerivedData/SafariLauncher-hayytbhisjpxgtdqbmeewmgwbajg/Build/Products/Debug-iphoneos/SafariLauncher.app” --udid “ca666e295c7cd5a893e376989f3c4a3b24987534” --default-device

info: Welcome to Appium v1.3.4 (REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)

info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {“app”:"/Users/itgteam12/Library/Developer/Xcode/DerivedData/SafariLauncher-hayytbhisjpxgtdqbmeewmgwbajg/Build/Products/Debug-iphoneos/SafariLauncher.app",“udid”:“ca666e295c7cd5a893e376989f3c4a3b24987534”,“sessionOverride”:true,“platformName”:“iOS”,“platformVersion”:“8.1”,“defaultDevice”:true}
info: Console LogLevel: debug

info: --> POST /wd/hub/session {“desiredCapabilities”:{“newCommandTimeout”:“100”,“platformName”:“iOS”,“deviceName”:“iphone6”,“autoLaunch”:“true”,“launchTimeout”:“10000”}}

info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)

warn: Converting cap autoLaunch from string to boolean. This might cause unexpected behavior.

info: [debug] Using local app from command line: /Users/itgteam12/Library/Developer/Xcode/DerivedData/SafariLauncher-hayytbhisjpxgtdqbmeewmgwbajg/Build/Products/Debug-iphoneos/SafariLauncher.app

info: [debug] Creating new appium session 0048202d-cdb5-4d5e-9389-24f7e31240f6

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

parseFileSync() is deprecated. Use parseStringSync() instead.

info: [debug] Could not parse plist file (as binary) at /Users/itgteam12/Library/Developer/Xcode/DerivedData/SafariLauncher-hayytbhisjpxgtdqbmeewmgwbajg/Build/Products/Debug-iphoneos/SafariLauncher.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Users/itgteam12/Library/Developer/Xcode/DerivedData/SafariLauncher-hayytbhisjpxgtdqbmeewmgwbajg/Build/Products/Debug-iphoneos/SafariLauncher.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings; assuming it doesn’t exist
info: [debug] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)
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/itgteam12/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,“sendKeyStrategy”:“grouped”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
…
info: [debug] Dynamic bootstrap path: /Users/itgteam12/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js

info: [debug] Reusing dynamic bootstrap: /Users/itgteam12/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iphone6”,“platformVersion”:“8.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iphone6 (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] Not pre-launching simulator

info: [debug] Creating iDevice object with udid ca666e295c7cd5a893e376989f3c4a3b24987534
info: [debug] Couldn’t find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id ca666e295c7cd5a893e376989f3c4a3b24987534 --bundle Aon.Safari

info: [debug] App is installed.

info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.

info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments

info: [debug] Attempting to run app on real device with UDID ca666e295c7cd5a893e376989f3c4a3b24987534
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w ca666e295c7cd5a893e376989f3c4a3b24987534 Aon.Safari -e UIASCRIPT “/Users/itgteam12/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:10000}

info: [debug] [INST STDERR] 2015-08-04 03:11:33.271 instruments[2096:4e1b] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: [debug] [INST STDERR] 2015-08-04 03:11:35.214 instruments[2096:4e1b] Automation Instrument ran into an exception while trying to run the script. UIAScriptAgentSignaledException

info: [debug] [INST] 2015-08-04 10:11:35 +0000 Fail: An error occurred while trying to run the script.

info: [debug] [INST] Instruments Trace Complete (Duration : 2.447851s; Output : /tmp/appium-instruments/instrumentscli0.trace)

info: [debug] [INSTSERVER] Instruments exited with code 0

info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iOS Simulator

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID ca666e295c7cd5a893e376989f3c4a3b24987534

info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w ca666e295c7cd5a893e376989f3c4a3b24987534 Aon.Safari -e UIASCRIPT “/Users/itgteam12/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:10000}

info: [debug] [INST STDERR] 2015-08-04 03:11:41.601 instruments[2100:5f03] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: [debug] [INST STDERR] 2015-08-04 03:11:42.168 instruments[2100:1307] Automation Instrument ran into an exception while trying to run the script. UIAScriptAgentSignaledException

info: [debug] [INST] 2015-08-04 10:11:42 +0000 Fail: An error occurred while trying to run the script.

info: [debug] [INST] Instruments Trace Complete (Duration : 1.172972s; Output : /tmp/appium-instruments/instrumentscli0.trace)

info: [debug] [INSTSERVER] Instruments exited with code 0

info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #2
info: [debug] Killall iOS Simulator

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID ca666e295c7cd5a893e376989f3c4a3b24987534

info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w ca666e295c7cd5a893e376989f3c4a3b24987534 Aon.Safari -e UIASCRIPT “/Users/itgteam12/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:10000}

info: [debug] [INST STDERR] 2015-08-04 03:11:48.527 instruments[2105:4f23] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: [debug] [INST STDERR] 2015-08-04 03:11:49.168 instruments[2105:4f23] Automation Instrument ran into an exception while trying to run the script. UIAScriptAgentSignaledException

info: [debug] [INST] 2015-08-04 10:11:49 +0000 Fail: An error occurred while trying to run the script.

info: [debug] [INST] Instruments Trace Complete (Duration : 1.151790s; Output : /tmp/appium-instruments/instrumentscli0.trace)

info: [debug] [INSTSERVER] Instruments exited with code 0

info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #3
info: [debug] Killall iOS Simulator

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID ca666e295c7cd5a893e376989f3c4a3b24987534

info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w ca666e295c7cd5a893e376989f3c4a3b24987534 Aon.Safari -e UIASCRIPT “/Users/itgteam12/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:10000}

info: [debug] [INST STDERR] 2015-08-04 03:11:55.610 instruments[2109:1d07] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: [debug] [INST STDERR] 2015-08-04 03:11:56.122 instruments[2109:5d03] Automation Instrument ran into an exception while trying to run the script. UIAScriptAgentSignaledException

info: [debug] [INST] 2015-08-04 10:11:56 +0000 Fail: An error occurred while trying to run the script.

info: [debug] [INST] Instruments Trace Complete (Duration : 1.186516s; Output : /tmp/appium-instruments/instrumentscli0.trace)

info: [debug] [INSTSERVER] Instruments exited with code 0

info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch

info: [debug] Stopping iOS log capture
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

error: Failed to start an Appium session, err was: Error: Instruments crashed on startup

info: [debug] Cleaning up appium session

info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:387:31)
at null. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Instruments crashed on startup)”,“origValue”:“Instruments crashed on startup”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 26084.454 ms - 182

Please try this step: On iOS Device go to Settings>Developer>and Enable UI Automation.