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

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) #126

Open
ij-23 opened this issue Nov 27, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@ij-23
Copy link

ij-23 commented Nov 27, 2023

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:

  1. 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

@ij-23 ij-23 added the bug Something isn't working label Nov 27, 2023
@bwalderman
Copy link
Member

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?

@Ztomporo
Copy link

Ztomporo commented Jan 8, 2024

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)

@vndToptalAXH
Copy link

vndToptalAXH commented Jan 16, 2024

@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)
image
image
UI
![image](image (7))

C# selenium code:
///


/// Verify a popout link has opened a new page.
///

/// Page header to look for.
/// If the new tab shouold be closed after the test.
protected void VerifyPopOutLink(string pageHeader, bool closeNewTab = true)
{
var parentHandle = _webDriver.Driver.CurrentWindowHandle;
_webDriver.WaitUntilNewWindowIsOpened(2);
var childwindows = _webDriver.Driver.WindowHandles.GetEnumerator();
while (childwindows.MoveNext())
{
if (childwindows.Current != parentHandle)
{
_webDriver.Driver.SwitchTo().Window(childwindows.Current);
var pageHeaderText = _webDriver.WaitUntilElementIsVisible(By.CssSelector(".navbar-brand > div:nth-child(1) > span:nth-child(2)")).Text;
Assert.Equal(pageHeader, pageHeaderText);
if (closeNewTab)
{
_webDriver.Driver.Close();
}

            _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

@greuelpirat
Copy link

greuelpirat commented Feb 23, 2024

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)

@hakito
Copy link

hakito commented Apr 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants