Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruments crashes on startup (Appium 1.3.3) #4126

Closed
joe-mcg opened this issue Nov 21, 2014 · 33 comments
Closed

Instruments crashes on startup (Appium 1.3.3) #4126

joe-mcg opened this issue Nov 21, 2014 · 33 comments
Assignees

Comments

@joe-mcg
Copy link

joe-mcg commented Nov 21, 2014

Instruments is crashing for me on startup, using iOS 8.1 on a mac with Xcode 6.

This isn't a new issue, but I thought that this would be fixed by appium 1.3.3.

Console output:

info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Unable to install app with path: /Users/user/Documents/Projects/tests/testApp: "(null)"
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] Cleaning sim data files
info: [debug] Executing: xcrun simctl erase 44F7E420-FCE6-4C2C-9DA3-01C471410296
info: [debug] Executing: xcrun simctl erase 44F7E420-FCE6-4C2C-9DA3-01C471410296
info: [debug] Cleaning app data files
warn: Applications directory /Users/user/Library/Developer/CoreSimulator/Devices/44F7E420-FCE6-4C2C-9DA3-01C471410296/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/user/Library/Developer/CoreSimulator/Devices/44F7E420-FCE6-4C2C-9DA3-01C471410296/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] Cleaning up appium session

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.EventEmitter.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:789: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 46611.934 ms - 182 
@triager triager added the Needs Triage bugs which are not yet confirmed label Nov 21, 2014
@imurchie
Copy link
Contributor

What are the desired capabilities you are sending in to the server?

@joe-mcg
Copy link
Author

joe-mcg commented Nov 21, 2014

            capabilities.setCapability("platformVersion", "8.1");
            capabilities.setCapability("deviceName", "iPhone Simulator");
            capabilities.setCapability("bundleId", "com.test.testApp");

            capabilities.setCapability("platformName", "iOS");
            capabilities.setCapability("app", APP_BINARY);
            capabilities.setCapability("orientation", "PORTRAIT");

@joe-mcg
Copy link
Author

joe-mcg commented Nov 21, 2014

Might be worth mentioning: it does launch the simulator. I'm unable to run tests against a physical device.

@imurchie
Copy link
Contributor

It launches and runs on the simulator? Or just launches and then crashes?

Also, can you give the caps that are received by the server? There should be a log line. Mostly, what is the value of APP_BINARY?

@joe-mcg
Copy link
Author

joe-mcg commented Nov 21, 2014

It launches simulator but not app.

info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/user/Documents/Projects/tests/testapp.app","orientation":"PORTRAIT","platformVersion":"8.1","bundleId":"com.test.testApp","platformName":"iOS","deviceName":"iPhone Simulator"}}

APP_BINARY is (the equivalent of) testapp.app.

@imurchie
Copy link
Contributor

Ah, ok. Thanks. I'm investigating.

@imurchie
Copy link
Contributor

I'm confused by the logs saying Instruments is trying to install /Users/user/Documents/Projects/tests/testApp when the caps are sending in /Users/user/Documents/Projects/tests/testapp.app.

Does Instruments work if you manually start it (the command is in the server logs, but not the snippet given above).

@joe-mcg
Copy link
Author

joe-mcg commented Nov 21, 2014

Yeah, sorry, I've manually edited these logs from [company name] to testapp. I know I'm being a pain but need to check that I'm ok with posting company stuff publicly here before I do. The log should say:

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Unable to install app with path: /Users/user/Documents/Projects/tests/testapp.app: "(null)"

@fayizkc
Copy link

fayizkc commented Dec 10, 2014

HI
I am exeucting sample app in the version "iOS 7.1" it is executing fine in sumulator, but if I am trying to execute same in 8.1, Simulator just opening and closing. Plese find the appium log

Appium 1.3.3
Xcode 6.1.15
OS X 10.9.

info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"8.1","app":"/Users/user/Desktop/VeriTestAF/VeriTestAF_Web/FunctionLibraries/InternationalMountains.app","platformName":"iOS","deviceName":"iPhone 5"}}

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

info: [debug] Using local app from desired caps: /Users/user/Desktop/VeriTestAF/VeriTestAF_Web/FunctionLibraries/InternationalMountains.app
info: [debug] Creating new appium session 6c4848e1-b1f8-4349-9f6c-e5e768439e02

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] 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":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 5","platformVersion":"8.1"}

info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 5 (8.1 Simulator)'
info: [debug] iOS sim UDID is 065EC636-090F-49CE-B991-4DD35B883C51
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/user/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":"oneByOne"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/user/Library/Application Support/appium/bootstrap/bootstrap-a4a902c9cce7b6cb.js
info: [debug] Reusing dynamic bootstrap: /Users/user/Library/Application Support/appium/bootstrap/bootstrap-a4a902c9cce7b6cb.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 5","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 5 (8.1 Simulator)'
info: [debug] We're on iOS7.1+ so forcing defaultDevice on
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 5","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 5 (8.1 Simulator)'
info: [debug] Parsed app Info.plist (as binary)

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] Killall iOS Simulator
info: [debug] Killing any other simulator daemons

info: [debug] Cleaning sim data files

info: [debug] Executing: xcrun simctl erase 065EC636-090F-49CE-B991-4DD35B883C51

info: [debug] Cleaning app data files

warn: Applications directory /Users/user/Library/Developer/CoreSimulator/Devices/065EC636-090F-49CE-B991-4DD35B883C51/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/user/Library/Developer/CoreSimulator/Devices/065EC636-090F-49CE-B991-4DD35B883C51/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] 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] No device id or app, not installing to real device.
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 5 (8.1 Simulator)
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 5 (8.1 Simulator)" /Users/user/Desktop/VeriTestAF/VeriTestAF_Web/FunctionLibraries/InternationalMountains.app -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-a4a902c9cce7b6cb.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}

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

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.3","revision":"34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78"},"isShuttingDown":false},"sessionId":"6c4848e1-b1f8-4349-9f6c-e5e768439e02"}

info: <-- GET /wd/hub/status 200 1.623 ms - 178 {"status":0,"value":{"build":{"version":"1.3.3","revision":"34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78"},"isShuttingDown":false},"sessionId":"6c4848e1-b1f8-4349-9f6c-e5e768439e02"}

info: [debug] [INST] Waiting for device to boot...

info: [debug] [INST] 2014-12-10 11:03:35 +0000 Fail: The target application appears to have died

info: [debug] [INST] Instruments Trace Complete (Duration : 3.272536s; 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 iPhone 5 (8.1 Simulator)

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 5 (8.1 Simulator)" /Users/user/Desktop/VeriTestAF/VeriTestAF_Web/FunctionLibraries/InternationalMountains.app -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-a4a902c9cce7b6cb.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [debug] [INST] Waiting for device to boot...

info: [debug] [INST] 2014-12-10 11:03:44 +0000 Fail: The target application appears to have died

info: [debug] [INST] Instruments Trace Complete (Duration : 2.824008s; 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 iPhone 5 (8.1 Simulator)

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 5 (8.1 Simulator)" /Users/user/Desktop/VeriTestAF/VeriTestAF_Web/FunctionLibraries/InternationalMountains.app -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-a4a902c9cce7b6cb.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [debug] [INST] Waiting for device to boot...

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 8.) : Failed to launch process with bundle identifier 'com.yourcompany.InternationalMountains'

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] Got the FBSOpenApplicationError, not killing the sim but leaving it open so the app will launch

