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