stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.76k stars 175 forks source link

Stryker failed to connect to vstest.console. #2486

Closed kamilos-dev closed 1 year ago

kamilos-dev commented 1 year ago

I have example repo that can be helpful to reproduce bug: https://github.com/kamilos-dev/stryker-test-problem

What have I done:

Output from console:

Version: 3.7.1

[15:51:24 INF] Identifying projects to mutate in /Users/kamil/Desktop/Projects/StrykerTest/StrykerTest.sln. This can take a while.
[15:51:26 INF] Found 1 source projects
[15:51:26 INF] Found 1 test projects
[15:51:30 INF] The project /Users/kamil/Desktop/Projects/StrykerTest/ClassLibrary1/ClassLibrary1.csproj will be mutated.
[15:51:30 INF] Analysis complete.
[15:53:00 ERR] Stryker failed to connect to vstest.console with error: /usr/local/share/dotnet/dotnet process failed to connect to vstest.console process after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout.
[15:53:00 INF] Time Elapsed 00:01:36.4830491
Unhandled exception. 

Stryker failed to connect to vstest.console

Inner Exception: 
/usr/local/share/dotnet/dotnet process failed to connect to vstest.console process after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout.
   at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.WaitForConnection()
   at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.EnsureInitialized()
   at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.InitializeExtensions(IEnumerable`1 pathToAdditionalExtensions)
   at Stryker.Core.TestRunners.VsTest.VsTestContextInformation.BuildVsTestWrapper(String runnerId)

I have M1 macbook pro.

Log file (from dotnet tool run dotnet-stryker --verbosity trace --log-to-file): log-20230426.txt In logs folder there was only this file.

dotnet --info output:

.NET SDK (reflecting any global.json):
 Version:   6.0.401
 Commit:    0906eae6f8

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.2
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/6.0.401/

Host:
  Version:      7.0.5
  Architecture: arm64
  Commit:       8042d61b17

.NET SDKs installed:
  6.0.101 [/usr/local/share/dotnet/sdk]
  6.0.201 [/usr/local/share/dotnet/sdk]
  6.0.300 [/usr/local/share/dotnet/sdk]
  6.0.302 [/usr/local/share/dotnet/sdk]
  6.0.401 [/usr/local/share/dotnet/sdk]
  7.0.100 [/usr/local/share/dotnet/sdk]
  7.0.203 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  x64   [/usr/local/share/dotnet/x64]
    registered at [/etc/dotnet/install_location_x64]

Environment variables:
  Not set

global.json file:
  /Users/kamil/Desktop/Projects/StrykerTest/global.json

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Please give any advice.

rouke-broersma commented 1 year ago

Sounds like #2117 curiously they also had the issue with m1 mac. We had an issue open at vstest https://github.com/microsoft/vstest/issues/3926 which we have since closed due to no reaction from the original reporting user.

I reopened the issue. Could you possibly troubleshoot your issue with the vstest team? None of us have a m1 mac, and none of us are able to reproduce this issue.

kamilos-dev commented 1 year ago

Yes, no problem. I can help them.

rouke-broersma commented 1 year ago

@kamilos-dev A new version has been released with an updated vstest, could you try it out and see if it fixes the issue?

kamilos-dev commented 1 year ago

@rouke-broersma Thanks for let me know.

After update everything works fine :)

If you want to see logs here you are: log-20230515.txt