info: Launching instruments

info: [debug] Attempting to run app on iPhone 5 (8.1 Simulator)

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 5 (8.1 Simulator)" /Users/user/Desktop/VeriTestAF/VeriTestAF_Web/FunctionLibraries/InternationalMountains.app -e UIASCRIPT "/Users/user/Library/Application Support/appium/bootstrap/bootstrap-a4a902c9cce7b6cb.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [debug] [INST] 2014-12-10 11:03:54 +0000 Fail: The target application appears to have died

info: [debug] [INST] Instruments Trace Complete (Duration : 1.253203s; 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] Cleaning sim data files

info: [debug] Executing: xcrun simctl erase 065EC636-090F-49CE-B991-4DD35B883C51

info: [debug] Executing: xcrun simctl erase 065EC636-090F-49CE-B991-4DD35B883C51

info: [debug] Cleaning app data files

warn: Applications directory /Users/user/Library/Developer/CoreSimulator/Devices/065EC636-090F-49CE-B991-4DD35B883C51/data/Containers/Data/Application doesn't exist. Have you run this simulator before?

warn: Applications directory /Users/user/Library/Developer/CoreSimulator/Devices/065EC636-090F-49CE-B991-4DD35B883C51/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] 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: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}

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

@abiswasmphrx
Copy link

Even I'm facing same issue any help on this to get started.

xcode version: 6.1.1

Appium: 1.3.1

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] Cleaning sim data files

info: [debug] Executing: xcrun simctl erase F25D7D9A-3384-4F0B-97BB-BCA33267C81A

info: [debug] Cleaning app data files

warn: Applications directory /Users/Administrator/Library/Developer/CoreSimulator/Devices/F25D7D9A-3384-4F0B-97BB-BCA33267C81A/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/Administrator/Library/Developer/CoreSimulator/Devices/F25D7D9A-3384-4F0B-97BB-BCA33267C81A/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

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: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 104793.806 ms - 182

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

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.3","revision":"34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78"}}}

info: <-- GET /wd/hub/status 200 5.239 ms - 104 {"status":0,"value":{"build":{"version":"1.3.3","revision":"34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78"}}}

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

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.3","revision":"34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78"}}}

info: <-- GET /wd/hub/status 200 3.759 ms - 104 {"status":0,"value":{"build":{"version":"1.3.3","revision":"34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78"}}}

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

@imurchie
Copy link
Contributor

imurchie commented Jan 5, 2015

Have you tried using the --native-instruments-lib server flag, as the logs say to try?

@ghost
Copy link

ghost commented Feb 4, 2015

@imurchie , I am facing the same issue. Flag --native-instruments-lib doesn't help.

@kiransweng
Copy link

Hi ,

Same error I have experienced in my first sample script, not able to launch simulator and install our QA App build. below are specifications

Mac OSx: 10.8.5
Xcode: 5.1.1
Appium: 1.3.4
iPhone Simulator:iPhone Retina (4-inch)
IOS version: 7.1

Appreciate your kind support.

Regards,
Kiran Edupuganti

@imurchie
Copy link
Contributor

imurchie commented Feb 4, 2015

What is in the iOS system logs?

@kiransweng
Copy link

@imurchie :
I am now receiving below error and app is not installed in the IOS device.
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Command failed: dyld: Library not loaded: @executable_path/../lib/libimobiledevice.3.dylib
Referenced from: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
Reason: image not found
) (WARNING: The server did not provide any stacktrace information)

Any suggestions on this.
I didn't see any device crash logs

Please suggest on above error.

Regards,
Kiran

@imurchie
Copy link
Contributor

imurchie commented Feb 5, 2015

The above error? Make sure that libimobiledevice is there and correct. If you are running from source, rerunning reset.sh is helpful.

@kiransweng
Copy link

@imurchie: I did make progress on this. Previous configuration was not compatible (MAC 10.8.5 & Xcode 5.1.1) with IOS 8.0. After all might be seeing this error.

Latest configuration (Mac 10.9.4 , Xcode 6.1.1) with IOS 8.1 iPhone 6 device with "Developer" option enable and all settings were appropriate. Receiving "Instruments crashes on startup".

I was requesting for signed and provisioned build for this test. But dev team is saying doesn't need provision as our enterprise build will get install on the iPhone device. Manual team is installing the build and doing their test.

So , I have proceed with enterprise build with latest IOS Appium setup to check the Dev team comment and installation of ipa file.

Please see Simple code that have writhed to install and launch app.

public class Test1 {

public static IOSDriver driver;

@test
public void f() throws MalformedURLException {

  DesiredCapabilities capabilities = new DesiredCapabilities();

  capabilities.setCapability("automationName", "Appium");
  capabilities.setCapability("browserName", "");
  capabilities.setCapability("autoLaunch",true);
  capabilities.setCapability("platfromName","iOS");
  capabilities.setCapability("platfromVersion","8.1");
  capabilities.setCapability("deviceName","adurgam’s iPhone");
  capabilities.setCapability("udid","e47ba3300ef7bcbb943db3240b5213813a5d3938");
  capabilities.setCapability("bundleId","com.vons.j4u.entprod");
  capabilities.setCapability("app","/kiran/ReferenceFiles/XXX.ipa");
  capabilities.setCapability("showIOSLog",true);

  driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
 driver.manage().timeouts().implicitlyWait(180,TimeUnit.SECONDS);

  driver.quit();

}
}

In this situation it is installed the build and received the "Crash" error. Hope above code don't have any error in it. I have seen the appium log. It is giving the error . "Failed to launch process with bundle identifier 'com.XXXX.j4u.entprod' " , this bundle identifier i have captured from info.plist

I am not sure whether this is because of enterprise build or not signed build. I am seeing app is installed , manually I am able to launch the installed app.

