Reputation: 2259
I am consistently getting the following error message when trying to launch unit tests on an iOS 6 device via the instruments command line tool:
Failed to start Instruments daemon for 'iOS' on 'Agent03 (v6.0.1)' (The service is invalid.)
I have successfully launched tests in the past using the same method on the same device, and I currently have tests successfully running on another Mac and iOS device using the same instruments trace template.
I have seen this question, that describes a similar problem, though I don't get the message about reconnecting the device. I have tried the various solutions described in the answers to that question, but none of them worked for me. I have also tried rebooting both the Mac and the iOS device.
Does anyone have any ideas about what might have happened to get the device into this state, how I can fix it, and how I can prevent it from happening again?
UPDATE: I tried swapping the iOS devices connected to Macs, and I found that the failure follows the device, not the Mac. I'll try restoring the problematic device and see if that fixes the problem. I'd still like to know how the device got itself into this state and how I can prevent it from happening again, but there's at least hope of a fix.
Upvotes: 2
Views: 2130
Reputation: 3406
For me I get this if I restart my device.
In my experience with Xcode 5 and 6 against iOS 6 through 8, the only solution to this is to launch Xcode. Don't need to go to any particular windows or do anything to the device, just launch Xcode and it automagically fixes the issue for any connected devices.
And if Xcode is already open, relaunch it.
Upvotes: 1
Reputation: 2259
Restoring the device solved the problem for me. It doesn't tell me why the problem appeared in the first place or how to prevent it happening again, but it works for now.
Upvotes: 2