Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.runtimeconfig.json], offset 0 (line 1, column 1): The document is empty. #111231

Open
Evangelink opened this issue Jan 9, 2025 · 3 comments
Open
Labels
area-Infrastructure needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners untriaged New issue has not been triaged by the area owner

Comments

@Evangelink
Copy link
Member

Description

We are often getting some flakiness on our generated test assets during the execution with the following error:

A JSON parsing exception occurred in [C:\src\testfx\artifacts\tmp\Debug\testsuite\2b3xH\MSTestSdk\bin\Release\net9.0\MSTestSdk.runtimeconfig.json], offset 0 (line 1, column 1): The document is empty.
  Invalid runtimeconfig.json [C:\src\testfx\artifacts\tmp\Debug\testsuite\2b3xH\MSTestSdk\bin\Release\net9.0\MSTestSdk.runtimeconfig.json] [C:\src\testfx\artifacts\tmp\Debug\testsuite\2b3xH\MSTestSdk\bin\Release\net9.0\MSTestSdk.runtimeconfig.dev.json]
  
    at Microsoft.Testing.Platform.Acceptance.IntegrationTests.Helpers.AcceptanceAssert.AssertOutputContainsSummary(TestHostResult testHostResult, Int32 failed, Int32 passed, Int32 skipped, Nullable`1 aborted, Nullable`1 minimumNumberOfTests, String callerMemberName, String callerFilePath, Int32 callerLineNumber) in C:\src\testfx\test\IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Helpers\AcceptanceAssert.cs:125
    at MSTest.Acceptance.IntegrationTests.SdkTests.RunTests_With_CentralPackageManagement_Standalone(String multiTfm, BuildConfiguration buildConfiguration) in C:\src\testfx\test\IntegrationTests\MSTest.Acceptance.IntegrationTests\SdkTests.cs:144

Reproduction Steps

This is some transient failure but it's happening more and more often on our acceptance tests.

Expected behavior

No error

Actual behavior

Invalid runtimeconfig.json

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 9, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 9, 2025
@vitek-karas
Copy link
Member

@Evangelink what is the code doing?
Is it in stdout/stderr of some process? If so, can you please turn on host tracing and collect the trace when this happens?

Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@Evangelink
Copy link
Member Author

@Evangelink what is the code doing?

For our acceptance tests, we generate test projects from strings, then build them dotnet build and finally we run the produced executable. At the stage where we run, we sometimes end up with this error (not only in CI also locally) but it's always pretty randomic and flaky.

Is it in stdout/stderr of some process

StdErr of the test process (using the new platform not VSTest)

If so, can you please turn on host tracing and collect the trace when this happens?

Given it's pretty randomic, I'll probably need to always enable the trace and rerun all acceptance tests in some loop until I have something. I'll try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners untriaged New issue has not been triaged by the area owner
Projects
Status: No status
Development

No branches or pull requests

3 participants