Please see the below appium log and assist me in this.
2015-02-10 15:07:51:798 - info: Welcome to Appium v1.3.4 (REV c8c79a8)
2015-02-10 15:07:51:801 - info: Appium REST http interface listener started on 0.0.0.0:4723
2015-02-10 15:07:51:803 - info: [debug] Non-default server args: {"noReset":true,"log":"/Kiran/appium.log","platformName":"iOS","platformVersion":"8.1","defaultDevice":true,"showSimulatorLog":true,"defaultCommandTimeout":7200}
2015-02-10 15:07:51:803 - warn: Deprecated server args: {"--show-sim-log":"use instead: --show-ios-log"}
2015-02-10 15:07:51:804 - info: Console LogLevel: debug
2015-02-10 15:07:51:804 - info: File LogLevel: debug
2015-02-10 15:07:51:969 - info: --> GET /wd/hub/status {}
2015-02-10 15:07:51:970 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-10 15:07:51:974 - info: <-- GET /wd/hub/status 200 5.278 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-10 15:08:02:978 - info: --> GET /wd/hub/status {}
2015-02-10 15:08:02:978 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-10 15:08:02:979 - info: <-- GET /wd/hub/status 200 1.554 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-10 15:08:43:079 - info: --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"Appium","platfromName":"iOS","app":"/kiran/ReferenceFiles/xxx.ipa","showIOSLog":true,"platformName":"iOS","deviceName":"adurgam’s iPhone","browserName":"","autoLaunch":true,"bundleId":"com.vons.j4u.entprod","udid":"e47ba3300ef7bcbb943db3240b5213813a5d3938","platfromVersion":"8.1"}}
2015-02-10 15:08:43:080 - info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
2015-02-10 15:08:43:081 - 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. : platfromName, platfromVersion
2015-02-10 15:08:43:083 - info: [debug] Using local .ipa from desired caps: /kiran/ReferenceFiles/vons.ipa
2015-02-10 15:08:43:083 - info: [debug] Copying local zip to tmp dir
2015-02-10 15:08:43:115 - info: [debug] /kiran/ReferenceFiles/vons.ipa copied to /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115110-3674-ekzop6/appium-app.zip
2015-02-10 15:08:43:124 - info: [debug] Unzipping /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115110-3674-ekzop6/appium-app.zip
2015-02-10 15:08:43:125 - info: [debug] Testing zip archive: /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115110-3674-ekzop6/appium-app.zip
2015-02-10 15:08:43:352 - info: [debug] Zip archive tested clean
2015-02-10 15:08:43:854 - info: [debug] Unzip successful
2015-02-10 15:08:43:855 - info: [debug] Using locally extracted app: /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115110-3674-ekzop6/Payload/xxx.app
2015-02-10 15:08:43:855 - info: [debug] Creating new appium session 486211da-c92f-4862-a125-1b0f23cf0214
2015-02-10 15:08:43:858 - info: [debug] Removing any remaining instruments sockets
2015-02-10 15:08:43:859 - info: [debug] Cleaned up instruments socket /tmp/instruments_sock
2015-02-10 15:08:43:859 - info: [debug] Setting Xcode folder
2015-02-10 15:08:43:864 - info: [debug] Setting Xcode version
2015-02-10 15:08:43:918 - info: [debug] Setting iOS SDK Version
2015-02-10 15:08:43:970 - info: [debug] Getting sdk version from xcrun with a timeout
2015-02-10 15:08:43:976 - info: [debug] iOS SDK Version set to 8.1
2015-02-10 15:08:43:977 - info: [debug] Not checking whether simulator is available since we're on a real device
2015-02-10 15:08:43:977 - info: [debug] Detecting automation tracetemplate
2015-02-10 15:08:43:982 - info: [debug] Not auto-detecting udid, running on sim
2015-02-10 15:08:43:984 - info: [debug] Could not parse plist file (as binary) at /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115110-3674-ekzop6/Payload/Vons.app/en.lproj/Localizable.strings
2015-02-10 15:08:43:984 - info: Will try to parse the plist file as XML
2015-02-10 15:08:43:985 - info: [debug] Could not parse plist file (as XML) at /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115110-3674-ekzop6/Payload/Vons.app/en.lproj/Localizable.strings
2015-02-10 15:08:43:986 - warn: Could not parse app Localizable.strings; assuming it doesn't exist
2015-02-10 15:08:43:986 - info: [debug] Creating instruments
2015-02-10 15:08:43:986 - 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
2015-02-10 15:08:43:987 - info: [debug] Preparing uiauto bootstrap
2015-02-10 15:08:43:987 - info: [debug] Dynamic bootstrap dir: /Users/admin/Library/Application Support/appium/bootstrap
2015-02-10 15:08:43:987 - 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"}
2015-02-10 15:08:43:993 - info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
2015-02-10 15:08:43:993 - info: [debug] Dynamic bootstrap path: /Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js
2015-02-10 15:08:43:996 - info: [debug] Reusing dynamic bootstrap: /Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js
2015-02-10 15:08:43:997 - info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"adurgam’s iPhone","platformVersion":"8.1"}
2015-02-10 15:08:43:998 - info: [debug] fixDevice is on
2015-02-10 15:08:43:998 - info: [debug] Final device string is: 'adurgam’s iPhone (8.1 Simulator)'
2015-02-10 15:08:43:999 - info: [debug] Not setting device type since we're on a real device
2015-02-10 15:08:43:999 - info: [debug] Checking whether we need to set app preferences
2015-02-10 15:08:43:999 - info: [debug] Not setting iOS and app preferences since we're on a real device
2015-02-10 15:08:43:999 - info: [debug] Reset not set, not ending sim or cleaning up app state
2015-02-10 15:08:44:000 - info: [debug] Not setting locale because we're using a real device
2015-02-10 15:08:44:000 - info: [debug] No iOS / app preferences to set
2015-02-10 15:08:44:000 - info: [debug] Starting iOS device log capture via deviceconsole
2015-02-10 15:08:45:098 - info: [debug] Not pre-launching simulator
2015-02-10 15:08:45:099 - info: [debug] Creating iDevice object with udid e47ba3300ef7bcbb943db3240b5213813a5d3938
2015-02-10 15:08:45:100 - info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id e47ba3300ef7bcbb943db3240b5213813a5d3938 --bundle com.vons.j4u.entprod
2015-02-10 15:08:45:721 - info: [debug] App is not installed. Will try to install the app.
2015-02-10 15:08:45:721 - info: [debug] Installing ipa found at /kiran/ReferenceFiles/xxx.ipa
2015-02-10 15:08:45:721 - info: [debug] Creating iDevice object with udid e47ba3300ef7bcbb943db3240b5213813a5d3938
2015-02-10 15:08:47:279 - info: [debug] Nothing found on device, going ahead and installing.
2015-02-10 15:09:00:899 - info: [debug] Starting command proxy.
2015-02-10 15:09:00:901 - info: [debug] Instruments socket server started at /tmp/instruments_sock
2015-02-10 15:09:00:901 - info: [debug] Starting instruments
2015-02-10 15:09:00:908 - info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
2015-02-10 15:09:00:908 - info: Launching instruments
2015-02-10 15:09:00:909 - info: [debug] Attempting to run app on real device with UDID e47ba3300ef7bcbb943db3240b5213813a5d3938
2015-02-10 15:09:00:910 - 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 e47ba3300ef7bcbb943db3240b5213813a5d3938 com.vons.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-10 15:09:00:910 - info: [debug] And extra without-delay env: {}
2015-02-10 15:09:00:910 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-10 15:09:01:652 - 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.xxx.j4u.entprod'
2015-02-10 15:09:01:668 - info: [debug] [INST STDERR] 2015-02-10 20:39:01.668 instruments[3697:4b1b] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-02-10 15:09:01:675 - info: [debug] [INSTSERVER] Instruments exited with code 253
2015-02-10 15:09:01:676 - info: [debug] Killall instruments
2015-02-10 15:09:01:678 - info: [debug] Instruments crashed on startup
2015-02-10 15:09:01:678 - info: [debug] Attempting to retry launching instruments, this is retry #1
2015-02-10 15:09:01:678 - info: [debug] Killall iOS Simulator
2015-02-10 15:09:03:982 - info: --> GET /wd/hub/status {}
2015-02-10 15:09:03:983 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"},"isShuttingDown":false},"sessionId":"486211da-c92f-4862-a125-1b0f23cf0214"}
2015-02-10 15:09:03:984 - info: <-- GET /wd/hub/status 200 1.379 ms - 178 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"},"isShuttingDown":false},"sessionId":"486211da-c92f-4862-a125-1b0f23cf0214"}
2015-02-10 15:09:06:681 - info: Launching instruments
2015-02-10 15:09:06:682 - info: [debug] Attempting to run app on real device with UDID e47ba3300ef7bcbb943db3240b5213813a5d3938
2015-02-10 15:09:06:682 - 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 e47ba3300ef7bcbb943db3240b5213813a5d3938 com.vons.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-10 15:09:06:682 - info: [debug] And extra without-delay env: {}
2015-02-10 15:09:06:683 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-10 15:09:07:361 - info: [debug] [INST STDERR] 2015-02-10 20:39:07.360 instruments[3700:1307] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-02-10 15:09:07:415 - 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.xxxx.j4u.entprod'
2015-02-10 15:09:07:426 - info: [debug] [INSTSERVER] Instruments exited with code 253
2015-02-10 15:09:07:427 - info: [debug] Killall instruments
2015-02-10 15:09:07:429 - info: [debug] Instruments crashed on startup
2015-02-10 15:09:07:429 - info: [debug] Attempting to retry launching instruments, this is retry #2
2015-02-10 15:09:07:429 - info: [debug] Killall iOS Simulator
2015-02-10 15:09:12:432 - info: Launching instruments
2015-02-10 15:09:12:433 - info: [debug] Attempting to run app on real device with UDID e47ba3300ef7bcbb943db3240b5213813a5d3938
2015-02-10 15:09:12:433 - 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 e47ba3300ef7bcbb943db3240b5213813a5d3938 com.vons.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-10 15:09:12:433 - info: [debug] And extra without-delay env: {}
2015-02-10 15:09:12:433 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-10 15:09:13:044 - info: [debug] [INST STDERR] 2015-02-10 20:39:13.043 instruments[3703:5d07] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-02-10 15:09:13:149 - 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.xxx.j4u.entprod'
2015-02-10 15:09:13:160 - info: [debug] [INSTSERVER] Instruments exited with code 253
2015-02-10 15:09:13:160 - info: [debug] Killall instruments
2015-02-10 15:09:13:163 - info: [debug] Instruments crashed on startup
2015-02-10 15:09:13:163 - info: [debug] Attempting to retry launching instruments, this is retry #3
2015-02-10 15:09:13:163 - info: [debug] Killall iOS Simulator
2015-02-10 15:09:18:167 - info: Launching instruments
2015-02-10 15:09:18:168 - info: [debug] Attempting to run app on real device with UDID e47ba3300ef7bcbb943db3240b5213813a5d3938
2015-02-10 15:09:18:168 - 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 e47ba3300ef7bcbb943db3240b5213813a5d3938 com.vons.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-10 15:09:18:168 - info: [debug] And extra without-delay env: {}
2015-02-10 15:09:18:168 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-10 15:09:18:807 - info: [debug] [INST STDERR] 2015-02-10 20:39:18.806 instruments[3706:4963] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-02-10 15:09:18:920 - 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.xxxx.j4u.entprod'
2015-02-10 15:09:18:931 - info: [debug] [INSTSERVER] Instruments exited with code 253
2015-02-10 15:09:18:931 - info: [debug] Killall instruments
2015-02-10 15:09:18:933 - info: [debug] Instruments crashed on startup
2015-02-10 15:09:18:933 - info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
2015-02-10 15:09:18:933 - info: [debug] Stopping iOS log capture
2015-02-10 15:09:18:934 - info: [debug] Reset not set, not ending sim or cleaning up app state
2015-02-10 15:09:18:934 - info: [debug] Cleaning up appium session
2015-02-10 15:09:18:934 - error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
2015-02-10 15:09:18:935 - 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)
2015-02-10 15:09:18:935 - 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}
2015-02-10 15:09:18:936 - info: <-- POST /wd/hub/session 500 35858.580 ms - 182

