disconnected: Unable to receive message from renderer (failed to check if window was closed: disconnected: not connected to DevTools) (Session info: headless MicrosoftEdge=119.0.2151.72)
Hello
I'm trying to run Selenium tests with Azure DevOps and I'm getting this error message:
[Failed] [disconnected: Unable to receive message from renderer (failed to check if window was closed: disconnected: not connected to DevTools) (Session info: headless MicrosoftEdge=119.0.2151.72)] [Details at 1 below] Exceptions:
- disconnected: Unable to receive message from renderer (failed to check if window was closed: disconnected: not connected to DevTools) (Session info: headless MicrosoftEdge=119.0.2151.72) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.set_Url(String value) at OpenQA.Selenium.Navigator.GoToUrl(String url)
Microsoft Edge WebDriver 119.0.2151.72 Microsoft Edge Version 119.0.2151.72 (Official build)
From a different build agent with the same Edge WebDriver and Version it works fine, it happens only in one on my build agents.
Thank you in advance
Hi @itzhakja , it looks like one of the headless tab processes may be crashing during the test run. Are you able to share a code sample and minimal web page that reproduces the issue?
We are also having this issue. I cant seem to reproduce it in a sharable sense because I am not sure exactly what's causing it just yet.
We are using the runner images from microsoft (windows-2022) and they did an update with the 120 edgedriver and 120.00 browser version.
Note: If it's ran with MicrosoftEdge=120.0.2210.77 & and Edgedriver 119 it works fine.
Runner URL: https://github.com/actions/runner-images
Error Message:
OpenQA.Selenium.WebDriverException : disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: MicrosoftEdge=120.0.2210.77)
@bwalderman I am facing same issue after my Azure windows-2022 image that I am using for Selenium UI job upgraded to Microsoft Edge 120.0.2210.61, Microsoft Edge Driver 120.0.2210.61
Before that everything worked as expected on: Microsoft Edge WebDriver 119.0.2151.97 and Microsoft Edge Driver 119.0.2151.97 .
The newer versions of Edge are also have that error: Microsoft Edge WebDriver 120.0.2210.121 Microsoft Edge Driver 120.0.2210.121
Error:
OpenQA.Selenium.WebDriverException : disconnected: Unable to receive message from renderer
2024-01-08T14:36:20.3149641Z (failed to check if window was closed: disconnected: not connected to DevTools)
2024-01-08T14:36:20.3150111Z (Session info: MicrosoftEdge=120.0.2210.77)
UI

C# selenium code:
///
_webDriver.Driver.SwitchTo().Window(parentHandle);
}
}
}
Log output:
##[error][xUnit.net 00:03:15.53] Pricing.UI.Tests.RetailFamilyTests.FamilyMembers_PromoteFamilyMemberToLead [FAIL]
2024-01-08T14:36:43.3083074Z [xUnit.net 00:03:15.53] OpenQA.Selenium.WebDriverException : disconnected: not connected to DevTools
2024-01-08T14:36:43.3181106Z (failed to check if window was closed: disconnected: not connected to DevTools)
2024-01-08T14:36:43.3213866Z (Session info: MicrosoftEdge=120.0.2210.77)
2024-01-08T14:36:43.3291729Z [xUnit.net 00:03:15.53] Stack Trace:
2024-01-08T14:36:43.3298230Z [xUnit.net 00:03:15.53] at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
2024-01-08T14:36:43.3304886Z [xUnit.net 00:03:15.53] at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) 2024-01-08T14:36:43.3348846Z [xUnit.net 00:03:15.53] at OpenQA.Selenium.WebDriver.Close() 2024-01-08T14:36:43.3366922Z [xUnit.net 00:03:15.53] D:\a\1\s\src\ui\Pricing.UI.Tests\FunctionUITests\FunctionalTestsBase.cs(564,0): at Pricing.UI.Tests.FunctionalTestsBase.Dispose(Boolean disposing) 2024-01-08T14:36:43.3407768Z [xUnit.net 00:03:15.53] D:\a\1\s\src\ui\Pricing.UI.Tests\FunctionUITests\FunctionalTestsBase.cs(266,0): at Pricing.UI.Tests.FunctionalTestsBase.Dispose() 2024-01-08T14:36:43.3433634Z [xUnit.net 00:03:15.53] C:\Dev\xunit\xunit\src\xunit.execution\Extensions\ReflectionAbstractionExtensions.cs(79,0): at ReflectionAbstractionExtensions.DisposeTestClass(ITest test, Object testClass, IMessageBus messageBus, ExecutionTimer timer, CancellationTokenSource cancellationTokenSource) 2024-01-08T14:36:43.3442413Z Failed Pricing.UI.Tests.RetailFamilyTests.FamilyMembers_PromoteFamilyMemberToLead [49 s] 2024-01-08T14:36:43.3453501Z Error Message: 2024-01-08T14:36:43.3474913Z OpenQA.Selenium.WebDriverException : disconnected: not connected to DevTools 2024-01-08T14:36:43.3563296Z (failed to check if window was closed: disconnected: not connected to DevTools) 2024-01-08T14:36:43.3590042Z (Session info: MicrosoftEdge=120.0.2210.77) 2024-01-08T14:36:43.3624142Z Stack Trace: 2024-01-08T14:36:43.3633889Z at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) 2024-01-08T14:36:43.3640140Z at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters)
2024-01-08T14:36:43.3649255Z at OpenQA.Selenium.WebDriver.Close()
2024-01-08T14:36:43.3665741Z at Pricing.UI.Tests.FunctionalTestsBase.Dispose(Boolean disposing) in D:\a\1\s\src\ui\Pricing.UI.Tests\FunctionUITests\FunctionalTestsBase.cs:line 564
2024-01-08T14:36:43.3740507Z at Pricing.UI.Tests.FunctionalTestsBase.Dispose() in D:\a\1\s\src\ui\Pricing.UI.Tests\FunctionUITests\FunctionalTestsBase.cs:line 266
2024-01-08T14:36:43.3757107Z at ReflectionAbstractionExtensions.DisposeTestClass(ITest test, Object testClass, IMessageBus messageBus, ExecutionTimer timer, CancellationTokenSource cancellationTokenSource) in C:\Dev\xunit\xunit\src\xunit.execution\Extensions\ReflectionAbstractionExtensions.cs:line 79
We have the same issue with 121.0.2277.128
OpenQA.Selenium.WebDriverException: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: MicrosoftEdge=121.0.2277.128)
bei OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
bei OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
bei OpenQA.Selenium.WebDriver.StartSession(ICapabilities desiredCapabilities)
bei OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
bei OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout)
bei OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout)
We could isolate the problem in our szeanrio. Maybe it also applies to others. The reason for us was that we set the environment variable WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS to --remote-debugging-port=9222
Now when opening for example Outlook and afterwards started our target application for testing, we got the error. When we did not start Outlook there was no error.
Our solution was to remove the environment variable from windows settings and set the environment variable only for the target application.