Using the same provisioning profile, I can run the same set of tests on a device and on the test cloud.
But I get the error below running the same tests on a simulator.
The app deploys and runs fine on the simulator. I am thinking the code signing identity is incorrect but not sure why this would be just on the simulator.
2016-10-18 13:45:43.510 iOSDeviceManager[12388:31207031] EXEC: /usr/bin/xcrun codesign -d --entitlements :- /{Project}/bin/iPhoneSimulator/Debug/{app}.app/PlugIns/{plugin}.appex
2016-10-18 13:45:43.525 iOSDeviceManager[12388:31207031] ERROR: Could not extract entitlements from app:
/{Project}/bin/iPhoneSimulator/Debug/{app}.app/PlugIns/{plugin}.appex
2016-10-18 13:45:43.525 iOSDeviceManager[12388:31207031] ERROR: with command:
/usr/bin/xcrun codesign -d --entitlements :- /{Project}/bin/iPhoneSimulator/Debug/{app}.app/PlugIns/{plugin}.appex
2016-10-18 13:45:43.525 iOSDeviceManager[12388:31207031] === STDERR ===
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] /{Project}/bin/iPhoneSimulator/Debug/{app}.app/PlugIns/{plugin}.appex: code object is not signed at all
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] (null)
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] ERROR: Could not find any Provisioning Profiles suitable for resigning
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] ERROR: identity: #
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] ERROR: device UDID: {udid}
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] ERROR: app: /{Project}/bin/iPhoneSimulator/Debug/{app}.app/PlugIns/{plugin}.appex
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] Error resigning sim bundle
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] Path to bundle: /{Project}/bin/iPhoneSimulator/Debug/{app}.app
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] Device UDID: {udid}
2016-10-18 13:45:43.526 iOSDeviceManager[12388:31207031] ERROR: Error Domain=sh.calaba.iOSDeviceManger Code=5 "Code signing failed" UserInfo={NSLocalizedDescription=Code signing failed, NSLocalizedFailureReason=There was a problem code signing. Please check the logs.}
Posts
IIRC when running on a simulator you don't need code signing when setting up your IApp, so you can just remove that part of the setup code on a simulator.
Thanks for your reply Jim,
I am using Xamarin.UITest version 2.0.0.1526-dev and I had not needed to specify code signing for both device and simulator. So this is my current setup that had worked for me.
So yeah, not sure how it's attempting to code sign.
I have identical problem. Any ideas?
@YarmolyukRuslan, in my case, the app has today widget attached and it seems to be failing trying to code sign the widget. Do you have extensions attached to your app?
To make sure, I am going to try detaching the today widget and see if code signing works with the app. Not sure why code signing is needed in the first place to run tests in the simulator.
Were you able to run tests on physical devices?
I have the same kind of problem since XCode 8.0. Anyone found a solution?
Same issue, anyone found a workaround/fix?
@OlivierMatis @Dids, do you have an iOS extension projects attached to the solution? In my case, I have a today extension project in the solution and unloading the project from the solution allowed me to run the tests.
I have to test the extension separately anyway so this is not a big deal but I have to reattach the project to the solution before I publish the app.
@Soo-hongSuh I do have a watch app/watch app extension, which does indeed seem to be the root cause of this. Submitted a bug about this a couple of days ago, and at least the Xamarin team is now aware of it.
@Dids do you have a bugzilla reference? We have a Safari Extension and have the same issue. Any help is appreciated:
@NealCuliner Yes and no. My specific ticket was closed, but they have an internal one open about it. Here's the closed one: https://bugzilla.xamarin.com/show_bug.cgi?id=48276
Thanks @Soo-hongSuh, it is indeed the case ! It works now I removed the extension project and tests are running.
Cheers
Olivier
We are aware of this issue. I do not have an ETA for a resolution and suggest the work around described above (unload the extension project).
@Glenn.Wilson the workaround of unloading the extension project is causing another bug for us, for ARMv7 architectures specifically. See the following bugzilla: https://bugzilla.xamarin.com/show_bug.cgi?id=51226
Anyone have anything new on this? Still seeing it, and unfortunately unloading a project isn't possible from the command line, so I'm dead in water with running my tests in a CI.
@Glenn.Wilson Is there any update on this? The workaround of unloading the project does work for us in development scenarios but it is a poor solution as i cannot include any ui automation in ci builds.