The provided manager was not found in any slot.

See original GitHub issue

I’m having a similar issue, and the build fails with the following trace running in Azure Devops hosted agents:

##[error]DiscoveryMessage : System.InvalidOperationException: The provided manager was not found in any slot.
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ParallelOperationManager`3.ClearCompletedSlot(TManager completedManager)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ParallelOperationManager`3.RunNextWork(TManager completedManager)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel.ParallelProxyDiscoveryManager.HandlePartialDiscoveryComplete(IProxyDiscoveryManager proxyDiscoveryManager, Int64 totalTests, IEnumerable`1 lastChunk, Boolean isAborted)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel.ParallelDiscoveryEventsHandler.HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryCompleteEventArgs, IEnumerable`1 lastChunk)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.InitializeDiscovery(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler, Boolean skipDefaultAdapters)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)

The issue started when moving from 17.5 to 17.6 two days ago.

_Originally posted by @jeromelaban in https://github.com/microsoft/vstest/issues/4467#issuecomment-1553272768_

Update: To clarify this issue for future implementation of a fix. When testhost crashes in initialization, we don’t communicate back that initialization did not happen and try to continue to the next step, which again does initialization and fails again. This will trigger cleanup 2 times via CompletedRun event, which cleans slots and pushes next work to be executed. First the cleanup will succeed, but the second one will fail. This also highlights that there is a disconnect between the work being done, and when we think the work already completed.

Issue Analytics

  • State:open
  • Created 4 months ago
  • Reactions:4
  • Comments:38 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
nohwndcommented, Jun 14, 2023

The currently released version of VS 17.6.3 does not have the fix yet unfortunately, it will be in 17.6.4 that should ship in few days I hope.

2reactions
mgexocommented, Jun 24, 2023

A (Re-)Discover button would help. Or is there a way to trigger the discovery manually?

In Visual Studio Log/Output Window you can switch to the “Tests” Tab. You can see that it is always running the test discovery when you build a project. It even does the test discovery for all projects, not only the one that you build. So, triggering the test-discovery can be simply done by building (even if the build does nothing because all is build and just finishes right away)

That also means that we are now spammed with these errors and exceptions (mentioned above) in the background on each build…

Read more comments on GitHub >

github_iconTop Results From Across the Web

The provided manager was not found in any slot.
Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console. - The provided manager was not found in...
Read more >
Live Unit Testing - Could not find testhost
InvalidOperationException: The provided manager was not found in any slot. at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.
Read more >
Error swap slot settings Release Management Visual ...
If the Azure App Service Manager (Swap step) fails for some reason, in that case, Swap action does not get completed and leaves...
Read more >
Set up staging environments - Azure App Service
The staging slot has a management page just like any other App Service app. You can change the slot's configuration.
Read more >
Azure app service swap slot not working?
We have a manual trigger to push to production, which just swaps the slots. This doesnt work either. Trying it in the portal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found