1
Solved

TFS2015: Offline - Sequence contains no elements

Hi Tim,

Since version 2.7.0 I cannot connect to our local TFS on prem anymore.

I keep seeing this error message:

Offline

Sequence contains no elements

 

Sometimes a restart of the app fixes it temporarily. But then all of a sudden, boom, same error again.

I was hoping this bug had been fixed in v 2.7.1 but unfortunately it isn't.

 

Hope you can fix this since we really rely on Catlight nowadays :) (And we're paid customers... ;)

3 replies

1

This is fixed in 2.7.2. Empty projects should no longer cause errors like that.

https://catlight.io/downloads 

Found the reason through the log files :)

 

2017-03-22 17:25:28.9670 |  WARN |            Tfs2015Adapter |  3 | 46ec | tfs2015: Cannot update builds for project ABC.XYZ System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Max[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Web.Services.Tfs.Tfs2015Adapter.<GetProjectBuildCache>d__15.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Tfs\Tfs2015Adapter.cs:line 312
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.Tfs2015Adapter.<GetBuildDefinitionState>d__16.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Tfs\Tfs2015Adapter.cs:line 373
2017-03-22 17:25:29.0125 |  WARN |             ServerManager |  3 | 46ec | Cannot build server state System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Max[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Web.Services.Tfs.Tfs2015Adapter.<GetProjectBuildCache>d__15.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Tfs\Tfs2015Adapter.cs:line 312
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.Tfs2015Adapter.<GetBuildDefinitionState>d__16.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Tfs\Tfs2015Adapter.cs:line 454
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.TfsAdapterBase.<GetState>d__13.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Tfs\TfsAdapterBase.cs:line 180
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Tfs.MultiVersionTfsAdapter.<GetState>d__9.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Tfs\MultiVersionTfsAdapter.cs:line 71
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.Builds.ServerAdapterPoller.<UpdateState>d__42.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Builds\ServerAdapterPoller.cs:line 237
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Web.Services.Builds.ServerAdapterPoller.<GetState>d__33.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\Builds\ServerAdapterPoller.cs:line 129
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.ServerManager.<BuildServerViewModel>d__48.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\ServerManager.cs:line 612
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Web.Services.ServerManager.<GetServerViewModel>d__26.MoveNext() in C:\Build\2\_work\2\s\Desktop\LocalWeb\Services\ServerManager.cs:line 191

 

Seems i had selected a team project without any build configs in it, my bad...

Thanks for reporting this problem!

As far as I understand, the workaround that you found helped.

We are working on a fix for this.