I’m using iOS 9.2.1, iPhone 5s. Turned on “Enable UI Automation.”
Running environment of Appium is OSX El Capitan 10.11.2.
XCode version is 7.2. Installed Xcode command tools.
The app is signed with developing provisioning.
And I run Appium and connect with test script, Got this.
[Appium] Welcome to Appium v1.5.0 (REV b4e61ee9e60497084cb4f10476364939a6cae315) [Appium] Non-default server args: [Appium] defaultCommandTimeout: 7200 [Appium] debugLogSpacing: true [Appium] defaultCapabilities: { platformName: 'iOS', platformVersion: '9.2.1', deviceName: 'Device', app: '/Users/user/Projects/App/Develop/App_Debug.ipa', udid: 'udid', showIOSLog: true } [Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities: [Appium] platformName: 'iOS' [Appium] platformVersion: '9.2.1' [Appium] deviceName: 'Device' [Appium] app: '/Users/user/Projects/App/Develop/App_Debug.ipa' [Appium] udid: 'udid' [Appium] showIOSLog: true [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [HTTP] --> POST /wd/hub/session [MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformName":"iOS","platformVersion":"9.2.1","deviceName":"Device","app":"/Users/user/Projects/App/Develop/App_Debug.... [Appium] Creating new IosDriver session [Appium] Capabilities: [Appium] platformName: 'iOS' [Appium] platformVersion: '9.2.1' [Appium] deviceName: 'Device' [Appium] app: '/Users/user/Projects/App/Develop/App_Debug.ipa' [Appium] udid: 'udid' [Appium] showIOSLog: 'true' [debug] [Appium] Capability 'showIOSLog' changed from string to boolean. This may cause unexpected behavior [BaseDriver] Session created with session id: 08948d72-65b0-4d3f-8648-b55e24ae66ec [debug] [iOS] Not auto-detecting udid. [BaseDriver] Using local app '/Users/user/Projects/App/Develop/App_Debug.ipa' [debug] [BaseDriver] Copying local zip to tmp dir [debug] [BaseDriver] Unzipping /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/2016229-50437-1k99t8a/appium-app.zip [debug] [BaseDriver] Testing zip archive: /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/2016229-50437-1k99t8a/appium-app.zip [BaseDriver] Unzipped local app to '/var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/2016229-50437-1k99t8a/Payload/albatross.app' [debug] [iOS] Removing any remaining instruments sockets [debug] [iOS] Cleaned up instruments socket /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/instruments_sock [debug] [iOS] No language specified. Using default strings [debug] [iOS] Strings file not found. Looking in 'en.lproj' directory [iOS] Could not file localizable strings file 'Localizable.strings'! [debug] [ios-app-utils] Getting bundle ID from app [iOS] Extracted bundleID: co.device.id from app: /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/2016229-50437-1k99t8a/Payload/albatross.app [debug] [iOS] Creating instruments [debug] [UIAuto] Preparing bootstrap code [debug] [UIAuto] Dynamic bootstrap dir: /Users/user/Library/Application Support/appium/bootstrap [debug] [UIAuto] Dynamic env: {"nodePath":"/usr/local/Cellar/node/4.2.1/bin/node","commandProxyClientPath":"/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js","instrumentsSock":"/var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"} ...bug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify! [debug] [UIAuto] Dynamic bootstrap path: /Users/user/Library/Application Support/appium/bootstrap/bootstrap-936f87ccae718bd6.js [debug] [UIAuto] Reusing dynamic bootstrap: /Users/user/Library/Application Support/appium/bootstrap/bootstrap-936f87ccae718bd6.js [debug] [iOS] Running ios real device reset flow [debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog [debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog' [debug] [iOS] Creating iDevice object with udid udid [debug] [iOS] App is installed. [debug] [iOS] fullReset not requested. No need to install. [debug] [iOS] Starting UIAutoClient, and launching Instruments. [debug] [UIAuto] Instruments socket server started at /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/instruments_sock [debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments [debug] [Instruments] Attempting to launch instruments, this is try #1 [Instruments] Launching instruments [debug] [Instruments] Attempting to run app on real device with UDID 'udid' [debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd7 [debug] [Instruments] 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 /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments/instrumentscli0.trace -w udid co.device.id -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-936f87ccae718bd6.js" -e UIARESULTSPATH /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments' [debug] [Instruments] And extra without-delay env: {} [debug] [Instruments] And launch timeouts (in ms): {"global":90000} [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:31 Device kernel[0] <Notice>: socketIsClosed sock_receive returned errno 54 [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:31.631 instruments[50688:299010] Connection peer refused channel request for "com.apple.instruments.server.services.capabilities"; channel canceled <DTXChannel: 0x7f7fe5cde4d0> 2016-03-29 20:10:31.631 instruments[50688:299010] Connection peer refused channel request for "com.apple.instruments.server.services.device.xpccontrol"; channel canceled <DTXChannel: 0x7f7fe5d0b400> 2016-03-29 20:10:31.632 instruments[50688:299010] Connection peer refused channel request for "com.apple.instruments.server.services.deviceinfo"; channel canceled <DTXChannel: 0x7f7fe5d0a740> 2016-03-29 20:10:31.632 instruments[50688:299010] Connection peer refused channel request for "com.apple.instruments.server.services.processcontrol"; channel canceled <DTXChannel: 0x7f7fe5d08ff0> [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:31.632 instruments[50688:299010] Connection peer refused channel request for "com.apple.instruments.server.services.processcontrol.posixspawn"; channel canceled <DTXChannel: 0x7f7fe5cde270> 2016-03-29 20:10:31.632 instruments[50688:299010] Connection peer refused channel request for "com.apple.instruments.server.services.mobilenotifications"; channel canceled <DTXChannel: 0x7f7fe5cdcd40> 2016-03-29 20:10:31.632 instruments[50688:299011] Connection peer refused channel request for "com.apple.instruments.server.services.device.applictionListing"; channel canceled <DTXChannel: 0x7f7fe3624e30> 2016-03-29 20:10:31.633 instruments[50688:299010] Connection peer refused channel request for "com.apple.dt.Xcode.WatchProcessControl"; channel canceled <DTXChannel: 0x7f7fe5cdd3f0> 2016-03-29 20:10:31.633 instruments[50688:299011] Connection peer refused channel request for "com.apple.instruments.server.services.wireless"; channel canceled <DTXChannel: 0x7f7fe5ce0be0> Instruments Usage Error : Specified target process is invalid: co.device.id instruments, version 7.2 (59503) usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]] [debug] [Instruments] Instruments exited with code 255 [Instruments] Error launching instruments: Instruments crashed on startup [debug] [iOSSim] Killing all iOS Simulators [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:31 Device notification_proxy[3481] <Error>: 0x16e12f000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error! [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:31 Device gputoolsd[3588] <Notice>: schedule invalidation <DYTransport 0x14d5070e0, error: lost transport connection (31)> [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:31 Device gputoolsd[3588] <Notice>: terminating daemon 0x14d604f90 [debug] [Instruments] Attempting to launch instruments, this is try #2 [Instruments] Launching instruments [debug] [Instruments] Attempting to run app on real device with UDID 'udid' [debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd7 [debug] [Instruments] 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 /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments/instrumentscli0.trace -w udid co.device.id -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-936f87ccae718bd6.js" -e UIARESULTSPATH /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments' [debug] [Instruments] And extra without-delay env: {} [debug] [Instruments] And launch timeouts (in ms): {"global":90000} [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:37.997 instruments[50745:299289] Failed to start Instruments daemon on 'Device (9.2.1)' (Could not connect to the device.) [debug] [Instruments] [INST STDERR] Instruments Usage Error : Specified target process is invalid: co.device.id instruments, version 7.2 (59503) usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]] [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:37 Device notification_proxy[3481] <Error>: 0x16e247000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error! [debug] [Instruments] Instruments exited with code 255 [Instruments] Error launching instruments: Instruments crashed on startup [debug] [iOSSim] Killing all iOS Simulators [debug] [Instruments] Attempting to launch instruments, this is try #3 [Instruments] Launching instruments [debug] [Instruments] Attempting to run app on real device with UDID 'udid' [debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd7 [debug] [Instruments] 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 /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments/instrumentscli0.trace -w udid co.device.id -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-936f87ccae718bd6.js" -e UIARESULTSPATH /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments' [debug] [Instruments] And extra without-delay env: {} [debug] [Instruments] And launch timeouts (in ms): {"global":90000} [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:44.598 instruments[50808:299699] WebKit Threading Violation - initial use of WebKit from a secondary thread. [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:44.607 instruments[50808:299630] Failed to start Instruments daemon on 'Device (9.2.1)' (Could not connect to the device.) [debug] [Instruments] [INST STDERR] Instruments Usage Error : Specified target process is invalid: co.device.id instruments, version 7.2 (59503) usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]] [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:44 Device notification_proxy[3481] <Error>: 0x16e087000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error! [debug] [Instruments] Instruments exited with code 255 [Instruments] Error launching instruments: Instruments crashed on startup [debug] [iOSSim] Killing all iOS Simulators [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:44 Device gputoolsd[3589] <Notice>: schedule invalidation <DYTransport 0x12cd0f8b0, error: lost transport connection (31)> [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:44 Device gputoolsd[3589] <Notice>: terminating daemon 0x12cd0f550 [debug] [Instruments] Attempting to launch instruments, this is try #4 [Instruments] Launching instruments [debug] [Instruments] Attempting to run app on real device with UDID 'udid' [debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd7 [debug] [Instruments] 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 /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments/instrumentscli0.trace -w udid co.device.id -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-936f87ccae718bd6.js" -e UIARESULTSPATH /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments' [debug] [Instruments] And extra without-delay env: {} [debug] [Instruments] And launch timeouts (in ms): {"global":90000} [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:50.924 instruments[50865:300203] Failed to start Instruments daemon on 'Device (9.2.1)' (Could not connect to the device.) [debug] [Instruments] [INST STDERR] Instruments Usage Error : Specified target process is invalid: co.device.id instruments, version 7.2 (59503) usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]] [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:50 Device notification_proxy[3481] <Error>: 0x16e247000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error! [debug] [Instruments] Instruments exited with code 255 [Instruments] Error launching instruments: Instruments crashed on startup [debug] [iOSSim] Killing all iOS Simulators [debug] [Instruments] Attempting to launch instruments, this is try #5 [Instruments] Launching instruments [debug] [Instruments] Attempting to run app on real device with UDID 'udid' [debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd7 [debug] [Instruments] 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 /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments/instrumentscli0.trace -w udid co.device.id -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-936f87ccae718bd6.js" -e UIARESULTSPATH /var/folders/xd/c568z0z15b345yycm7vb8pw40000gn/T/appium-instruments' [debug] [Instruments] And extra without-delay env: {} [debug] [Instruments] And launch timeouts (in ms): {"global":90000} [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:57.218 instruments[50924:301261] WebKit Threading Violation - initial use of WebKit from a secondary thread. [debug] [Instruments] [INST STDERR] 2016-03-29 20:10:57.252 instruments[50924:301267] Failed to start Instruments daemon on 'Device (9.2.1)' (Could not connect to the device.) [debug] [Instruments] [INST STDERR] Instruments Usage Error : Specified target process is invalid: co.device.id instruments, version 7.2 (59503) usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]] [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:57 Device notification_proxy[3481] <Error>: 0x16e247000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error! [debug] [Instruments] Instruments exited with code 255 [Instruments] Error launching instruments: Instruments crashed on startup [Instruments] Error: We exceeded the number of retries allowed for instruments to successfully start; failing launch at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13) at Instruments.launch$ (lib/instruments.js:210:15) at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:104:47) at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:115:28 at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5) at doNTCallback0 (node.js:417:9) at process._tickCallback (node.js:346:13) [Error: We exceeded the number of retries allowed for instruments to successfully start; failing launch] [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:57 Device gputoolsd[3590] <Notice>: schedule invalidation <DYTransport 0x12ee04a30, error: lost transport connection (31)> [iOSLog] [IOS_SYSLOG_ROW] Mar 29 20:10:57 Device gputoolsd[3590] <Notice>: terminating daemon 0x12ee01800 [MJSONWP] Encountered internal error running command: Error: We exceeded the number of retries allowed for instruments to successfully start; failing launch at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13) at Instruments.launch$ (lib/instruments.js:210:15) at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:104:47) at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:115:28 at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5) at doNTCallback0 (node.js:417:9) at process._tickCallback (node.js:346:13) [HTTP] <-- POST /wd/hub/session 500 42256 ms - 232
What did I wrong? Or how to centralize problem?