@imurchie
Copy link
Contributor

Manual testing is fine with an app not signed by a developer certificate. Apple's instruments, however, won't be able to automate it.

Try running the instruments command on its own:

/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 e47ba3300ef7bcbb943db3240b5213813a5d3938 com.vons.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments

@ghost
Copy link

ghost commented Feb 10, 2015

@imurchie, this command doesn't return anything for me. I was able to solve the issue, though. Usually I just grab .app files from the Jenkins. But this time I built .app locally in Xcode with proper developer profile and it worked. Now I can continue installing .app from Jenkins, so I had to built .app in Xcode once only. That sounds odd to me. However, I was able to fix two devices this way...

@kiransweng
Copy link

@imurchie: Thanks for your response. Predominantly , when to use given command?
I did execute the script , received same error. After execution , from the terminal applied the given command line and received the same error
Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com.XXXX.j4u.entprod'

could you please give some detailed guidelines in order to crack this issue?

Regards,
Kiran

@imurchie
Copy link
Contributor

That command is what Appium is using to launch your app with Instruments. I just pulled it from your log file. Apple's tools cannot launch your application, unfortunately. Usually this means that it is either built for the wrong target (e.g., trying to run a build for a real device on the simulator, or vice versa) or that it is not signed right for the device.

@kiransweng
Copy link

@imurchie : I have received build which is included device udid under test.
I did run the simple script to install and launch app. received below error.

Instruments Usage Error : Specified target process is invalid: com.XXXXX.j4u.entprod

as per your suggestion , i have copied above command from the log and executed , received same error.

please see below log and suggest me what could be the reason for this. Dev team is said device udid is included. I am seeing App is not installed. Could you please assist me.

