Appium inspector throws error on launch

Hi,

When am trying to open the Appium inspector to find the elements of my iOS app. My appium inspector is failing with the error “Could not launch Appium Inspector”.

Below is the Server response:

2016-09-16 20:37:12:850 - info: Launching instruments

2016-09-16 20:37:12:852 - info: [debug] Attempting to run app on real device with UDID a94253a9ee69448998fac97f1a513d73626f06bd
2016-09-16 20:37:12:854 - 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 a94253a9ee69448998fac97f1a513d73626f06bd com.test.application -e UIASCRIPT “/Users/users/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js” -e UIARESULTSPATH /tmp/appium-instruments
2016-09-16 20:37:12:856 - info: [debug] And extra without-delay env: {}
2016-09-16 20:37:12:857 - info: [debug] And launch timeouts (in ms): {“global”:90000}

2016-09-16 20:37:15:404 - info: [debug] [INST STDERR] 2016-09-16 20:37:15.403 instruments[3550:127969] WebKit Threading Violation - initial use of WebKit from a secondary thread.

2016-09-16 20:37:16:124 - info: [debug] [INST STDERR] Instruments Usage Error: Specified target process is invalid: com.test.application
instruments, version 7.3 (60134)

2016-09-16 20:37:16:127 - info: [debug] [INST STDERR] usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument …]]]

2016-09-16 20:37:16:141 - info: [debug] [INSTSERVER] Instruments exited with code 255
2016-09-16 20:37:16:143 - info: [debug] Killall instruments
2016-09-16 20:37:16:149 - info: [debug] Instruments crashed on startup
2016-09-16 20:37:16:151 - info: [debug] Attempting to retry launching instruments, this is retry #3
2016-09-16 20:37:16:153 - info: [debug] Killall iOS Simulator

2016-09-16 20:37:21:155 - info: Launching instruments

2016-09-16 20:37:21:158 - info: [debug] Attempting to run app on real device with UDID a94253a9ee69448998fac97f1a513d73626f06bd
2016-09-16 20:37:21:160 - 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 a94253a9ee69448998fac97f1a513d73626f06bd com.test.applcation -e UIASCRIPT “/Users/users/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js” -e UIARESULTSPATH /tmp/appium-instruments
2016-09-16 20:37:21:162 - info: [debug] And extra without-delay env: {}
2016-09-16 20:37:21:163 - info: [debug] And launch timeouts (in ms): {“global”:90000}

2016-09-16 20:37:22:554 - info: [debug] [INST STDERR] 2016-09-16 20:37:22.554 instruments[3560:128110] WebKit Threading Violation - initial use of WebKit from a secondary thread.

2016-09-16 20:37:22:942 - info: [debug] [INST STDERR] Instruments Usage Error: Specified target process is invalid: com.test.application
instruments, version 7.3 (60134)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument …]]]

2016-09-16 20:37:22:958 - info: [debug] [INSTSERVER] Instruments exited with code 255
2016-09-16 20:37:22:960 - info: [debug] Killall instruments
2016-09-16 20:37:22:966 - info: [debug] Instruments crashed on startup

2016-09-16 20:37:23:169 - error: Failed to start an Appium session, err was: Error: Instruments crashed on startup

2016-09-16 20:37:22:968 - info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
2016-09-16 20:37:22:969 - info: [debug] Stopping iOS log capture
2016-09-16 20:37:22:971 - info: [debug] Running ios sim reset flow
2016-09-16 20:37:22:972 - info: [debug] Killing the simulator process
2016-09-16 20:37:22:974 - info: [debug] Killing any other simulator daemons
2016-09-16 20:37:22:988 - info: [debug] Killall iOS Simulator
2016-09-16 20:37:23:163 - info: [debug] On a real device; cannot clean device state
2016-09-16 20:37:23:166 - info: [debug] Cleaning up appium session
2016-09-16 20:37:23:173 - info: [debug] Error: Instruments crashed on startup
at [object Object].Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:440:31)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:353:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
2016-09-16 20:37:23:176 - 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}
2016-09-16 20:37:23:183 - info: <-- POST /wd/hub/session 500 34382.861 ms - 182

Application information:

  1. App is Distribution certified
  2. App is debug version
  3. Application doesn’t have UDID of the device linked. It can work in any device.
  4. We need to run the code in AWS device farm.

There’s your error. I’m sure there are more but get the actual bundle Id to fix this.

nope. Even after changing the process, am getting the same error.

You don’t just need to change the bundle id, you actually have to get it right.