I have resolved the problem with my brand new iPhone 5S.
Here is what I did:
connected the iPhone 5S the machinse
launched “Instruments” application from XCode (note: the GUI one, not the command line one!)
chose my failing device (the iPhone 5s) and SafariLauncher as target for profiling template
chose “automation” project
clicked “choose”.
Either now, or after clicking “record” button a pop up appeared that asked me if I want to open XCode enable this device for development. Theoretically this makes little sense, as I did that already, I saw the “developer” menu in phone’s settings, I had the “Enable UI Automation” checked, provisioning profile uploaded… nonetheless I clicked “Yes”.
Xcode devices view opened and I did nothing there, although I saw some settings change in the device console’s output. I switched back to Instruments GUI, clicked “record” and SafariLauncher started on the device.
After that the phone started to work with the command line of the instruments too and I am able to run my tests on the device.
Seems that the device entered a state where “developer” options were halfway enabled, visible in the IOS GUI, toggable, etc but actually not working. Instruments GUI somehow detected and fixed it.
Thanks Scypio! what you wrote makes sense…that the issue is something with the new UI Automation option. I have not tried launching directly from XCode yet. So I will try the steps you listed…and post back my results.
Unfortunately my app will not launch from Instruments either. Getting “Target failed to run: Permission to debug was denied”. Double checking my profiles associated with the app and the device. I did initially see the message you stated…asking if i want to open XCode enable this device for development.
No. I have not. How do I extract to an .app file…is this done through xcode as well? A developer created the app and I am testing it…I will email them and ask for an .app file. Thanks!
Ok. Thx! I went back to look at it in instruments…and actually it was already showing as .app. So xcode must automatically extract the app file…which is great
I am trying this on Appium.app and getting the same error.
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
Hey @jlipps, I am also facing the same issue, I just upgrade my Appium ver from 1.5.1 to 1.5.3, Now I m unable to launch my app as it crashes when try to launch, it always showing me a error message instrument exit 253 error
Please refer below log:
Appium] Welcome to Appium v1.5.3 (REV f653cb8340de3c9acd1ddfb75c1a8c8f3195834a)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/f2849/Desktop/iOS_ipa/Shine27June.ipa",“platformName”:“iOS”,“sendKeyStrategy”:“setValue”,“deviceName”:“iPhone 5”,“platformVersion”:“9.3”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/f2849/Deskt…
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] app: ‘/Users/f2849/Desktop/iOS_ipa/Shine27June.ipa’
[Appium] platformName: ‘iOS’
[Appium] sendKeyStrategy: ‘setValue’
[Appium] deviceName: ‘iPhone 5’
[Appium] platformVersion: ‘9.3’
[BaseDriver] Session created with session id: bc59b1eb-00f5-4471-8302-dde102265e74
[debug] [iOS] Not auto-detecting udid.
[BaseDriver] Using local app ‘/Users/f2849/Desktop/iOS_ipa/Shine27June.ipa’
[debug] [BaseDriver] Copying local zip to tmp dir
[debug] [BaseDriver] Unzipping /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/appium-app.zip
[BaseDriver] Unzipped local app to ‘/var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/Payload/Shine.app’
[debug] [iOS] Removing any remaining instruments sockets
[debug] [iOS] Cleaned up instruments socket /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/instruments_sock
[debug] [iOS] Setting Xcode version
[debug] [iOS] Xcode version set to 7.3
[debug] [iOS] Setting iOS SDK Version
[debug] [iOS] iOS SDK Version set to 9.3
[debug] [iOS] Checking whether instruments supports our device string
[debug] [Instruments] Getting list of devices instruments supports
[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Available devices: Apple TV 1080p (9.2) 393420D6-C6E5-4987-B6E4-AE314D974252,iPad 2 (9.3) 30A9E2F7-8D78-4EA0-ADA1-507C5291CBA6,iPad Air (9.3) 49E15C42-9090-4D1D-A23F-FB64C308943F,iPad Air 2 (9.3) E41283B2-64F3-4E66-A0CC-8C1F294A26FC,iPad Pro (9.3) 2AE81A71-84F8-4D58-A051-423D72BBE17C,iPad Retina (9.3) B4400DA1-D701-4F17-B443-239AE4539E48,iPhone 4s (9.3) 3D432B7E-3C85-4CFB-B9A0-70F8CCC844CF,iPhone 5 (9.3) 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4,iPhone 5s (9.3) DD524A67-FAA2-4BF7-A964-1ED592B93C64,iPhone 6 (9.3) 9DCBB689-4222-4291-B29E-365103DACCBD,iPhone 6 Plus (9.3) 8533EEB6-5555-42B9-BB5D-AE3718DF457E,iPhone 6s (9.3) 4BCE48AA-79D8-430B-A405-39A6FA2181B0,iPhone 6s (9.3) + Apple Watch - 38mm (2.2) D447A288-627F-4F54-A56E-64888CF02C13,iPhone 6s Plus (9.3) E983943E-7212-44D8-A475-3F4844D61AA3,iPhone 6s Plus (9.3) + Apple Watch - 42mm (2.2) 4A8524EB-24B3-4182-A2BE-CCF95762E736
[iOSSim] Retrieving device name string for Xcode version 7.3
[debug] [iOSSim] Getting device string from options: {“deviceName”:“iPhone 5”,“platformVersion”:“9.3”,“forceIphone”:false,“forceIpad”:false}
[debug] [iOSSim] Final device string is ‘iPhone 5 (9.3)’
[debug] [iOS] iOS sim UDID is 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4
[iOSSim] Constructing iOS simulator for Xcode version 7.3
[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: com.htmedia.shine from app: /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/Payload/Shine.app
[debug] [iOS] Creating instruments
[debug] [UIAuto] Preparing bootstrap code
[debug] [UIAuto] Dynamic bootstrap dir: /Users/f2849/Library/Application Support/appium/bootstrap
[debug] [UIAuto] Dynamic env: {“nodePath”:"/usr/local/bin/node",“commandProxyClientPath”:"/usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js",“instrumentsSock”:"/var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/instruments_sock",“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“setValue”}
[debug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated…o not manually modify!
[debug] [UIAuto] Dynamic bootstrap path: /Users/f2849/Library/Application Support/appium/bootstrap/bootstrap-d40d3b1169b15601.js
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/f2849/Library/Application Support/appium/bootstrap/bootstrap-d40d3b1169b15601.js
[debug] [iOS] User specified default device, letting instruments launch it
[debug] [iOS] Running ios sim reset flow
[debug] [iOS] Killing the simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOS] Cleaning sim state.
[debug] [iOSSim] Cleaning app data files for ‘Shine.app’, ‘com.htmedia.shine’
[debug] [iOSSim] Building bundle path map
[debug] [iOSSim] Building bundle path map
[debug] [Support] Plist file ‘/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Bundle/Application/FIREBASE_LAST_TIMESTAMP/.com.apple.mobile_container_manager.metadata.plist’ does not exist. Returning an empty plist.
[debug] [Support] Plist file ‘/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Bundle/Application/FIREBASE_UNIQUE_INSTALL/.com.apple.mobile_container_manager.metadata.plist’ does not exist. Returning an empty plist.
[debug] [iOSSim] Deleting directory: ‘/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Data/Application/949E8D8B-BEF7-48B0-A0BC-68369FCEA5B6’
[debug] [iOSSim] Deleting directory: ‘/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Bundle/Application/FF45425D-3C77-4C36-8050-88158D20CCC2’
[debug] [iOSSim] Deleting file: ‘/Users/f2849/Library/Developer/CoreSimulator/Devices/Library/Preferences/com.XX.XXX.plist’
[debug] [iOSSim] Killing any simulator daemons for 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4
[iOSSim] Cleaning simulator 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4
[debug] [iOS] Not setting locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOSLog] Starting iOS 9.3 simulator log capture
[debug] [iOSLog] System log path: /Users/f2849/Library/Logs/CoreSimulator/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/system.log
[debug] [iOS] Not pre-launching simulator
[debug] [iOS] Starting UIAutoClient, and launching Instruments.
[debug] [UIAuto] Instruments socket server started at /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/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 iPhone 5 (9.3)
[Instruments] On xcode 7.0+, instruments-without-delay does not work, skipping instruments-without-delay
[debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/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/st/41dk4fnd10518617jytfvjhh0000gq/T/appium-instruments/instrumentscli0.trace -w “iPhone 5 (9.3)” /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/Payload/Shine.app -e UIASCRIPT “/Users/f2849/Library/Application Support/appium/bootstrap/bootstrap-d40d3b1169b15601.js” -e UIARESULTSPATH /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/appium-instruments’
[debug] [Instruments] And launch timeouts (in ms): {“global”:90000}
[debug] [Instruments] [INST] Waiting for device to boot…
[Instruments] Instruments socket client never checked in; timing out (global)
[debug] [Instruments] Killing all instruments
[debug] [Instruments] [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.htmedia.shine’
[debug] [Instruments] Instruments exited with code 253
[Instruments] Error launching instruments: Instruments never checked in
[debug] [iOSSim] Killing all iOS Simulators
[HTTP] <-- POST /wd/hub/session - - ms - -
^C