2015-02-11 18:33:25:720 - info: Welcome to Appium v1.3.4 (REV c8c79a8)
2015-02-11 18:33:25:723 - info: Appium REST http interface listener started on 0.0.0.0:4723
2015-02-11 18:33:25:725 - info: [debug] Non-default server args: {"noReset":true,"log":"/Kiran/appium.log","platformName":"iOS","platformVersion":"8.1","defaultDevice":true,"showSimulatorLog":true,"defaultCommandTimeout":7200}
2015-02-11 18:33:25:725 - warn: Deprecated server args: {"--show-sim-log":"use instead: --show-ios-log"}
2015-02-11 18:33:25:726 - info: Console LogLevel: debug
2015-02-11 18:33:25:726 - info: File LogLevel: debug
2015-02-11 18:33:25:898 - info: --> GET /wd/hub/status {}
2015-02-11 18:33:25:900 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:33:25:903 - info: <-- GET /wd/hub/status 200 5.332 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:33:36:907 - info: --> GET /wd/hub/status {}
2015-02-11 18:33:36:907 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:33:36:908 - info: <-- GET /wd/hub/status 200 1.479 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:33:38:384 - info: --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"Appium","platfromName":"iOS","app":"/kiran/ReferenceFiles/Safeway(6).ipa","showIOSLog":true,"platformName":"iOS","deviceName":"Safeway's iPhone","browserName":"","autoLaunch":true,"bundleId":"com.safeway.j4u.entprod","udid":"4c4426d3a66cef2ebc6258f9f07e70472022c7b1","platfromVersion":"8.0"}}
2015-02-11 18:33:38:385 - info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
2015-02-11 18:33:38:386 - 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. : platfromName, platfromVersion
2015-02-11 18:33:38:388 - info: [debug] Using local .ipa from desired caps: /kiran/ReferenceFiles/Safeway(6).ipa
2015-02-11 18:33:38:388 - info: [debug] Copying local zip to tmp dir
2015-02-11 18:33:38:428 - info: [debug] /kiran/ReferenceFiles/Safeway(6).ipa copied to /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115112-7415-k15lsk/appium-app.zip
2015-02-11 18:33:38:437 - info: [debug] Unzipping /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115112-7415-k15lsk/appium-app.zip
2015-02-11 18:33:38:437 - info: [debug] Testing zip archive: /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115112-7415-k15lsk/appium-app.zip
2015-02-11 18:33:38:732 - info: [debug] Zip archive tested clean
2015-02-11 18:33:39:221 - info: [debug] Unzip successful
2015-02-11 18:33:39:222 - info: [debug] Using locally extracted app: /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115112-7415-k15lsk/Payload/Safeway.app
2015-02-11 18:33:39:223 - info: [debug] Creating new appium session 89584e9d-8990-44ac-be1a-b835e6965168
2015-02-11 18:33:39:225 - info: [debug] Removing any remaining instruments sockets
2015-02-11 18:33:39:226 - info: [debug] Cleaned up instruments socket /tmp/instruments_sock
2015-02-11 18:33:39:226 - info: [debug] Setting Xcode folder
2015-02-11 18:33:39:232 - info: [debug] Setting Xcode version
2015-02-11 18:33:39:283 - info: [debug] Setting iOS SDK Version
2015-02-11 18:33:39:335 - info: [debug] Getting sdk version from xcrun with a timeout
2015-02-11 18:33:39:340 - info: [debug] iOS SDK Version set to 8.1
2015-02-11 18:33:39:341 - info: [debug] Not checking whether simulator is available since we're on a real device
2015-02-11 18:33:39:341 - info: [debug] Detecting automation tracetemplate
2015-02-11 18:33:39:346 - info: [debug] Not auto-detecting udid, running on sim
2015-02-11 18:33:39:347 - info: [debug] Could not parse plist file (as binary) at /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115112-7415-k15lsk/Payload/Safeway.app/en.lproj/Localizable.strings
2015-02-11 18:33:39:347 - info: Will try to parse the plist file as XML
2015-02-11 18:33:39:349 - info: [debug] Could not parse plist file (as XML) at /var/folders/qc/jks58bf550d13ltv9vwpy4mr0000gn/T/115112-7415-k15lsk/Payload/Safeway.app/en.lproj/Localizable.strings
2015-02-11 18:33:39:349 - warn: Could not parse app Localizable.strings; assuming it doesn't exist
2015-02-11 18:33:39:350 - info: [debug] Creating instruments
2015-02-11 18:33:39:350 - 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
2015-02-11 18:33:39:351 - info: [debug] Preparing uiauto bootstrap
2015-02-11 18:33:39:351 - info: [debug] Dynamic bootstrap dir: /Users/admin/Library/Application Support/appium/bootstrap
2015-02-11 18:33:39:351 - 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"}
2015-02-11 18:33:39:358 - info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
2015-02-11 18:33:39:358 - info: [debug] Dynamic bootstrap path: /Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js
2015-02-11 18:33:39:361 - info: [debug] Reusing dynamic bootstrap: /Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js
2015-02-11 18:33:39:362 - info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"Safeway's iPhone","platformVersion":"8.1"}
2015-02-11 18:33:39:363 - info: [debug] fixDevice is on
2015-02-11 18:33:39:363 - info: [debug] Final device string is: 'Safeway's iPhone (8.1 Simulator)'
2015-02-11 18:33:39:363 - info: [debug] Not setting device type since we're on a real device
2015-02-11 18:33:39:364 - info: [debug] Checking whether we need to set app preferences
2015-02-11 18:33:39:364 - info: [debug] Not setting iOS and app preferences since we're on a real device
2015-02-11 18:33:39:364 - info: [debug] Reset not set, not ending sim or cleaning up app state
2015-02-11 18:33:39:364 - info: [debug] Not setting locale because we're using a real device
2015-02-11 18:33:39:364 - info: [debug] No iOS / app preferences to set
2015-02-11 18:33:39:365 - info: [debug] Starting iOS device log capture via deviceconsole
2015-02-11 18:33:40:454 - info: [debug] Not pre-launching simulator
2015-02-11 18:33:40:455 - info: [debug] Creating iDevice object with udid 4c4426d3a66cef2ebc6258f9f07e70472022c7b1
2015-02-11 18:33:40:456 - info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 4c4426d3a66cef2ebc6258f9f07e70472022c7b1 --bundle com.safeway.j4u.entprod
2015-02-11 18:33:41:265 - info: [debug] App is not installed. Will try to install the app.
2015-02-11 18:33:41:266 - info: [debug] Installing ipa found at /kiran/ReferenceFiles/Safeway(6).ipa
2015-02-11 18:33:41:266 - info: [debug] Creating iDevice object with udid 4c4426d3a66cef2ebc6258f9f07e70472022c7b1
2015-02-11 18:33:42:827 - info: [debug] Nothing found on device, going ahead and installing.
2015-02-11 18:33:42:831 - info: [debug] Starting command proxy.
2015-02-11 18:33:42:832 - info: [debug] Instruments socket server started at /tmp/instruments_sock
2015-02-11 18:33:42:833 - info: [debug] Starting instruments
2015-02-11 18:33:42:839 - info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
2015-02-11 18:33:42:839 - info: Launching instruments
2015-02-11 18:33:42:841 - info: [debug] Attempting to run app on real device with UDID 4c4426d3a66cef2ebc6258f9f07e70472022c7b1
2015-02-11 18:33:42:842 - 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 4c4426d3a66cef2ebc6258f9f07e70472022c7b1 com.safeway.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-11 18:33:42:842 - info: [debug] And extra without-delay env: {}
2015-02-11 18:33:42:842 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-11 18:33:43:536 - info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: com.safeway.j4u.entprod
instruments, version 6.1 (56160)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
2015-02-11 18:33:43:544 - info: [debug] [INSTSERVER] Instruments exited with code 255
2015-02-11 18:33:43:545 - info: [debug] Killall instruments
2015-02-11 18:33:43:547 - info: [debug] Instruments crashed on startup
2015-02-11 18:33:43:547 - info: [debug] Attempting to retry launching instruments, this is retry #1
2015-02-11 18:33:43:547 - info: [debug] Killall iOS Simulator
2015-02-11 18:33:48:551 - info: Launching instruments
2015-02-11 18:33:48:552 - info: [debug] Attempting to run app on real device with UDID 4c4426d3a66cef2ebc6258f9f07e70472022c7b1
2015-02-11 18:33:48:552 - 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 4c4426d3a66cef2ebc6258f9f07e70472022c7b1 com.safeway.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-11 18:33:48:553 - info: [debug] And extra without-delay env: {}
2015-02-11 18:33:48:553 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-11 18:33:49:202 - info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: com.safeway.j4u.entprod
instruments, version 6.1 (56160)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
2015-02-11 18:33:49:211 - info: [debug] [INSTSERVER] Instruments exited with code 255
2015-02-11 18:33:49:211 - info: [debug] Killall instruments
2015-02-11 18:33:49:213 - info: [debug] Instruments crashed on startup
2015-02-11 18:33:49:213 - info: [debug] Attempting to retry launching instruments, this is retry #2
2015-02-11 18:33:49:214 - info: [debug] Killall iOS Simulator
2015-02-11 18:33:54:216 - info: Launching instruments
2015-02-11 18:33:54:217 - info: [debug] Attempting to run app on real device with UDID 4c4426d3a66cef2ebc6258f9f07e70472022c7b1
2015-02-11 18:33:54:217 - 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 4c4426d3a66cef2ebc6258f9f07e70472022c7b1 com.safeway.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-11 18:33:54:217 - info: [debug] And extra without-delay env: {}
2015-02-11 18:33:54:218 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-11 18:33:54:915 - info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: com.safeway.j4u.entprod
instruments, version 6.1 (56160)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
2015-02-11 18:33:54:923 - info: [debug] [INSTSERVER] Instruments exited with code 255
2015-02-11 18:33:54:923 - info: [debug] Killall instruments
2015-02-11 18:33:54:926 - info: [debug] Instruments crashed on startup
2015-02-11 18:33:54:926 - info: [debug] Attempting to retry launching instruments, this is retry #3
2015-02-11 18:33:54:926 - info: [debug] Killall iOS Simulator
2015-02-11 18:33:59:930 - info: Launching instruments
2015-02-11 18:33:59:930 - info: [debug] Attempting to run app on real device with UDID 4c4426d3a66cef2ebc6258f9f07e70472022c7b1
2015-02-11 18:33:59:931 - 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 4c4426d3a66cef2ebc6258f9f07e70472022c7b1 com.safeway.j4u.entprod -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js" -e UIARESULTSPATH /tmp/appium-instruments
2015-02-11 18:33:59:931 - info: [debug] And extra without-delay env: {}
2015-02-11 18:33:59:931 - info: [debug] And launch timeouts (in ms): {"global":90000}
2015-02-11 18:34:00:651 - info: [debug] [INST STDERR] 2015-02-12 00:04:00.650 instruments[7446:5b03] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-02-11 18:34:00:662 - info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: com.safeway.j4u.entprod
instruments, version 6.1 (56160)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
2015-02-11 18:34:00:671 - info: [debug] [INSTSERVER] Instruments exited with code 255
2015-02-11 18:34:00:672 - info: [debug] Killall instruments
2015-02-11 18:34:00:675 - info: [debug] Instruments crashed on startup
2015-02-11 18:34:00:675 - info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
2015-02-11 18:34:00:696 - info: [debug] Stopping iOS log capture
2015-02-11 18:34:00:696 - info: [debug] Reset not set, not ending sim or cleaning up app state
2015-02-11 18:34:00:696 - info: [debug] Cleaning up appium session
2015-02-11 18:34:00:697 - error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
2015-02-11 18:34:00:697 - 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)
2015-02-11 18:34:00:698 - 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}
2015-02-11 18:34:00:699 - info: <-- POST /wd/hub/session 500 22315.368 ms - 182
2015-02-11 18:34:12:322 - info: --> GET /wd/hub/status {}
2015-02-11 18:34:12:322 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:34:12:323 - info: <-- GET /wd/hub/status 200 1.049 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:34:37:909 - info: --> GET /wd/hub/status {}
2015-02-11 18:34:37:909 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:34:37:910 - info: <-- GET /wd/hub/status 200 0.762 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:35:13:325 - info: --> GET /wd/hub/status {}
2015-02-11 18:35:13:326 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:35:13:326 - info: <-- GET /wd/hub/status 200 1.261 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:35:38:911 - info: --> GET /wd/hub/status {}
2015-02-11 18:35:38:912 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:35:38:912 - info: <-- GET /wd/hub/status 200 1.252 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:36:14:327 - info: --> GET /wd/hub/status {}
2015-02-11 18:36:14:329 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:36:14:330 - info: <-- GET /wd/hub/status 200 2.684 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:36:39:914 - info: --> GET /wd/hub/status {}
2015-02-11 18:36:39:914 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:36:39:914 - info: <-- GET /wd/hub/status 200 0.748 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:37:18:819 - info: --> GET /wd/hub/status {}
2015-02-11 18:37:18:819 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:37:18:820 - info: <-- GET /wd/hub/status 200 0.755 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:37:40:915 - info: --> GET /wd/hub/status {}
2015-02-11 18:37:40:915 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:37:40:915 - info: <-- GET /wd/hub/status 200 0.724 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:38:25:816 - info: --> GET /wd/hub/status {}
2015-02-11 18:38:25:816 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:38:25:817 - info: <-- GET /wd/hub/status 200 0.799 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:38:41:916 - info: --> GET /wd/hub/status {}
2015-02-11 18:38:41:916 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:38:41:917 - info: <-- GET /wd/hub/status 200 0.747 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:39:35:815 - info: --> GET /wd/hub/status {}
2015-02-11 18:39:35:815 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:39:35:815 - info: <-- GET /wd/hub/status 200 0.795 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:39:51:746 - info: --> GET /wd/hub/status {}
2015-02-11 18:39:51:746 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:39:51:747 - info: <-- GET /wd/hub/status 200 0.802 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:40:36:816 - info: --> GET /wd/hub/status {}
2015-02-11 18:40:36:816 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:40:36:816 - info: <-- GET /wd/hub/status 200 0.747 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:40:55:811 - info: --> GET /wd/hub/status {}
2015-02-11 18:40:55:811 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:40:55:812 - info: <-- GET /wd/hub/status 200 0.808 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:41:46:809 - info: --> GET /wd/hub/status {}
2015-02-11 18:41:46:809 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:41:46:810 - info: <-- GET /wd/hub/status 200 0.910 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:41:56:915 - info: --> GET /wd/hub/status {}
2015-02-11 18:41:56:916 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:41:56:916 - info: <-- GET /wd/hub/status 200 0.788 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:42:47:812 - info: --> GET /wd/hub/status {}
2015-02-11 18:42:47:812 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:42:47:813 - info: <-- GET /wd/hub/status 200 0.807 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:42:57:918 - info: --> GET /wd/hub/status {}
2015-02-11 18:42:57:918 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:42:57:919 - info: <-- GET /wd/hub/status 200 1.433 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:43:48:815 - info: --> GET /wd/hub/status {}
2015-02-11 18:43:48:815 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:43:48:816 - info: <-- GET /wd/hub/status 200 1.052 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:43:59:803 - info: --> GET /wd/hub/status {}
2015-02-11 18:43:59:803 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:43:59:804 - info: <-- GET /wd/hub/status 200 0.782 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:44:53:802 - info: --> GET /wd/hub/status {}
2015-02-11 18:44:53:802 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:44:53:803 - info: <-- GET /wd/hub/status 200 1.403 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:45:03:915 - info: --> GET /wd/hub/status {}
2015-02-11 18:45:03:916 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:45:03:916 - info: <-- GET /wd/hub/status 200 0.741 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:46:02:905 - info: --> GET /wd/hub/status {}
2015-02-11 18:46:02:906 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:46:02:906 - info: <-- GET /wd/hub/status 200 0.780 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:46:13:796 - info: --> GET /wd/hub/status {}
2015-02-11 18:46:13:796 - info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
2015-02-11 18:46:13:797 - info: <-- GET /wd/hub/status 200 1.164 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}

