0

when i launched the app, the screen appears and disappears again. I wrote a small script with UI Automation

instruments -w "iPhone 6 (8.2 Simulator)" -t /Applications/Xcode-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/me/PATHTO.app -e UIASCRIPT "/Users/me/Documents/Instrument/test.js" -e UIARESULTSPATH "/somewhere"

i got this error:

instruments[1940:183752] WebKit Threading Violation - initial use of WebKit from a secondary thread.
Instruments Trace Error : Target failed to run: Failed looking up pid of launched process.

any ideas?

emoleumassi
  • 4,881
  • 13
  • 67
  • 93
  • "WebKit Threading Violation" seems to be a more appropriate search term to use here. See [this question](http://stackoverflow.com/q/28763914/2063546) and [this possible fix](https://github.com/appium/appium/issues/3687#issuecomment-73768150). – Ian Apr 14 '15 at 21:26

1 Answers1

0

This is probably the closest to answering the question: Have you verified that your app didn't actually crash during the launch? Unlike OS X, crashes in iOS don't advertise themselves very well, so it's often hard to figure out if a crash actually happened unless you open the logs.

These are not exactly a solution, but might prove helpful to debug it yourself if the app wasn't crashing:

The simulator has its own console log that might have details about what happened, like mentioning that your app exited abnormally or hit an assert or something like that.

I believe the WebKit Threading Violation is a red herring. I've had a bug with Apple about it since the Xcode 6 beta, still not fixed even thought we're to Xcode 7.1 now, but as far as I can tell it is just noise. I personally have a wrapper around the instruments commandline that will strip the message out of instruments's output because too many people get confused by it.

Also, instruments has a verbose output option with instruments -v that might give more details.

instruments -v -w "iPhone 6 (8.2 Simulator)" -t /Applications/Xcode-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/me/PATHTO.app -e UIASCRIPT "/Users/me/Documents/Instrument/test.js" -e UIARESULTSPATH "/somewhere"
Aaron
  • 3,209
  • 1
  • 12
  • 14