microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
883 stars 319 forks source link

TranslationLayer fails connection to vstest.console (portable) on M1 mac #3926

Closed rouke-broersma closed 1 year ago

rouke-broersma commented 2 years ago

Description

We have been using the translation layer with vstest.console from the portable package successfully for quite some time at stryker, on window, linux and mac os. Recently we have been getting reports on failure to connect to vstest.console from mac users. Specifically mac users running on M1 mac. We are not getting the reports from users on other combinations of systems. I assume dotnet test has been tested and works on M1 mac so this leads me to believe that something in the communication between the translation layer and vstest.console might be a problem. Unfortunately none of us at stryker own an M1 mac so we are unable to troubleshoot this problem.

One other interesting thing is that even though we have logging enabled on the translation layer, no log files are generated for this failure. This is unexpected as we have seen log files generated by the translation layer before, even if connection to vstest.console failed.

Actual behavior

2022-07-27T16:35:39.4051980+03:00  [DBG] Initial build successful (61599426)
2022-07-27T16:35:39.4379660+03:00  [DBG] VsTest zip was copied to: "/var/folders/0d/kw0r8pcx1rn06j4d2g_bmjj00000gn/T/o2gew0gf.rrm/.vstest/vstest.zip" (8e340ff1)
2022-07-27T16:35:39.5826230+03:00  [DBG] VsTest zip was unzipped to: "/var/folders/0d/kw0r8pcx1rn06j4d2g_bmjj00000gn/T/o2gew0gf.rrm/.vstest" (679800d3)
2022-07-27T16:35:39.5865320+03:00  [DBG] Using vstest from deployed vstest package (6132c740)
2022-07-27T16:35:39.5877890+03:00  [DBG] Using vstest.console: "OSX" for OS "/var/folders/0d/kw0r8pcx1rn06j4d2g_bmjj00000gn/T/o2gew0gf.rrm/.vstest/tools/netcoreapp2.1/vstest.console.dll" (38dfd549)
2022-07-27T16:35:39.6004950+03:00  [INF] Time Elapsed 00:00:03.4676349 (f4427d77)

Unhandled exception.

Stryker failed to connect to vstest.console

Diagnostic logs

Please share test platform diagnostics logs. Instructions to collect logs are here.
The logs may contain test assembly paths, kindly review and mask those before sharing. No log files were generated even though logging is enabled: https://github.com/stryker-mutator/stryker-net/issues/2117 Confirmed on my own system that logs are generated, user system does not generate logs with the same logging settings.

Environment

Please share additional details about the test environment. Operating system, Build version of vstest.console


OS: [MacOS 12.4 (21F79] Macbook M1
Framework Version [.NET 6]

<PackageReference Include="Microsoft.TestPlatform.TranslationLayer" Version="17.2.0"

rouke-broersma commented 2 years ago

Note, I see that we are swallowing the exception coming from the translation layer so I will be changing that and releasing a new version so we at least have that information available.

Evangelink commented 1 year ago

@rouke-broersma I see that the linked issue was closed as not reproducible. Are you still experiencing the issue?

rouke-broersma commented 1 year ago

@Evangelink Hi, thank you for replying! The original issue creator has not replied to our requests for more information and we finally found someone with an M1 Mac willing to test. They had no issues. As far as I'm concerned the issue can be closed.

rouke-broersma commented 1 year ago

@evangelink we have a new report of the same issue, again on m1 mac. The additional logging does not expose any more information: https://github.com/stryker-mutator/stryker-net/issues/2117

kamilos-dev commented 1 year ago

@Evangelink if I can provide any additional data in some way pls let me know.

rouke-broersma commented 1 year ago

Seems like this was fixed by updated to 17.5

Evangelink commented 1 year ago

Thanks @rouke-broersma!

@kamilos-dev if you are still experiencing the issue after using 17.5, please do let us know.