@imurchie
Copy link
Contributor

It looks like the app is not being installed? Can you try installing it manually (either using Xcode or following this)? Also, you can search for this problem, and post, on the Appium discuss list.

@imurchie
Copy link
Contributor

Any update on this?

@moizjv
Copy link
Member

moizjv commented Apr 23, 2015

Closing due to inactivity

@moizjv moizjv closed this as completed Apr 23, 2015
@tfcardoso
Copy link

I'm having same problem... It installs the app in real device and then cannot lunch it.

This is the command where it fails:

/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 39bcf05aabb1bddf783b79d452cca052b32e2f2f com.xxx.joynenter -e UIASCRIPT "/Users/wcs_mac/Library/Application Support/appium/bootstrap/bootstrap-c5bdf70fd65223c0.js" -e UIARESULTSPATH /tmp/appium-instruments

And the response error is:

instruments[54794:4b1f] WebKit Threading Violation - initial use of WebKit from a secondary thread.
Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 3.) : Failed to launch process with bundle identifier 'com.xxx.joynenter'

@sebv sebv removed Needs Triage bugs which are not yet confirmed OnGoing labels Jun 3, 2015
@PavithraRavichandran
Copy link

I'm facing the same issue "Instruments crashes on startup"
Appium version: 1.4.8
Xcode version : 6.1.1
Real Device : iPod
iOS version : 8.1.2'I'm trying to prelaunch the application on the real device, I'm getting the following error,Launching Appium with command: export NEW_KEY="NEW_VALUE"; export NEW_KEY="NEW_VALUE"; export NEW_KEY="NEW_VALUE"; '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --address "127.0.0.1" --command-timeout "7200" --pre-launch --debug-log-spacing --platform-version "8.1.2" --platform-name "iOS" --app "/Users/QABPA/Downloads/MatrixeServicesV4_02.ipa" --udid "8cf7c3786c7fdc22a664beef69bd64520ef91082" --full-reset --show-ios-log --show-ios-log --default-device --launch-timeout "90000" --native-instruments-lib

