TechKing
TechKing

Reputation: 21

Timed out receiving message from renderer: 600.000 with Chrome v73.0, ChromeDriver 2.46 on Bamboo Server

After chrome browser upgraded to 73.0 selenium test are not getting executed in bamboo build server and working fine when executed locally. Upgraded compatible version of chromeDriver 2.46. Still getting error:

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1554111197.266][WARNING]: Timed out connecting to Chrome, retrying...
Apr 01, 2019 5:33:18 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS

Force Stop build feature is enabled for current plan. Either Bamboo has detected the build has hung or it has been manually stopped.

Below is code used to launch browser:

public void selectBrowser(String browser)
{
    System.out.println(System.getProperty("os.name"));
    if (System.getProperty("os.name").contains("Window")) {
      if (browser.equals("chrome")) {
        System.out.println(System.getProperty("user.dir"));
        System.setProperty("webdriver.chrome.driver", 
        System.getProperty("user.dir") + "/drivers/chromedriver.exe");
        ChromeOptions chromeOptions = new ChromeOptions();
        chromeOptions.addArguments("--verbose");
        chromeOptions.addArguments("--whitelisted-ips=");
        chromeOptions.setPageLoadStrategy(PageLoadStrategy.NONE);
        driver = new ChromeDriver(ChromeOptions);
      } 
    }
}

Error displayed in bamboo during test execution:

Please click to see bamboo error screenshot

Upvotes: 2

Views: 950

Answers (1)

undetected Selenium
undetected Selenium

Reputation: 193058

Long Story cut Short John Chen (Owner - chromedriver) have confirmed that:

The root cause is indeed in Chrome 73.x, not in ChromeDriver. We are working with Chrome devs to find a solution.


Solution

A quick fix solution will be to:

Note: If you are using Chrome version 72, please download ChromeDriver 2.46 or ChromeDriver 72.0.3626.69

  • Ensure that JDK is upgraded to recent level of JDK 8u202.

Alternative

Adding the argument --disable-features=VizDisplayCompositor through an instance of ChromeOptions() seems solves the issue:

ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-features=VizDisplayCompositor");
WebDriver driver = new ChromeDriver(options);
driver.get("https://google.com");

Outro

You can find the relevant discussions in:

Upvotes: 1

Related Questions