1
votes

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?

1
Could you make sure that you're using the latest Xamarin tools on the Build server? Also, please post the full build logPrashant Cholachagudda
@Prashant I am using Xamarin Studio 6.0 (build 5174) and my verbose logs are here hope that helpsUser1
Does it occur if you copy the code to your build agent and build it manually?Eddie Chen - MSFT
@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.User1
@user1 When you configure the build agent on the machine, did you configure it to run as service?Eddie Chen - MSFT

1 Answers

2
votes

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.