info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app
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 command line: /Users/QABPA/Downloads/MatrixeServicesV4_02.ipa
info: [debug] Copying local zip to tmp dir

info: [debug] /Users/QABPA/Downloads/MatrixeServicesV4_02.ipa copied to /var/folders/fj/cv23bkdd5b9cdx8gly3kn36m0000gt/T/115710-5716-1g8ulcs/appium-app.zip

info: [debug] Unzipping /var/folders/fj/cv23bkdd5b9cdx8gly3kn36m0000gt/T/115710-5716-1g8ulcs/appium-app.zip
info: [debug] Testing zip archive: /var/folders/fj/cv23bkdd5b9cdx8gly3kn36m0000gt/T/115710-5716-1g8ulcs/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful

info: [debug] Using locally extracted app: /var/folders/fj/cv23bkdd5b9cdx8gly3kn36m0000gt/T/115710-5716-1g8ulcs/Payload/MatrixeServices.app

info: [debug] Creating new appium session 9b4d8e30-67ad-46ed-a411-65f41402f808
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim

info: [debug] Could not parse plist file (as binary) at /var/folders/fj/cv23bkdd5b9cdx8gly3kn36m0000gt/T/115710-5716-1g8ulcs/Payload/MatrixeServices.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/fj/cv23bkdd5b9cdx8gly3kn36m0000gt/T/115710-5716-1g8ulcs/Payload/MatrixeServices.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: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/QABPA/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/QABPA/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

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

info: [debug] Creating iDevice object with udid 8cf7c3786c7fdc22a664beef69bd64520ef91082

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

info: [debug] Installing ipa found at /Users/QABPA/Downloads/MatrixeServicesV4_02.ipa

info: [debug] Nothing found on device, going ahead and installing.

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:46 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:47 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:48 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:48 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:48 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch mobile_installation_proxy[1502] : LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x16e5fa90> com.acinfotech.eServicesSTG
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch mobile_installation_proxy[1502] : LaunchServices: Not creating progress for <LSApplicationProxy: 0x16e5fa90> com.acinfotech.eServicesSTG since it is not a placeholder.
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:49 Credits-iPod-touch installd[1322] : 0x403000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/com.acinfotech.eServicesSTG" type Customer requested by mobile_installation_proxy (pid 1502)

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:50 Credits-iPod-touch installd[1322] : 0x403000 -[MIInstaller performInstallationWithError:]: Installing

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:50 Credits-iPod-touch profiled[1225] : (Note ) MC: Provisioning profiles changed

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:50 Credits-iPod-touch installd[1322] : SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:51 Credits-iPod-touch installd[1322] : 0x403000 -[MIContainer makeContainerLiveReplacingContainer:withError:]: Made container live for com.acinfotech.eServicesSTG at /private/var/mobile/Containers/Data/Application/58058854-4DCB-4C08-9220-E26B86C519C3

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:51 Credits-iPod-touch installd[1322] : 0x403000 -[MIContainer makeContainerLiveReplacingContainer:withError:]: Made container live for com.acinfotech.eServicesSTG at /private/var/mobile/Containers/Bundle/Application/35350549-44B3-4970-BE71-173B8B6AFEDE

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:51 Credits-iPod-touch installd[1322] : 0x403000 -[MIInstaller performInstallationWithError:]: Staging: 1.64s; Waiting: 0.00s; Installation: 1.06s; Overall: 2.71s

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:51 Credits-iPod-touch lsd[73] : LaunchServices: Updating identifier store

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:51 Credits-iPod-touch syncdefaultsd[1522] : (Note ) marked "com.me.keyvalueservice" topic as "opportunistic" on <APSConnection: 0x156454b0>

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:52 Credits-iPod-touch SpringBoard[42] : libMobileGestalt MobileGestalt.c:841: stand-alone-contacts is static and will never generate a notification

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:52 Credits-iPod-touch SpringBoard[42] : libMobileGestalt MobileGestalt.c:841: still-camera is static and will never generate a notification
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:52 Credits-iPod-touch SpringBoard[42] : libMobileGestalt MobileGestalt.c:841: any-telephony is static and will never generate a notification

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:52 Credits-iPod-touch SpringBoard[42] : libMobileGestalt MobileGestalt.c:841: nike-ipod is static and will never generate a notification

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:52 Credits-iPod-touch SpringBoard[42] : Installed apps did change.

info: [IOS_SYSLOG_ROW ] Added: {(
info: [IOS_SYSLOG_ROW ] "com.acinfotech.eServicesSTG"
info: [IOS_SYSLOG_ROW ] )}
info: [IOS_SYSLOG_ROW ] Removed: {(
info: [IOS_SYSLOG_ROW ] )}
info: [IOS_SYSLOG_ROW ] Modified: {(
info: [IOS_SYSLOG_ROW ] )}

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:54 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:54 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:54 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:54 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

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 8cf7c3786c7fdc22a664beef69bd64520ef91082
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 8cf7c3786c7fdc22a664beef69bd64520ef91082 com.acinfotech.eServicesSTG -e UIASCRIPT "/Users/QABPA/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:56 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:56 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

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: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch DTMobileIS[1392] : Could not create service named com.apple.instruments.server.services.launchdaemon
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch DTMobileIS[1392] : Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
info: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch notification_proxy[1319] : 0x2d3000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

info: [IOS_SYSLOG_ROW ] Aug 10 15:58:57 Credits-iPod-touch notification_proxy[1319] : 0x355000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID 8cf7c3786c7fdc22a664beef69bd64520ef91082
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 8cf7c3786c7fdc22a664beef69bd64520ef91082 com.acinfotech.eServicesSTG -e UIASCRIPT "/Users/QABPA/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:02 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:02 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

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: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch DTMobileIS[1392] : Could not create service named com.apple.instruments.server.services.launchdaemon
info: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch DTMobileIS[1392] : Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
info: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch notification_proxy[1319] : 0x3d9000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:03 Credits-iPod-touch notification_proxy[1319] : 0x2d3000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:04 Credits-iPod-touch assistant_service[1391] : the local store doesn't allow tasks and we have no default calendar :(

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID 8cf7c3786c7fdc22a664beef69bd64520ef91082
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 8cf7c3786c7fdc22a664beef69bd64520ef91082 com.acinfotech.eServicesSTG -e UIASCRIPT "/Users/QABPA/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js" -e UIARESULTSPATH /tmp/appium-instruments

