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

Hi Naresh_Karre

Could you tell me if you were able to resolve the issue. I am facing the same problem.


I am also facing same issue, when i tried to inspect an iOS app in real physical device.

I was having the same issue but I fixed with enabling a flag in “Use Native Instruments Library” also from java (in case you want to launch the server from code) I just added the next line
command.addArgument("–native-instruments-lib", true);

This is got resolved for me. I will explain the steps which I have done.
Go to Xcode ->Click Open Developer Tools-> Click Instruments->In top of the Instruments tab you can find Choose a profiling template(Choose your iPhone device)->Select Automation->Click Choose button->Click the Play button.
Now your app get installed successfully in device.

While choosing the iPhone device should i choose the sub folder oatmobile application?
Already the play button is enabled…

@HASEENA, If I correctly interpret your question means, If you want your app get directly opened in appium means, you can choose target as your oatmobile application or else just select your device alone and click choose and then go to Appium and now launch appium server and you can able to inspect your app.

Application is showing WebDriverException if I am using sendkeys() even after including the java-client.jar.

I’ve seen this question in a few places and have encountered it myself. I believe I this is something you’re seeing with respect to the if I’m not mistaken? It turns out that the solve for me was to clone appium from git, build it, and then, via the Developer Settings, use the appium I had just built from git. Once I had done that, my problems went away.

The appium provided with the broke in several stages: It could not create a session, was unable to launch emulators, and finally, when setup as well as possible, had this instrumentations crash which I was unable (and unwilling) to further debug.

You might want to have a look at this tutorial:

Follow the basic steps to cloning and building appium and then override the appium that comes with the app and you should be back in working order.

Thank you sir this actually solved my problem. I was getting “Failed to start Instruments daemon. The service is invalid” because the UI automation was disabled on the phone.

go to Settings>Developer>and Enable UI Automation solved my problem. Thanks !

I tried enabling the UI automation and it was working till yesterday. But now all of a sudden Instruments is continuously crashing. So please help how to solve this issue

Hello There,

if the same problem persists with real devices, we need to inspect the same build through xcode.ones we do that then we can easily inspect the same with appium inspector.

For simulators i dont know answer.