instruments command-line tool requests authorization on launch

Originator:jeff
Number:rdar://14135016 Date Originated:06.12.2013
Status:Duplicate/10945962 Resolved:
Product:instruments Product Version:4.5 (46000)
Classification:Serious Bug Reproducible:Always
 
12-Jun-2013 05:07 PM Jeffrey Wear:
Summary:

When instruments is first run after its host computer has been restarted, it requests authorization to take control of the process to be analyzed, in the form of a dialog requesting the user's password (see here: http://stackoverflow.com/questions/9476131/is-there-a-way-to-remove-the-authorization-prompt-from-command-line-instances-of). If this dialog is canceled, a prompt then appears at the command-line asking for the user's password. instruments will not run the specified template until the user has entered their password, either into the dialog or at the command line.

The request for authorization severely hampers the utility of the instruments tool in a continuous integration environment (for instance, to automatically run a series of UIAutomation tests every night). For such an environment to run un-attended, the user's must hardcode their login password into their test script and add logic to enter this password into the dialog.

There should be a way to run the instruments tool without needing to authorize it.

Steps to Reproduce:

1. Restart your computer (in case you have previously authorized instruments).
2. Execute `sh RunUIAutomationTests.sh` from the root directory of the attached project.

Expected Results:

instruments should run the `LogIn.js` script using the Automation trace template (as directed by `RunUIAutomationTests.sh`).

Actual Results:

An authorization dialog appears, and the instruments tool suspends execution.

Notes:

This workaround (http://stackoverflow.com/a/11416025/495611) works on my local machine, but not our build server.

This issue is very similar to rdar://10945962, though that issue mentions seeing the dialog when the Instruments GUI runs and that has never produced the dialog for me.

I have reproduced this using the Xcode 5 developer tools (build 5A11314m).

Comments

Still reproducible using Xcode 5.1 (5B130a), instruments 5.1 (55044)

Still reproducible using Xcode 5.1 beta 3


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!