info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

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: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch DTMobileIS[1392] : Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch DTMobileIS[1392] : Could not create service named com.apple.instruments.server.services.launchdaemon
info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch notification_proxy[1319] : 0x3d9000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:08 Credits-iPod-touch notification_proxy[1319] : 0x3d9000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

info: Launching instruments

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

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 8cf7c3786c7fdc22a664beef69bd64520ef91082 com.acinfotech.eServicesSTG -e UIASCRIPT "/Users/QABPA/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:14 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:14 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:14 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:14 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:14 Credits-iPod-touch kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22

info: [IOS_SYSLOG_ROW ] Aug 10 15:59:14 Credits-iPod-touch lockdownd[25] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

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] fullReset requested. Will try to uninstall the app.

info: [debug] Removed com.acinfotech.eServicesSTG

info: [debug] Cleaning up appium session

error: Could not pre-launch appium: Error: Instruments crashed on startup

@msiles
Copy link

msiles commented Jan 5, 2016

I'm new to appium, and I'm trying to run an example using the following code

    DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
    desiredCapabilities.setCapability("deviceName", "iPhone 6");
    desiredCapabilities.setCapability("platformName", "iOS");
    desiredCapabilities.setCapability("platformVersion", "9.2");
    desiredCapabilities.setCapability("app", "http://appium.s3.amazonaws.com/TestApp6.0.app.zip");

    driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), desiredCapabilities);
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

But I'm getting the following error, the emulator loads and then is closed

nfo: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
info: [debug] Using downloadable app from desired caps: http://appium.s3.amazonaws.com/TestApp6.0.app.zip
info: [debug] http://appium.s3.amazonaws.com/TestApp6.0.app.zip downloaded to /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/appium-app.zip
info: [debug] Unzipping /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/appium-app.zip
info: [debug] Testing zip archive: /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using extracted app: /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/TestApp.app
info: [debug] Creating new appium session 36711793-8a8c-4df2-945e-983a585c1d63
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
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","iOSSDKVersion":"9.2","deviceName":"iPhone 6","platformVersion":"9.2"}
info: [debug] fixDevice is on
info: [debug] Fixing device. Changed from: "iPhone 6 (9.2)" to: "iPhone 6 (9.2) ["
info: [debug] Final device string is: 'iPhone 6 (9.2) ['
info: [debug] iOS sim UDID is 5D6F2EC4-53A3-41E2-BCA6-108B991591C7
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/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/TestApp.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/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/TestApp.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: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/moisessiles/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/Cellar/node/5.1.1/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,"autoDismissAlerts":false,"sendKeyStrategy":"oneByOne"}
...o: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
info: [debug] Dynamic bootstrap path: /Users/moisessiles/Library/Application Support/appium/bootstrap/bootstrap-31aa7a0a87b34468.js
info: [debug] Reusing dynamic bootstrap: /Users/moisessiles/Library/Application Support/appium/bootstrap/bootstrap-31aa7a0a87b34468.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"7.2","iOSSDKVersion":"9.2","deviceName":"iPhone 6","platformVersion":"9.2"}
info: [debug] fixDevice is on
info: [debug] Fixing device. Changed from: "iPhone 6 (9.2)" to: "iPhone 6 (9.2) ["
info: [debug] Final device string is: 'iPhone 6 (9.2) ['
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","iOSSDKVersion":"9.2","deviceName":"iPhone 6","platformVersion":"9.2"}
info: [debug] fixDevice is on
info: [debug] Fixing device. Changed from: "iPhone 6 (9.2)" to: "iPhone 6 (9.2) ["
info: [debug] Final device string is: 'iPhone 6 (9.2) ['
info: [debug] Parsed app Info.plist (as binary)
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] Killall Simulator
info: [debug] Cleaning sim data files
info: node-simctl: Executing: xcrun with args: simctl erase 5D6F2EC4-53A3-41E2-BCA6-108B991591C7 and timeout: 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/moisessiles/Library/Developer/CoreSimulator/Devices/5D6F2EC4-53A3-41E2-BCA6-108B991591C7/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/moisessiles/Library/Developer/CoreSimulator/Devices/5D6F2EC4-53A3-41E2-BCA6-108B991591C7/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] 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 6 (9.2) [
info: On xcode 7.0, instruments-without-delay does not work, skippinginstruments-without-delay
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 6 (9.2) [" /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/TestApp.app -e UIASCRIPT "/Users/moisessiles/Library/Application Support/appium/bootstrap/bootstrap-31aa7a0a87b34468.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST] 2016-01-05 17:28:42 +0000 Fail: The target application appears to have died
info: [debug] [INST STDERR] 2016-01-05 11:28:42.346 instruments[55236:7415736] Attempting to change event horizon while disengage
info: [debug] [INST] Instruments Trace Complete (Duration : 16.593248s; 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 Simulator
info: Launching instruments
info: [debug] Attempting to run app on iPhone 6 (9.2) [
info: On xcode 7.0, instruments-without-delay does not work, skippinginstruments-without-delay
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 6 (9.2) [" /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/11605-53108-1sjef9d/TestApp.app -e UIASCRIPT "/Users/moisessiles/Library/Application Support/appium/bootstrap/bootstrap-31aa7a0a87b34468.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And launch timeouts (in ms): {"global":90000}

@shiyimin
Copy link

shiyimin commented Jan 7, 2016

it seems that check "Use Native Instrument Library" on Appium iOS setting panel fixes this issue.

@msiles
Copy link

msiles commented Jan 10, 2016

It is already checked but I'm still getting the message, I tried with this app
https://github.com/appium/sample-code/blob/master/sample-code/apps/UICatalog.zip

error: Could not get the bundleId from app.

info: [debug] Could not parse plist file (as binary) at /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.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/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.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] Could not parse plist file (as binary) at /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.app/Info.plist
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.app/Info.plist
info: [debug] Cleaning up appium session
info: [debug] Error: ENOENT, no such file or directory '/var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.app/Info.plist'
at Error (native)
at Object.fs.openSync (fs.js:500:18)
at Object.fs.readFileSync (fs.js:352:15)
at parseXmlPlistFile (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:38:25)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:51:7
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/bplist-parser/bplistParser.js:37:25
at fs.js:263:20
at FSReqWrap.oncomplete (fs.js:95:15)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: ENOENT, no such file or directory '/var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.app/Info.plist')","errno":-2,"code":"ENOENT","path":"/var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.app/Info.plist","syscall":"open","origValue":"ENOENT, no such file or directory '/var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.app/Info.plist'"},"sessionId":null}
info: <-- POST /wd/hub/session 500 5262.419 ms - 629

error: Could not set the bundleId from app.
error: Failed to start an Appium session, err was: Error: ENOENT, no such file or directory '/var/folders/mj/ysvr7x097ynb626pxp6f2zbm0000gn/T/116010-71466-zn65h1/UICatalog/UICatalog/Images.xcassets/AppIcon.app/Info.plist'

@907howard
Copy link

Even I was facing the same issue, the simulator was getting crashed and was not launching , but when I saw @shiyimin 's comment and his resolution worked, simulator loads now without any crash,if I check the "Use Native Instrument Library" on Appium iOS setting panel.

Thanks a lot @shiyimin

@uzmasyed00
Copy link

@kirillzhukov-cc

How do you build app from Xcode to developer profile?

@tfcardoso
Were you able to resolve the problem? If yes, how so?

@lock
Copy link

lock bot commented Apr 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests