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
System.InvalidOperationException: Console is already in batching mode #4146
I'm getting this on my pipelines on GitHub actions sometimes:
Error: Unhandled exception. System.InvalidOperationException: Console is already
in batching mode.
at
Microsoft.Testing.Platform.OutputDevice.Terminal.NonAnsiTerminal.StartUpdate()
in
/_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/NonAnsiTerminal
.cs:line 125
at
Microsoft.Testing.Platform.OutputDevice.Terminal.TestProgressStateAwareTerminal.
ThreadProc() in
/_/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressSta
teAwareTerminal.cs:line 45
at System.Threading.Thread.StartCallback()
Looking at the code, every call to StartUpdate is within a lock statement so that all looks correct, so the only thing I can think of is we're hitting some exception (although I can't see anything in the output - Maybe I need to tweak my verbosity?) and therefore not calling StopUpdate?
It should probably be in a finally block to ensure it's always called.
For a nightly/dogfood build, you can use this feed: https://dnceng.pkgs.visualstudio.com/public/_packaging/test-tools/nuget/v3/index.json
The version 3.7.0-preview.24575.7 includes your change (I wouldn't use that version for production, but you can just do a quick test with it in a draft PR in your repo to see if the issue is fixed).
I think this is resolved now that it's calling StopUpdate in the finally block. I think that regex timeout exception I'm seeing was throwing and preventing StopUpdate from being called. Closing.
Activity
Youssef1313 commentedon Nov 26, 2024
Tom Longhurst (@thomhurst) Is that fixed by #4147?
thomhurst commentedon Nov 26, 2024
Hopefully !
Youssef1313 commentedon Nov 26, 2024
Let us know please once you're able to confirm.
thomhurst commentedon Nov 26, 2024
When's the next package release?
Youssef1313 commentedon Nov 26, 2024
On NuGet.org, that would be a question for Amaury Levé (@Evangelink).
For a nightly/dogfood build, you can use this feed:
https://dnceng.pkgs.visualstudio.com/public/_packaging/test-tools/nuget/v3/index.jsonThe version
3.7.0-preview.24575.7includes your change (I wouldn't use that version for production, but you can just do a quick test with it in a draft PR in your repo to see if the issue is fixed).nohwnd commentedon Nov 26, 2024
Youssef Fahmy (@Youssef1313) idk if you are aware of it, but here is a full guide to the preview releases: https://aka.ms/mstest/preview
thomhurst commentedon Nov 26, 2024
Looks like I'm not getting that exception on the latest now, but I've got a new regex exception: #4159
thomhurst commentedon Nov 28, 2024
I think this is resolved now that it's calling StopUpdate in the finally block. I think that regex timeout exception I'm seeing was throwing and preventing StopUpdate from being called. Closing.