azure-pipelines-agent: AppCenterDistribute silently fails without distributing any releases

Type: Bug

Enter Task Name: AppCenterDistribute@3

Environment

  • Server - Azure Pipelines (msi-cie/Gridstone/5620065)
  • Agent - Private: ubuntu-latest ‘2.188.1’

Issue Description

The AppCenterDistribute passes successfully but no releases are distributed on app center

Task logs

logs_5620065.zip

Error logs

2021-06-20T05:33:59.5778652Z Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2021-06-20T05:33:59.5779107Z 
2021-06-20T05:33:59.5779592Z Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2021-06-20T05:33:59.5780026Z 
2021-06-20T05:33:59.5780518Z Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2021-06-20T05:33:59.5780943Z 
2021-06-20T05:33:59.5781246Z    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
2021-06-20T05:33:59.5781645Z    at System.Reflection.RuntimeModule.GetTypes()
2021-06-20T05:33:59.5781981Z    at System.Reflection.Assembly.GetTypes()
2021-06-20T05:33:59.5782463Z    at Agent.Plugins.Log.TestResultParser.Plugin.ParserFactory.<>c.<GetTestResultParsers>b__0_0(Assembly x)
2021-06-20T05:33:59.5782992Z    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
2021-06-20T05:33:59.5783431Z    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToList()
2021-06-20T05:33:59.5783856Z    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
2021-06-20T05:33:59.5784347Z    at Agent.Plugins.Log.TestResultParser.Plugin.LogParserGateway.<>c__DisplayClass0_0.<InitializeAsync>b__0()
2021-06-20T05:33:59.5784816Z    at System.Threading.Tasks.Task.InnerInvoke()
2021-06-20T05:33:59.5785201Z    at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
2021-06-20T05:33:59.5785804Z    at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
2021-06-20T05:33:59.5786447Z --- End of stack trace from previous location where exception was thrown ---
2021-06-20T05:33:59.5787220Z    at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
2021-06-20T05:33:59.5787890Z    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
2021-06-20T05:33:59.5788398Z --- End of stack trace from previous location where exception was thrown ---
2021-06-20T05:33:59.5789085Z    at Agent.Plugins.Log.TestResultParser.Plugin.LogParserGateway.InitializeAsync(IClientFactory clientFactory, IPipelineConfig pipelineConfig, ITraceLogger traceLogger, ITelemetryDataCollector telemetry)
2021-06-20T05:33:59.5789852Z    at Agent.Plugins.Log.TestResultParser.Plugin.TestResultLogPlugin.InitializeAsync(IAgentLogPluginContext context)
2021-06-20T05:33:59.5790635Z System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2021-06-20T05:33:59.5791179Z 
2021-06-20T05:33:59.5791569Z File name: 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'
2021-06-20T05:33:59.5791905Z 
2021-06-20T05:33:59.5792027Z 
2021-06-20T05:33:59.5792594Z System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2021-06-20T05:33:59.5793112Z 
2021-06-20T05:33:59.5793574Z File name: 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'
2021-06-20T05:33:59.5793877Z 
2021-06-20T05:33:59.5794004Z 
2021-06-20T05:33:59.5794508Z System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2021-06-20T05:33:59.5795007Z 
2021-06-20T05:33:59.5795624Z File name: 'Microsoft.VisualStudio.Services.Agent, Version=2.188.1.0, Culture=neutral, PublicKeyToken=null'
2021-06-20T05:33:59.5795956Z 
2021-06-20T05:33:59.5796076Z 
2021-06-20T05:33:59.5796401Z TestResultLogParser: Warning: Unable to initialize TestResultLogParser.
2021-06-20T05:33:59.5856530Z Cleaning up task key
2021-06-20T05:33:59.5858212Z Start cleaning up orphan processes.
2021-06-20T05:33:59.6187637Z Terminate orphan process: pid (1941) (java)
2021-06-20T05:33:59.6225064Z Terminate orphan process: pid (2027) (java)
2021-06-20T05:33:59.6349433Z Terminate orphan process: pid (2122) (java)
2021-06-20T05:33:59.6354178Z ##[section]Finishing: Finalize Job
2021-06-20T05:33:59.6397712Z ##[section]Finishing: Job

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 15 (5 by maintainers)

Most upvoted comments

I also posted this problem to the visual studio developer community, and it is under consideration now. It seems that this issue happens only when using the github repository.

I’m having the same error happening in the Finalizing Job of many of my pipelines running Ubuntu, Windows and MacOs. My ci works fine, but even though everything works as expected I get that error in the finalizing job… I don’t think it has nothing to do with appcenter, because we don’t use app center and I’m getting the same error.

It is also important to mention that many of our almost 200 pipelines do not publish any kind of test results… so I don’t really know what is going on.

I also can tell that this error started after the 12th of May this year. Before that, we had no problems. There were no changes in our pipeline code/infrastructure.

I can also confirm that the error happens both on a Microsoft hosted machine, and on a self hosted machine

Agent version: 2.188.3

Logs:

Starting: Finalize Job
Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at Agent.Plugins.Log.TestResultParser.Plugin.ParserFactory.<>c.<GetTestResultParsers>b__0_0(Assembly x)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Agent.Plugins.Log.TestResultParser.Plugin.LogParserGateway.<>c__DisplayClass0_0.<InitializeAsync>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at Agent.Plugins.Log.TestResultParser.Plugin.LogParserGateway.InitializeAsync(IClientFactory clientFactory, IPipelineConfig pipelineConfig, ITraceLogger traceLogger, ITelemetryDataCollector telemetry)
   at Agent.Plugins.Log.TestResultParser.Plugin.TestResultLogPlugin.InitializeAsync(IAgentLogPluginContext context)
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'


System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'


System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'Microsoft.VisualStudio.Services.Agent, Version=2.188.3.0, Culture=neutral, PublicKeyToken=null'


TestResultLogParser: Warning: Unable to initialize TestResultLogParser.
Cleaning up task key

Hi everyone! We have rolled out the fix for this issue - closing this at the moment.

Hi everyone! We prepared a fix for this issue - it will be available in the next release.

I also posted this problem to the visual studio developer community, and it is under consideration now. It seems that this issue happens only when using the github repository.

could you please leave the link here so we can follow up?

This is the corresponding link:

https://developercommunity.visualstudio.com/t/Finalizing-Job-fails-at-pipeline/1472830