Azure-pipelines-tasks: Xamarin.Android builds suddenly unable to run because of missing requirements on the agent

Created on 17 Oct 2016  路  9Comments  路  Source: microsoft/azure-pipelines-tasks

My nightly builds have been working great for weeks, and then suddenly last night my Android builds started failing to run:

No agent could be found with the following capabilities: AndroidSDK, MSBuild, Xamarin.Android

What got committed within the last 48 hours that would start breaking Android builds???

Nothing has changed on my build agent machine in recent history.

Mobile

Most helpful comment

@DavidStaheli, a colleague helped me get it resolved.

@yacaovsnc, this is a beefy dedicated MacInCloud server instance. The third column, here: http://www.macincloud.com/pricing/compare

@madhurig, I had to manually add the Xamarin.Android capability to each of my eight agent instances by entering the key Xamarin.Android and the value .

The issue cropped up overnight. Nothing had changed in my server's environment during the previous week.

All 9 comments

Hi @jsauvexamarin, thanks for reporting this so quickly. Can you please tell me the name of your Team Services account, or email me at dastahel at microsoft.com?

@jsauvexamarin Just to confirm, are you running builds on hosted agent, or your own agent since you mentioned "nothing has changed on my build agent machine"?

@jsauvexamarin: We saw a similar issue on MacInCloud build servers but it was due to how things were installed on those machines. Can you check you agent capabilities in the admin UI and let us know which capability is missing?

Thanks,
Madhuri

@DavidStaheli, a colleague helped me get it resolved.

@yacaovsnc, this is a beefy dedicated MacInCloud server instance. The third column, here: http://www.macincloud.com/pricing/compare

@madhurig, I had to manually add the Xamarin.Android capability to each of my eight agent instances by entering the key Xamarin.Android and the value .

The issue cropped up overnight. Nothing had changed in my server's environment during the previous week.

@jsauvexamarin: Can you confirm which version of the VSTS build agent you have on your build server? The agent looks for this file to detect Xamarin.Android capability. Do you see this file on your build server?

Please send me the diagnostic logs from the agent so I can investigate more, they will be under _diag folder for the agent.

Regarding why the issue came up overnight, did your Mac build server reboot? It is possible the agent when it restarted failed to identify the capability.

Sorry, I reported some bad info in my last comment, because I have two VSTS accounts and two build agent machines (one on-prem and another in MacInCloud). I was confused about which one I was looking at. I'm transitioning from on-prem to MacInCloud, and migrating all my build configs to a new VSTS instance that has a more generic URL.

The behavior I was reporting was in my on-prem agent. And in the associated VSTS account, I needed to add the Xamarin.Android capability value of .

I can confirm that on that build agent, the generator file that is being scanned for to verify the capability is indeed present on the agent: https://github.com/Microsoft/vsts-agent/pull/550/commits/44b7451b1db52275f03e71f746d6b646195fe807#diff-38ee1ff17d3b1f8d011a3435b8222ca5R71

As for a log, there was never a log generated, because the VSTS instance was complaining that No agent could be found with the following capabilities: AndroidSDK, MSBuild, Xamarin.Android. After manually adding the capability Xamarin.Android, the instance was then able to find suitable agents to build on.

The version of the agent on that machine is: vsts-agent-osx.10.11-x64-2.104.0

@jsauvexamarin : Can you clarify if the agent is not able to find the "Xamarin.Android" capability on the machine which has the "generator" file? 104 is slightly older, can you try upgrading to 107 version of the agent and see if you still see the same issue.

@madhurig, I definitely will upgrade my 8 agents later today on my on-prem build machine. But yes, I am clarifying that my version 104 agent was unable to find the "generator" file in the location specified, even though I can confirm that the file does indeed exists at that exact path (/Library/Frameworks/Xamarin.Android.framework/Commands/generator):
https://github.com/Microsoft/vsts-agent/blob/f7e9a7ee42d0c30f0d31d449bb51d95bd6e9e0fb/src/Agent.Listener/Capabilities/NixCapabilitiesProvider.cs#L70

@jsauvexamarin: Looks like Xamarin.Android capability is broken with 104 version of agent with latest Xamarin, the fix is included in 105 and higher version of the agent: https://github.com/Microsoft/vsts-agent/commit/b21004ba2a966adfec1bc174cbef232a0bdf4874

Was this page helpful?
0 / 5 - 0 ratings