Skip to content

[xUnit v3] Catastrophic failure: Test process did not return valid JSON (non-object) when targeting net10.0. #3413

@eiriktsarpalis

Description

@eiriktsarpalis

I opened this PR migrating my repo to the .NET 10 RC1 SDK. While everything appears to be working fine on my local dev machine, I'm getting the following error consistently when running tests in Windows github actions only:

[xUnit.net 00:00:00.25] PolyType.Roslyn.Tests: Catastrophic failure: System.InvalidOperationException: Test process did not return valid JSON (non-object).
No test is available in D:\a\PolyType\PolyType\tests\PolyType.Roslyn.Tests\bin\Debug\net10.0\PolyType.Roslyn.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
   at Xunit.v3.TestProcessLauncherAdapter.GetAssemblyInfo(ITestProcessLauncher launcher, XunitProjectAssembly projectAssembly)
   at Xunit.v3.TestProcessLauncherAdapter.GetAssemblyInfo(XunitProjectAssembly projectAssembly)
   at Xunit.Runner.v3.Xunit3..ctor(XunitProjectAssembly projectAssembly, ISourceInformationProvider sourceInformationProvider, IMessageSink diagnosticMessageSink, ITestProcessLauncher testProcessLauncher)
   at Xunit.Runner.v3.Xunit3.ForDiscoveryAndExecution(XunitProjectAssembly projectAssembly, ISourceInformationProvider sourceInformationProvider, IMessageSink diagnosticMessageSink, ITestProcessLauncher testProcessLauncher)
   at Xunit.XunitFrontController.Create(XunitProjectAssembly projectAssembly, ISourceInformationProvider sourceInformationProvider, IMessageSink diagnosticMessageSink, ITestProcessLauncher testProcessLauncher)
   at Xunit.Runner.VisualStudio.VsTestRunner.RunTestsInAssembly(IRunContext runContext, IFrameworkHandle frameworkHandle, LoggerHelper logger, TestPlatformContext testPlatformContext, RunSettings runSettings, IMessageSink reporterMessageHandler, AssemblyRunInfo runInfo)
   at Xunit.Runner.VisualStudio.VsTestRunner.RunTestsInAssembly(IRunContext runContext, IFrameworkHandle frameworkHandle, LoggerHelper logger, TestPlatformContext testPlatformContext, RunSettings runSettings, IMessageSink reporterMessageHandler, AssemblyRunInfo runInfo)

The issue does not repro in my local Windows machine, nor does it repro in the macOS and Linux legs of the same build. It does not repro when attempting to run the same tests targeting non net10.0 targets.

I'm pretty much stumped at this point, I would appreciate any hints that might help me better debug the issue. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalThe issue is caused by an external party

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions