Disconnected: Unable to receive message from renderer

Details:

Triggered by Katalon TestCloud Agent v1.20.19.

Katalon Version: 9.7.2

TestCloud environment:

image

Issue:

I am trying to run single test case, that is consistently passing every time when running locally using Katalon studio, yet when executed in TestCloud, 9/10 attempts will fail (once now and then it will pass) when it fails, I am consistently getting this error:

Caused by: org.openqa.selenium.WebDriverException: disconnected: Unable to receive message from renderer
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=132.0.6793.2)
Build info: version: ‘3.141.59’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘126616winchrome132-7833107-katalon-agent-lfdl5’, ip: ‘10.50.39.145’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘6.1.90’, java.version: ‘17.0.8.1’
Driver info: com.kms.katalon.selenium.driver.CRemoteWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 132.0.6793.2, chrome: {chromedriverVersion: 132.0.6793.2 (b39907d62aa9c…, userDataDir: C:\Program Files\scoped_dir…}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:9225}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 9f8e5aa50fab74a85128bf1abf27d170

  • at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)*
  • at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)*
  • at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)*
  • at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)*
  • at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)*
  • at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)*
  • at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)*
  • at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)*
  • at com.kms.katalon.selenium.driver.CRemoteWebDriver.execute(CRemoteWebDriver.java:30)*
  • at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)*
  • at org.openqa.selenium.remote.RemoteWebElement.isDisplayed(RemoteWebElement.java:326)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)*
  • at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
  • at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.**$new$0(EventFiringWebDriver.java:404)
  • at jdk.proxy2/jdk.proxy2.$Proxy34.isDisplayed(Unknown Source)*
  • at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.isDisplayed(EventFiringWebDriver.java:470)*
  • at org.openqa.selenium.support.ui.ExpectedConditions.elementIfVisible(ExpectedConditions.java:314)*
  • at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:43)*
  • at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:300)*
  • at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:297)*
  • at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)*
  • at org.openqa.selenium.support.ui.Wait$until.call(Unknown Source)*
  • at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword$_waitForElementVisible_closure1.doCall(WaitForElementVisibleKeyword.groovy:81)*
  • at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword$_waitForElementVisible_closure1.doCall(WaitForElementVisibleKeyword.groovy)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)*
  • at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
  • at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:35)*
  • at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain$runKeyword.call(Unknown Source)*
  • at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword.waitForElementVisible(WaitForElementVisibleKeyword.groovy:98)*
  • at com.kms.katalon.core.webui.keyword.builtin.WaitForElementVisibleKeyword.execute(WaitForElementVisibleKeyword.groovy:68)*
  • at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)*
  • at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.waitForElementVisible(WebUiBuiltInKeywords.groovy:461)*
  • at pom.ModuleHomePage.waitUntilLeftMenuVisible(ModuleHomePage.groovy:103)*
  • at pom.ModuleHomePage.openNewRecordForm(ModuleHomePage.groovy:56)*
  • at steps.CommonCrudSteps.new_action_form_isdisplayed(CommonCrudSteps.groovy:40)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)*
  • at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
  • at cucumber.runtime.Utils$1.call(Utils.java:26)*
  • at cucumber.runtime.Timeout.timeout(Timeout.java:16)*
  • at cucumber.runtime.Utils.invoke(Utils.java:20)*
  • at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:48)*
  • at cucumber.runtime.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:50)*
  • at cucumber.runner.TestStep.executeStep(TestStep.java:72)*
  • at cucumber.runner.TestStep.run(TestStep.java:54)*
  • at cucumber.runner.PickleStepTestStep.run(PickleStepTestStep.java:53)*
  • at cucumber.runner.TestCase.run(TestCase.java:47)*
  • at cucumber.runner.Runner.runPickle(Runner.java:44)*
  • at cucumber.runtime.Runtime.runFeature(Runtime.java:120)*
  • at cucumber.runtime.Runtime.run(Runtime.java:106)*
  • at cucumber.api.cli.Main.run(Main.java:35)*
  • at cucumber.api.cli.Main$run.call(Unknown Source)*
  • at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy:110)*
  • at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)*
  • at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
  • at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:75)*
  • at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:69)*
  • at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)*
  • at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:77)*
  • at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)*
  • at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:256)*
  • at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)*
  • at Arca_CRUD.run(Arca_CRUD:20)*
  • at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)*
  • at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)*
  • at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)*
  • at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)*
  • at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)*
  • at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)*
  • at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)*
  • at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)*
  • at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:150)*
  • at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)*
  • at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:180)*
  • at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)*
  • at TempTestSuite1730372946202.run(TempTestSuite1730372946202.groovy:35)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
  • at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)*
  • at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
2 Likes

kindly format the code for better readability

I’m seeing exactly the same issue… seams to happen when my test it switching to a new tab or window

is it happening with latest driver and katalon versions?

It is because you are using chrome 132 (dev) that is not compatible with the webdriver used , use a stable version of chrome (try 129 or 130 ) and it should work fine @mateusz.mysliwiec

also update the webdriver in katalon and then check

This is what I’m seeing in part of the error logs

2024-11-05T10:57:49.1053651Z at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2024-11-05T10:57:49.1054359Z Caused by: org.openqa.selenium.WebDriverException: disconnected: Unable to receive message from renderer
2024-11-05T10:57:49.1055211Z (failed to check if window was closed: disconnected: not connected to DevTools)
2024-11-05T10:57:49.1055735Z (Session info: chrome=130.0.6723.92)

2024-11-05T10:58:10.3275029Z Build info: version: ‘3.141.59’, revision: ‘unknown’, time: ‘unknown’

2024-11-05T10:58:10.3275314Z System info: host: ‘Hidden*’, ip: ‘***’, os.name: ‘Windows Server 2019’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’

2024-11-05T10:58:10.3275592Z Driver info: com.kms.katalon.selenium.driver.CChromeDriver

2024-11-05T10:58:10.3276327Z Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 130.0.6723.92, chrome: {chromedriverVersion: 130.0.6723.91 (53ac07678369…, userDataDir: C:\Windows\SERVIC~1\NETWOR~…}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:51423}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}

Running the latest katalon 9.7.3

Thanks

Just to add this only happens on test cases that are trying to switch to a newly opened tab… The rest of the suite runs fine

You can either add a delay or explicitly switch to new tab (latest opened new tab)

Hi Monty,

Thanks for the quick response

This is the section of the test script I’ve added a delay but then updated it to this:

// Add delay or wait for window count to ensure new tab is ready
WebUI.delay(2 // Short delay to allow new tab initiation
)

// Wait until there are two tabs/windows
int maxRetries = 5

int retryCount = 0

while ((WebUI.getWindowIndex() < 2) && (retryCount < maxRetries)) {
WebUI.delay(2 // Delay to allow new tab to fully open
)

retryCount++

}

// Switch to the new window (tab) at index 1
WebUI.switchToWindowIndex(1)

I should add this is only happening when I run the test case on our virtual machine… it’s through azure devops and executes on the runtime licence.

Running it locally with the same chrome version and driver versions it’s totally fine… Which makes it even more confusing.

Thanks again for your responses they are much appreciated

What works on local (although ur code is correct) may not work on ADO , so you have to ensure that it works in both the places

Did my above reply solve ur issue?

I’ve tried it with the delay you suggested… what do you mean by explicitly switch to new tab? is that something different to how I’ve got my code

Ensure you have sufficient wait time before and after switching windows