You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[browser][wbt] fails with InvalidOperationException: There is no currently active test #105315
{
"ErrorMessage": "Unhandled exception. System.InvalidOperationException: There is no currently active test.",
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
Known issue validation
Build: 🔎https://dev.azure.com/dnceng-public/public/_build/results?buildId=751591 Error message validated:[Unhandled exception. System.InvalidOperationException: There is no currently active test.] Result validation: ✅ Known issue matched with the provided build. Validation performed at: 7/23/2024 1:57:11 PM UTC
I'm not able to reproduce it locally. It doesn't seem related to fingerprinting.
The message comes from xunit orchestration. It looks like a race condition.
changed the title [-][browser] `NoFingerprint` wbt fails with `InvalidOperationException`[/-][+][browser][wbt] fails with `InvalidOperationException: There is no currently active test`[/+]on Jul 25, 2024
@mkhamoyan Can you please look into this one? It's quite low priority (if don't start happening more often, but it doesn't seem so far). The exception comes from ToolCommandhttps://github.com/dotnet/runtime/blob/main/src/mono/wasm/Wasm.Build.Tests/Common/ToolCommand.cs#L110
My theory is that the process output arrives in .NET after the waiting for process to finish (as thus the test finished). Something like unsubscribing the handlers after the wait might be enough.
We might be trying to WriteLine in a try-catch, after xunit threw an exception. I'm gonna wrap protected readonly ITestOutputHelper _testOutput;
in a custom class, that would call ITestOutputHelper's methods in its own try-catch and log to console in case something goes wrong.
There are no hits on net10 because we stopped running tests with self-created process in the refactoring PR: #109069 and we are not keeping handlers for logging manually but we rely on Playwrigt to run the tests. The previously backported PRs is not a full fix.
Activity
dotnet-policy-service commentedon Jul 23, 2024
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Jul 23, 2024
Tagging subscribers to this area: @directhex, @matouskozak
See info in area-owners.md if you want to be subscribed.
maraf commentedon Jul 25, 2024
I'm not able to reproduce it locally. It doesn't seem related to fingerprinting.
The message comes from xunit orchestration. It looks like a race condition.
[-][browser] `NoFingerprint` wbt fails with `InvalidOperationException`[/-][+][browser][wbt] fails with `InvalidOperationException: There is no currently active test`[/+]maraf commentedon Jul 26, 2024
@mkhamoyan Can you please look into this one? It's quite low priority (if don't start happening more often, but it doesn't seem so far). The exception comes from
ToolCommandhttps://github.com/dotnet/runtime/blob/main/src/mono/wasm/Wasm.Build.Tests/Common/ToolCommand.cs#L110My theory is that the process output arrives in .NET after the waiting for process to finish (as thus the test finished). Something like unsubscribing the handlers after the wait might be enough.
ilonatommy commentedon Aug 2, 2024
Note for the future: unsubscribing from the handlers did not fully fix the issue, the last 2 hits are on PRs created after the fix was merged.
ilonatommy commentedon Sep 27, 2024
Following the stack:
runtime/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs
Line 548 in 84b7c2f
https://github.com/xunit/xunit/blob/6bfa188331f6d4ed6e877ab6da5e7b2725ccd721/src/xunit.v3.core/Framework/TestOutputHelper.cs#L45
We might be trying to
WriteLinein a try-catch, after xunit threw an exception. I'm gonna wrapprotected readonly ITestOutputHelper _testOutput;in a custom class, that would call
ITestOutputHelper's methods in its own try-catch and log to console in case something goes wrong.ilonatommy commentedon Sep 27, 2024
Sample log:
All the available failure logs are from Linux.
ilonatommy commentedon Oct 2, 2024
The last 2 hits are on PRs that had the #108319 change. It's still unfixed
lewing commentedon Jun 10, 2025
@ilonatommy this looks like it is showing up a lot in release/9.0
ilonatommy commentedon Jun 16, 2025
If it's much more than on net10 then let's backport #108319, #108387, #105561
Edit: the unsubscribing is already backported, so only the exception logging related changes.
ilonatommy commentedon Jun 23, 2025
There are no hits on net10 because we stopped running tests with self-created process in the refactoring PR:
#109069 and we are not keeping handlers for logging manually but we rely on Playwrigt to run the tests. The previously backported PRs is not a full fix.
ilonatommy commentedon Aug 4, 2025
The only hits after the fix are net8 where we did not backport and they are very rare.