[iOS]Instruments crashed on startup

Hello Kashif,

In order to Open inspector for any iOS application,

  1. The App should be in development mode(You can ask any of your developer to give the build in development mode)
  2. Either you can give App path/bundle ID, any one of these would be sufficient.
  3. if you still face the same problem please try the above step’s
  4. and still the problem persoist’s please post all the server log’s.

I hope i am making sense.

i can see that within the path there is a spaces. please replace the spaces either with _ or just delete the spaces in the path. It will work.

@Shiva.
Thanks for reply.

Okay I am going to do it.

One question is in my mind, that when ever I set Ios settings from appium, then i click Launch button, it show some logs and then print Appium is listening on xxx port.
Means appium ran successfully.

But it does not install app on ios simulator ? Like previously I was doing for Android, and after launching it runs app on android emulator.

Instead it tries to install app when i click on Inspector button .
Am i missing some thing ?

@shiva.

I am again having issue while clicking appium inspector.

I am attaching logs.
Kindly take a look.appium_ios_logs.txt (195.4 KB)

Try these steps and check if it helps:

  1. Change app file name from fsonic V2.ipa to fsonicV2.ipa (no space in the file name)
  2. Launch the Appium server and click on the Inspect icon (icon next to Doctor icon)

Okay, I will try that,

One more question ,

for iOS automation from appium, can we access source code of iOS application ? Or we just use ipa, and gets its UI element (means we cannot test background data)?

No we cannot access the source code unless its your own company’s app.

@Kashif

I have noticed one more issue in the appium UI inspector, i.e UDID of the device is missing in the UI automator.

When ever we are working on iOS device, we need to make sure that we give UDID of the device. please provide the UDID of the device in the text field.

I have met this issue once. After I remove the temporary files for appium under /tmp folder, the issue was gone.

I see a similar issue but slightly different. When I install the app on simulator via a script, the install goes through fine but the app keeps crashing. Manually if i try to open the app on simulator it crashes as well. The build i used were archived debug development build.

Can someone help me out here?

Error seen in logs:


Program specified by service does not contain one of the requested architectures: P

Error launching instruments: Instruments crashed on startup

@Priyank_Shah can you help out ?

You need developer signed app, as the instruments will not be able to communicate until and unless the app is dev signed.
Refer this link

Thank you. works for me now.

I got error:
We exceeded the number of retries allowed for instruments to successfully start

It was occurringe whenever I tried to run tests on a simulator that was duplicated - same simulator name was listed more than once (Xcode -> window -> devices).

Removing all duplicates helped, so if you want to remove this issue permanently, you need to find out what’s causing the simulator to duplicate.

I got the same issue that with “[Instruments] Error launching instruments: Instruments crashed on startup”,and the error code is 255, I find the develop was lost in my iphone,when I reopen it ,it could work.

Hi,

I’m also facing the same issue of error while launching instruments can you please tell how was ur issue resolved

You need developer signed app, as the instruments will not be able to communicate until and unless the app is dev signed.
Refer this link: http://appium.io/slate/en/master/?python#appium-on-real-ios-devices

I met the same problem. It’s not appium problem, but instruments, I tested another real iPhone, it works fine.

I write what I did here, hope these will be helpful:

  1. I installed xcode 7.3.1, and appium inspector worked fine on real iPhone(iPhone 6s)
  2. I met another problem, then I installed xcode 6.4, hoped to resolve the problem. Appium inspector didn’t work normally, instruments crashed :frowning:
  3. so I uninstalled xcode 6.4 and 7.3.1, and reinstalled xcode 6.4 first and then xcode 7.3.1, appium inspector didn’t work normally, too.
  4. Uninstalled xcode 6.4 and 7.3.1, only reinstalled xcode 7.3.1, and tried again. the same result.
  5. Use another real iPhone(iPhone 5), appium inspector worked fine. Instruments worked fine.

I think maybe something wrong on iPhone 6s. What will be installed on iPhone? The instruments version was in a mess? How to clean the data on iPhone? Anyone knows it?

With no logs you are asking purely for a guess. My guess is that Settings->Developer->Enable UI Automation is set on the one that works, but not the one that does not work.

Hi,
I’m also facing the issue

[debug] [Instruments] [INST STDERR] 2017-05-29 18:38:27.201 instruments[8825:149925] WebKit Threading Violation - initial use of WebKit from a secondary thread.

[debug] [Instruments] Instruments exited with code 253

[Instruments] Error launching instruments: Instruments crashed on startup

+1
Same issue on signed app as well as on enterprise app on iPhone 6s version 9.3.1+mac 10.11+appium 1.5.3+xcode 7.3.