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

Failed to set foreground window in integration tests #57322

Closed
sharwell opened this issue Oct 22, 2021 · 0 comments · Fixed by #57314
Closed

Failed to set foreground window in integration tests #57322

sharwell opened this issue Oct 22, 2021 · 0 comments · Fixed by #57314
Labels
Area-Infrastructure Integration-Test Test failures in roslyn-integration-CI Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented

Comments

@sharwell
Copy link
Member

sharwell commented Oct 22, 2021

https://dev.azure.com/dnceng/public/_build/results?buildId=1435927

System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Failed to set the foreground window.
   at Microsoft.VisualStudio.IntegrationTest.Utilities.IntegrationHelper.SetForegroundWindow(IntPtr window) in /_/src/VisualStudio/IntegrationTest/TestUtilities/IntegrationHelper.cs:line 218
   at Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess.VisualStudio_InProc.<>c.<ActivateMainWindow>b__7_0(CancellationToken cancellationToken) in /_/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/VisualStudio_InProc.cs:line 66
   at Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess.InProcComponent.<>c__DisplayClass6_0.<<InvokeOnUIThread>b__0>d.MoveNext() in /_/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/InProcComponent.cs:line 58
   --- End of inner exception stack trace ---

Server stack trace: 
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
   at Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess.InProcComponent.InvokeOnUIThread(Action`1 action) in /_/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/InProcComponent.cs:line 61
   at Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess.VisualStudio_InProc.ActivateMainWindow() in /_/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/VisualStudio_InProc.cs:line 53
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess.VisualStudio_InProc.ActivateMainWindow()
   at Microsoft.VisualStudio.IntegrationTest.Utilities.VisualStudioInstance.ActivateMainWindow() in /_/src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstance.cs:line 195
   at Roslyn.VisualStudio.IntegrationTests.AbstractIntegrationTest.<InitializeAsync>d__8.MoveNext() in /_/src/VisualStudio/IntegrationTest/IntegrationTests/AbstractIntegrationTest.cs:line 60
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Roslyn.VisualStudio.IntegrationTests.AbstractEditorTest.<InitializeAsync>d__7.MoveNext() in /_/src/VisualStudio/IntegrationTest/IntegrationTests/AbstractEditorTest.cs:line 46
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Roslyn.VisualStudio.IntegrationTests.VisualBasic.BasicArgumentProvider.<InitializeAsync>d__3.MoveNext() in /_/src/VisualStudio/IntegrationTest/IntegrationTests/VisualBasic/BasicArgumentProvider.cs:line 27
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
---> (Inner Exception #0) System.InvalidOperationException: Failed to set the foreground window.
   at Microsoft.VisualStudio.IntegrationTest.Utilities.IntegrationHelper.SetForegroundWindow(IntPtr window) in /_/src/VisualStudio/IntegrationTest/TestUtilities/IntegrationHelper.cs:line 218
   at Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess.VisualStudio_InProc.<>c.<ActivateMainWindow>b__7_0(CancellationToken cancellationToken) in /_/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/VisualStudio_InProc.cs:line 66
   at Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess.InProcComponent.<>c__DisplayClass6_0.<<InvokeOnUIThread>b__0>d.MoveNext() in /_/src/VisualStudio/IntegrationTest/TestUtilities/InProcess/InProcComponent.cs:line 58<---

08 41 18-Unknown-AggregateException

Build Kind Start Time
1425665 Rolling 2021-17-10
1426510 Rolling 2021-18-10
1427791 Rolling 2021-18-10
1428206 Rolling 2021-18-10
1428256 Rolling 2021-18-10
1429399 Rolling 2021-19-10
1430055 Rolling 2021-19-10
1430473 Rolling 2021-19-10
1430603 Rolling 2021-19-10
1430928 Rolling 2021-19-10
1430869 Rolling 2021-19-10
1430976 Rolling 2021-19-10
1431121 Rolling 2021-19-10
1431678 Rolling 2021-20-10
1431683 Rolling 2021-20-10
1431784 Rolling 2021-20-10
1432244 Rolling 2021-20-10
1433571 Rolling 2021-21-10
1434178 PR 57029 2021-21-10
1434238 PR 56197 2021-21-10
1434386 PR 57300 2021-21-10
1434538 PR 55469 2021-21-10
1434554 Rolling 2021-21-10
1434564 PR 57305 2021-21-10
1434504 PR 57084 2021-21-10
1434626 PR 57306 2021-21-10
1434813 PR 57254 2021-21-10
1434988 PR 57284 2021-21-10
1435049 PR 57310 2021-21-10
1435154 PR 57307 2021-21-10
1435192 PR 57228 2021-21-10
1435242 PR 57312 2021-21-10
1435296 PR 57303 2021-21-10
1435190 PR 57290 2021-21-10
1435255 PR 57310 2021-21-10
1435385 PR 57316 2021-21-10
1435421 PR 57228 2021-21-10
1435460 Rolling 2021-22-10
1435474 PR 57291 2021-22-10
1435484 PR 56276 2021-22-10
1435603 PR 57317 2021-22-10
1435927 Rolling 2021-22-10
1436064 PR 57029 2021-22-10
1436110 PR 56197 2021-22-10
1436306 PR 54559 2021-22-10
1436419 PR 45105 2021-22-10
1436429 Rolling 2021-22-10
1436565 PR 57266 2021-22-10
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 22, 2021
@sharwell sharwell added the Integration-Test Test failures in roslyn-integration-CI label Oct 22, 2021
@sharwell sharwell added Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure Integration-Test Test failures in roslyn-integration-CI Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant