Android UiAutomation not connected! Appium 1.17.1-1 - appium

We are trying to Appium session using the following capability.
[debug] [35m[BaseDriver] [39m "deviceName": "8C4Y14QBGA",
[debug] [35m[BaseDriver] [39m "newCommandTimeout": "1800",
[debug] [35m[BaseDriver] [39m "automationName": "UiAutomator2",
[debug] [35m[BaseDriver] [39m "app": "/process/uploads/20200609131058_nqx3Q.apk",
[debug] [35m[BaseDriver] [39m "platformName": "android",
[debug] [35m[BaseDriver] [39m "platformVersion": "9",
[debug] [35m[BaseDriver] [39m "connectHardwareKeyboard": "true"
We are using Java Appium client library to create session with the above capability and we are getting an error while taking a screenshot "UiAutomation not connected!"
Here is the Appium error log.
[debug] [35m[MJSONWP (3128a38e)][39m Calling AppiumDriver.getScreenshot() with args: ["3128a38e-d465-4c28-bba5-f9977abd4150"]
[debug] [35m[WD Proxy][39m Matched '/screenshot' to command name 'getScreenshot'
[debug] [35m[WD Proxy][39m Proxying [GET /screenshot] to [GET http://127.0.0.1:8200/wd/hub/session/be4490f0-7be9-48cd-bcae-6a32ed9359c0/screenshot] with no body[35m[WD Proxy][39m Got response with status 500: {"sessionId":"be4490f0-7be9-48cd-bcae-6a32ed9359c0","value":{"error":"unknown error","message":"java.lang.IllegalStateException: UiAutomation not connected!","stacktrace":"java.lang.IllegalStateException: UiAutomation not connected!\n\tat android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.java:1112)\n\tat android.app.UiAutomation.takeScreenshot(UiAutomation.java:709)\n\tat io.appium.uiautomator2.utils.ScreenshotHelper.takeDeviceScreenshot(Unknown Source:169)\n\tat io.appium.uiautomator2.utils.ScreenshotHelper.takeScreenshot(Unknown Source:7)\n\tat io.appium.uiautomator2.utils.ScreenshotHelper.takeScreenshot(Unknown Source:1)\n\tat io.appium.uiautomator2.handler.CaptureScreenshot.safeHandle(Unknown Source:11)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(Unknown Source:0)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(Unknown Source:23)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(Unknown Source:57)\n\tat io.appium.uiautomator2.ht...
[debug] [35m[W3C][39m Matched W3C error code 'unknown error' to UnknownError
[debug] [35m[MJSONWP (3128a38e)][39m Encountered internal error running command: An unknown server-side error occurred while processing the command. Original error: java.lang.IllegalStateException: UiAutomation not connected!
[debug] [35m[MJSONWP (3128a38e)][39m java.lang.IllegalStateException: UiAutomation not connected!

Appium will not take screen shots if FLAG_SECURE is enabled for your app for security purposes. Ask the developer to give you an app with the setting disabled.
Also, to eliminate the possibility of a problem with the latest appium release 1.17.1-1, please try taking screenshot with appium version v1.16.0 and share your results.

Related

Getting error as xcodebuild failed with code 65 Event 'wdaStartFailed'

Hi getting below error while running appium automation sript for ios device using xcode 14.I tried all th possible solutions but no luck so far.
As per below link there is a changes in xcode 14 which support only appium 2,but before trying appium 2 i wanted to confirm once whether this is the actual root cause or there is any other config issue https://forum.katalon.com/t/failed-to-build-webdriveragent-to-deployed-on-ios-16/78524
Below is the complete appium log
[info] [35m[Appium][39m Appium v1.22.0 creating new XCUITestDriver (v3.53.1) session
[info] [35m[Appium][39m Applying relaxed security to 'XCUITestDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] [35m[BaseDriver][39m Creating session with W3C capabilities: {
[debug] [35m[BaseDriver][39m "alwaysMatch": {
[debug] [35m[BaseDriver][39m "platformName": "ios",
[debug] [35m[BaseDriver][39m "appium:VERSION": "15.6.1",
[debug] [35m[BaseDriver][39m "appium:automationName": "XCUITest",
[debug] [35m[BaseDriver][39m "appium:bundleId": "com.mobisy.bizom",
[debug] [35m[BaseDriver][39m "appium:deviceName": "Bizom Iphone",
[debug] [35m[BaseDriver][39m "appium:udid": "00008110-001475EE0C80401E",
[debug] [35m[BaseDriver][39m "appium:xcodeOrgId": "CM3KB1234",
[debug] [35m[BaseDriver][39m "appium:xcodeSigningId": "iPhone Developer"
[debug] [35m[BaseDriver][39m },
[debug] [35m[BaseDriver][39m "firstMatch": [
[debug] [35m[BaseDriver][39m {}
[debug] [35m[BaseDriver][39m ]
[debug] [35m[BaseDriver][39m }
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up[error] [35m[WebDriverAgent][39m xcodebuild exited with code '65' and signal 'null'
[info] [35m[WebDriverAgent][39m Launching WebDriverAgent on the device
[info] [35m[WebDriverAgent][39m WebDriverAgent does not need a cleanup. The sources are up to date (1644399105000 >= 1632535255000)
[debug] [35m[WebDriverAgent][39m Killing running processes 'xcodebuild.*00008110-001475EE0C80401E' for the device 00008110-001475EE0C80401E...[debug] [35m[WebDriverAgent][39m 'pgrep -if xcodebuild.*00008110-001475EE0C80401E' didn't detect any matching processes. Return code: 1
[debug] [35m[WebDriverAgent][39m Using Xcode configuration file: '/var/folders/nt/rb3yh81n7m543x9rl4996v7c0000gp/T/202303-842-1lzs80g.e5g4/appium-temp.xcconfig'
[debug] [35m[WebDriverAgent][39m Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/divya.p/Library/Developer/Xcode/DerivedData/WebDriverAgent-aghlrsejdreqngftgvcqwnjgrbou -destination id=00008110-001475EE0C80401E IPHONEOS_DEPLOYMENT_TARGET=15.6 -xcconfig /var/folders/nt/rb3yh81n7m543x9rl4996v7c0000gp/T/202303-842-1lzs80g.e5g4/appium-temp.xcconfig GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent'
[debug] [35m[WebDriverAgent][39m Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[info] [35m[WD Proxy][39m socket hang up[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up
[error] [35m[WebDriverAgent][39m xcodebuild exited with code '65' and signal 'null'
[debug] [35m[BaseDriver][39m Event 'wdaStartFailed' logged at 1672738945363 (15:12:25 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] [35m[XCUITest][39m xcodebuild error message:
[debug] [35m[XCUITest][39m . Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[warn] [35m[XCUITest][39m Quitting and uninstalling WebDriverAgent
[info] [35m[WebDriverAgent][39m Shutting down sub-processes[debug] [35m[WebDriverAgent][39m Uninstalling WDAs: 'com.mobisy.bizom.xctrunner'[error] [35m[XCUITest][39m {}
[info] [35m[DevCon Factory][39m Releasing connections for 00008110-001475EE0C80401E device on any port number
[info] [35m[DevCon Factory][39m Found cached connections to release: ["00008110-001475EE0C80401E:8100"]
[info] [35m[DevCon Factory][39m Releasing the listener for '00008110-001475EE0C80401E:8100'
[debug] [35m[iProxy#00008110:8100][39m Closing the connection
[debug] [35m[DevCon Factory][39m Cached connections count: 0
[debug] [35m[XCUITest][39m Not clearing log files. Use `clearSystemFiles` capability to turn on.
[info] [35m[iProxy#00008110:8100][39m The connection has been closed

Appium Desktop terminates after booting ios simulator

I'm trying to inspect the elements of the IntegrationApp.app that comes with the WebDriverAgent project. I built the app on a simulator in xcode but when I:
Open Appium Desktop (v1.15.1) on my MAC (v10.14.6)
Start the server
Select Start Inspector Session magnifying glass icon in the top right corner of the appium window
Provide the following capability set:
{
"automationName": "XCUITest",
"platformName": "iOS",
"deviceName": "iPad Air (3rd generation)",
"platformVersion": "13.1",
"app": "/Users/[MAC_USER]/Desktop/IntegrationApp.app"
}
Start the session
The simulator boots up and then Appium Desktop terminates leaving the ios simulator open without the app being installed. Has anyone encountered similar issues? Any thoughts what could be causing the issue? When running xcrun simctl list it lists the model. Below are the appium logs:
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1574244116561 (10:01:56 GMT+0000 (GMT))
[info] [Appium] Appium v1.15.1 creating new XCUITestDriver (v2.133.1) session
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {
[debug] [BaseDriver] "app": "/Users/testuser/Desktop/IntegrationApp.app",
[debug] [BaseDriver] "automationName": "XCUITest",
[debug] [BaseDriver] "deviceName": "iPad Air (3rd generation)",
[debug] [BaseDriver] "platformName": "iOS",
[debug] [BaseDriver] "platformVersion": "13.1",
[debug] [BaseDriver] "newCommandTimeout": 0,
[debug] [BaseDriver] "connectHardwareKeyboard": true
[debug] [BaseDriver] }
[info] [BaseDriver] Session created with session id: ba3f0114-0bfa-4e5a-8bb8-ee1d30e62166[debug] [XCUITest] Current user: 'testuser'
[info] [HTTP] [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
[info] [HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getSessions() with args: []
[debug] [GENERIC] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 5 ms - 40
[info] [HTTP]
[info] [XCUITest] iOS SDK Version set to '13.2'[info] [iOSSim] Constructing iOS simulator for Xcode version 11.2.1 with udid 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[info] [XCUITest] Determining device to run tests on: udid: 'C360E349-1255-4D96-B146-13D1FD3ACDF5', real device: false
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1574244119170 (10:01:59 GMT+0000 (GMT))
[info] [BaseDriver] Using local app '/Users/testuser/Desktop/IntegrationApp.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1574244119174 (10:01:59 GMT+0000 (GMT))
[debug] [XCUITest] Checking whether app '/Users/testuser/Desktop/IntegrationApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/testuser/Desktop/IntegrationApp.app': 'com.demo2019.IntegrationApp'
[debug] [BaseDriver] Event 'resetStarted' logged at 1574244119179 (10:01:59 GMT+0000 (GMT))[info] [XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1574244119388 (10:01:59 GMT+0000 (GMT))[warn] [XCUITest] Continuing without capturing device logs: iOS Simulator with udid C360E349-1255-4D96-B146-13D1FD3ACDF5 is not running
[info] [XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOS] Setting did not need to be updated
[debug] [iOSSim] Setting preferences of C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator to {"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Updated C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator preferences at '/Users/testuser/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"C360E349-1255-4D96-B146-13D1FD3ACDF5":{"ConnectHardwareKeyboard":true}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}[info] [iOSSim] Booting Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5...[info] [iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID C360E349-1255-4D96-B146-13D1FD3ACDF5 -ConnectHardwareKeyboard 1[info] [iOSSim] Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5 booted in 16 seconds
[debug] [IDB] Connecting idb service to 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[debug] [IDB] Disconnecting idb service from 'C360E349-1255-4D96-B146-13D1FD3ACDF5'```
This issue is with idb. It seems that idb is not working properly. You need to uninstall idb completely.
pip uninstall fb-idb
brew uninstall idb
brew uninstall idb-companion
And then make sure that below commands should not give any results.
which idb
which idb-companion
Now run your code it should work fine.
Basically we don't need idb to run ios simulator

Appium inspector not open getting instruments crash on startup [duplicate]

I am doing iOS automation on real device. But i got stuck with the error "Failed to start an Appium session, err was: Error: Instruments crashed on startup". logs are below. Please help to resolve this error. Thanks in advance.
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/rajesh.madaswamy/Desktop/PlainNote/code/sencha/cordova/platforms/ios/build/emulator/Fly_dotREZ.ipa","platformVersion":"7.1.2","platformName":"iOS","deviceName":"iPhone 5S","bundleId":"com.accenture.london.Voyage-Air","udid":"5f5e07c61ae3ad4f755801bd6336d21d90927095"}}
info: Client User-Agent string: Apache-HttpClient/4.3.6 (java 1.5)
info: [debug] Using local .ipa from desired caps: /Users/rajesh.madaswamy/Desktop/PlainNote/code/sencha/cordova/platforms/ios/build/emulator/Fly_dotREZ.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/rajesh.madaswamy/Desktop/PlainNote/code/sencha/cordova/platforms/ios/build/emulator/Fly_dotREZ.ipa copied to /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/appium-app.zip
info: [debug] Unzipping /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/appium-app.zip
info: [debug] Testing zip archive: /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/mt/7w1_nx811y9cyx1778lqs_700000gq/T/115210-67883-1h28vtl/Payload/Fly dotREZ.app
info: [debug] Creating new appium session 709e3337-b330-4549-b6d0-eb10722cc83b
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 7.0
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] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/bin/node","commandProxyClientPath":"/Users/rajesh.madaswamy/.npm-packages/lib/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. D...ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js
info: [debug] Reusing dynamic bootstrap: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js
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 iPhoneSimulator
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 5f5e07c61ae3ad4f755801bd6336d21d90927095
info: [debug] Checking app install status using: /Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 5f5e07c61ae3ad4f755801bd6336d21d90927095 --bundle com.accenture.london.Voyage-Air
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 5f5e07c61ae3ad4f755801bd6336d21d90927095
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.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:06.747 instruments[67920:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:06.862 instruments[67920:2203] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
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 iPhoneSimulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5f5e07c61ae3ad4f755801bd6336d21d90927095
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.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:13.444 instruments[67923:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:13.555 instruments[67923:2003] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
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
info: [debug] Killall iPhoneSimulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5f5e07c61ae3ad4f755801bd6336d21d90927095
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.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:20.152 instruments[67927:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:20.253 instruments[67927:3f03] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
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 #3
info: [debug] Killall iPhoneSimulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5f5e07c61ae3ad4f755801bd6336d21d90927095
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.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 5f5e07c61ae3ad4f755801bd6336d21d90927095 com.accenture.london.Voyage-Air -e UIASCRIPT "/Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-b98646d39f6b505e.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-10 17:30:26.840 instruments[67930:707] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] 2015-03-10 17:30:26.952 instruments[67930:3827] Failed to start Instruments daemon for 'iOS' on 'jitendra.k.dash’s iPhone (v7.1.2)' (The service is invalid.)
info: [debug] [INST STDERR] Instruments Trace Error : Failed to start trace.
info: [debug] [INSTSERVER] Instruments exited with code 253
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 iPhoneSimulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:389:31)
at null.<anonymous> (/Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1067: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 24889.612 ms - 182
The problem was that I did not have the appium instruments node package installed. Once I installed it the crash went away. Check that you have the appium-instruments node package installed:
npm install appium-instruments
Few things to keep in mind while running in real device:
1)No simulator should be opened.
2)Make sure the .app file which you are using is build for real device(take the help of developer to find it out)
3)Pass correct udid and bundle id.
4)If you are getting error like app installed failed or something like that then try to do pass app path from appium gui and other parameters from your code i.e. device name , platform capabilities; trying these different combinations do help sometimes.

Appium on iOS Instruments Crash and Application is crashing

I am trying to automate a scenario where i launch an app on ios Device(can be either simulator or Real Device). The app is getting installed on the Device, but it is crashing and launching. I have set the all the required capabilities and i am launching my code from Eclipse Mars version.
I am getting this error, and app is crashing.
(Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
Please find the Capabilities set on device
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformVersion", "9.1");
capabilities.setCapability("deviceName","iPhone 6s Plus");
capabilities.setCapability("platformName","iOS");
capabilities.setCapability("bundleId","com.quinnox.EnterpriseCycleCounting");
capabilities.setCapability("app","/Users/rohinic/Downloads/ComEdApp.ipa");
capabilities.setCapability("fullReset",true);
capabilities.setCapability("launchTimeout","900000");
driver = new IOSDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"),capabilities);
The Complete appium log from start to end is as follows,
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.4" --platform-name "iOS" --default-device
info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"platformName":"iOS","platformVersion":"8.4","defaultDevice":true,"defaultCommandTimeout":7200,"debugLogSpacing":true}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/rohinic/Downloads/ComEdApp.ipa","nativeInstrumentsLib":true,"platformVersion":"9.1","bundleId":"com.quinnox.EnterpriseCycleCounting","platformName":"iOS","deviceName":"iPhone 6s Plus","fullReset":true,"launchTimeout":900000}}
info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
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] Using local .ipa from desired caps: /Users/rohinic/Downloads/ComEdApp.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/rohinic/Downloads/ComEdApp.ipa copied to /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/appium-app.zip
info: [debug] Unzipping /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/appium-app.zip
info: [debug] Testing zip archive: /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app
info: [debug] Creating new appium session b976d2cd-1a6e-4b96-805c-16ccb15d1576
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.2.1
info: [debug] Setting iOS SDK Version
info: [debug] iOS SDK Version set to 9.2
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"7.2.1","iOSSDKVersion":"9.2","deviceName":"iPhone 6s Plus","platformVersion":"9.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6s Plus (9.1)'
info: [debug] iOS sim UDID is 0C8498DB-281C-49D4-A81D-0049133A28C5
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 /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.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 /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app/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/rohinic/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/submodules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"oneByOne"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
info: [debug] Dynamic bootstrap path: /Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js
info: [debug] Reusing dynamic bootstrap: /Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"7.2.1","iOSSDKVersion":"9.2","deviceName":"iPhone 6s Plus","platformVersion":"9.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6s Plus (9.1)'
info: [debug] We're on iOS7.1+ so forcing defaultDevice on
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"7.2.1","iOSSDKVersion":"9.2","deviceName":"iPhone 6s Plus","platformVersion":"9.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6s Plus (9.1)'
info: [debug] Could not parse plist file (as binary) at /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app/Info.plist
info: Will try to parse the plist file as XML
info: [debug] Parsed app Info.plist (as XML)
info: [debug] Wrote new app Info.plist with device type
info: [debug] Checking whether we need to set app preferences
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Cleaning sim data files
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: [debug] Killall iOS Simulator
info: [debug] Cleaning app data files
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Bundle/Application doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Resetting Content and Settings for Simulator
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: [debug] Not setting locale
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS 8.* simulator log capture
info: [debug] Not pre-launching simulator
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 iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] 2016-02-16 20:02:58.934 instruments[5040:85669] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:03:44.216 instruments[5040:86416] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:03:44.217 instruments[5040:86958] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
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 iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST STDERR] 2016-02-16 20:03:52.554 instruments[5155:87070] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:03:58.268 instruments[5155:87128] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:03:58.268 instruments[5155:87129] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
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
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST STDERR] 2016-02-16 20:04:06.714 instruments[5179:87396] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:04:12.090 instruments[5179:87332] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:04:12.090 instruments[5179:87401] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
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 #3
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on iPhone 6s Plus (9.1)
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 "iPhone 6s Plus (9.1)" /var/folders/y_/rh25732s5pl00xxr9s99yybh0000gq/T/116116-5001-qlbbdy/Payload/ComEdApp.app -e UIASCRIPT "/Users/rohinic/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":900000}
info: [debug] [INST STDERR] 2016-02-16 20:04:19.058 instruments[5203:87596] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] 2016-02-16 20:04:24.402 instruments[5203:87596] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] 2016-02-16 20:04:24.402 instruments[5203:87621] Attempting to change event horizon while disengage
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.quinnox.EnterpriseCycleCounting'
info: [debug] [INSTSERVER] Instruments exited with code 253
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] Killing any other simulator daemons
info: [debug] Killall iOS Simulator
info: [debug] Cleaning sim data files
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/rohinic/Library/Developer/CoreSimulator/Devices/0C8498DB-281C-49D4-A81D-0049133A28C5/data/Containers/Bundle/Application doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Resetting Content and Settings for Simulator
info: node-simctl: Executing: xcrun with args: simctl erase 0C8498DB-281C-49D4-A81D-0049133A28C5 and timeout: 2000
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup at [object Object].Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:440:31) at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:353:12) at ChildProcess.emit (events.js:110:17) at Process.ChildProcess._handle.onexit (child_process.js:1074: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 99826.842 ms - 182
Kindly help me in automating this script. Thank you:)

Not able to automate iOS Hybrid mobile app using protractor

I am trying to automate an hybrid ios app using Appium and Protractor. I have installed appium 1.3.4 and xcode 6.1. While ruuning the protractor scripts displays error below. Kindly help. I have Enable UIAutomation from iPhone Developer option. Appium Logs ::
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/qualcomm/Desktop/bhawani/AbbVieCareCH.app","ipa":"/Users/qualcomm/Desktop/bhawani/abbvieCH-dev-01.01.21050131.01.ipa","udid":"cbecb05c855c13d9b2e6b693999123268fc0b966"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"iOS","appium-version":"1.3.4","platformName":"iOS","platformVersion":8.1,"deviceName":"iPhone6","autoWebview":true,"count":1}}
info: Client User-Agent string: undefined
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, count
info: [debug] Using local app from command line: /Users/qualcomm/Desktop/bhawani/AbbVieCareCH.app
info: [debug] Creating new appium session ca2a0eb0-f7cf-47f6-b960-93f447bb3010
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] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
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/qualcomm/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/bin/node","commandProxyClientPath":"/usr/local/lib/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. D...ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js
info: [debug] Reusing dynamic bootstrap: /Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.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 cbecb05c855c13d9b2e6b693999123268fc0b966
info: [debug] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id cbecb05c855c13d9b2e6b693999123268fc0b966 --bundle com.qcl.qualcomm.healthycircles.dev
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 cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-02 18:05:17.723 instruments[12882:123318] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com...'
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 cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-02 18:05:25.309 instruments[12885:123423] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com...'
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
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-02 18:05:31.499 instruments[12888:123447] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com.qcl.qualcomm.healthycircles.dev'
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 #3
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID cbecb05c855c13d9b2e6b693999123268fc0b966
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 cbecb05c855c13d9b2e6b693999123268fc0b966 -e UIASCRIPT "/Users/qualcomm/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-03-02 18:05:37.696 instruments[12891:123507] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com...'
info: [debug] [INSTSERVER] Instruments exited with code 253
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
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:387:31)
at null.<anonymous> (/usr/local/lib/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)
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 25043.363 ms - 182
Thanks,

Resources