1

So I am using Visual Studio Team Services to automate my Xamarin.iOS application build on my physical Mac machine using the VSTS agent here.

I am getting a strange error when it comes to the build step of my Xamarin.iOS build definition and it is erroring with:

/Users/chrisjohn/myagent/_work/1/s/Myapp/Myapp/Myapp.sln (default targets) -> (Build target) ->

/Users/myUser/myagent/_work/1/s/Myapp/Myapp/Myapp.iOS/Myapp.iOS.csproj (default targets) ->

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CodesignAppBundle target) ->

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: > error : Tool exited with code: 1. Output: /Users/myUser/myagent/_work/1/s/Myapp/Myapp/Myapp.iOS/bin/iPhone/Release/Myapp.app: User interaction is not allowed.

where the bit in Bold is the real error:

So you can see the error is essentially User Interaction is not allowed

I have tried a fix from this answer: “User interaction is not allowed” trying to sign an OSX app using codesign but it doesnt really say which key I need to grant access to. I tried granting access to my developer keys but it still errors with the same error:

I have also tried moving my developer profile keys to the System keychain but still no such luck

I couldnt find any information on Xamarin talking about this error.

Has anyone seen this error before? Surely this is something that ALL Xamarin.iOS developers are encountering?

Community
  • 1
  • 1
JKennedy
  • 18,150
  • 17
  • 114
  • 198
  • Could you make sure that you're using the latest Xamarin tools on the Build server? Also, please post the [full build log](https://kb.xamarin.com/customer/en/portal/articles/1675684-where-can-i-find-my-version-information-and-logs-#verbose-build-output-logs) – Prashant Cholachagudda Jun 21 '16 at 16:02
  • @Prashant I am using Xamarin Studio 6.0 (build 5174) and my verbose logs are [here](http://www.filedropper.com/4buildxamariniossolutionfieldstrikefieldstrikemovefieldstrikemovesln) hope that helps – JKennedy Jun 21 '16 at 16:25
  • Does it occur if you copy the code to your build agent and build it manually? – Eddie Chen - MSFT Jun 22 '16 at 10:06
  • @Eddie-MSFT The error does not occur when manually building my project on my build machine. I copied the code to my build machine and managed to build successfully. – JKennedy Jun 22 '16 at 10:29
  • @user1 When you configure the build agent on the machine, did you configure it to run as service? – Eddie Chen - MSFT Jun 23 '16 at 02:29
  • @Eddie-MSFT Yes the build agent is running as a service – JKennedy Jun 23 '16 at 07:39
  • @user1 Reconfigure it to interactive mode and then try again: https://github.com/Microsoft/vsts-agent/blob/master/docs/start/configvsts.md – Eddie Chen - MSFT Jun 23 '16 at 07:39
  • @Eddie-MSFT Running it as interactive mode worked. Is this a bug that needs reporting? What is the bug here? – JKennedy Jun 23 '16 at 08:38

1 Answers1

2

To fix this issue run your VSTS agent in interactive mode. Info on how to do this found here: https://github.com/Microsoft/vsts-agent/blob/master/docs/start/configvsts.md

It is an expected result since that's the difference between Service mode and Interactive mode. Just as the name indicates: Interactive mode allow interaction during the build.

JKennedy
  • 18,150
  • 17
  • 114
  • 198
Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60