Closed eugenedani closed 2 years ago
@eugenedani, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Perhaps this issue can be related to this one https://github.com/SeleniumHQ/docker-selenium/issues/1453
I have a pretty similar behavior with Selenium 4.1 + zalenium + cucumber-jvm. I get a lot fail tests with the reported exception about browser died. Same tests with selenium 3.141, and exception not reporducible
Could some please check, if the following error is related to this issue? I do not understand it, and can not tell it is.
https://github.com/seleniarm/docker-selenium/issues/1#issuecomment-989948236
Maybe this is a duplicate of #10080, which was fixed in #10081
@eugenedani what test can I use to reproduce the issue?
I used this Java code. Error are on line with driver.switchTo().defaultContent();
code
=================
package com.polarion.selenium.test.cases;
import java.net.URL;
import java.time.Duration;
import java.util.HashMap;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.PageLoadStrategy;
import org.openqa.selenium.UnexpectedAlertBehaviour;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriverLogLevel;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.remote.RemoteWebDriver;
public class ServerTest {
public static void main(String[] args) {
URL hubUrl;
try {
hubUrl = new URL("http://localhost:4444/wd/hub");
} catch (java.net.MalformedURLException e) {
throw new RuntimeException("Remote WebDriver Hub URL has some error: " + e.getMessage());
}
ChromeOptions chromeOptions = new ChromeOptions();
setOptions(chromeOptions);
//Initiating your chromedriver
WebDriver driver = new RemoteWebDriver(hubUrl, chromeOptions);
//Applied wait time
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
//maximize window
driver.manage().window().maximize();
//Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
driver.switchTo().defaultContent();
driver.get("https://www.google.com");
WebElement agreeButton = driver.findElement(By.xpath("(//button/div[@role='none'])[4]"));
agreeButton.click();
driver.findElement(By.cssSelector("input[name='q']")).sendKeys("Selenium");
new Actions(driver).sendKeys(Keys.ENTER).perform();
//closing the browser
driver.quit();
}
private static void setOptions(ChromeOptions chromeOptions) {
addArguments(chromeOptions);
addOptions(chromeOptions);
addPreferences(chromeOptions);
}
private static void addArguments(ChromeOptions chromeOptions) {
chromeOptions
.addArguments("--no-default-browser-check", "--enable-automation", "--disable-infobars", "--disable-component-extensions-with-background-pages", "--disable-extensions", "--start-maximized", "--disable-password-generation");
}
private static void addOptions(ChromeOptions chromeOptions) {
chromeOptions.setLogLevel(ChromeDriverLogLevel.INFO).setAcceptInsecureCerts(true).setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.IGNORE).setPageLoadStrategy(PageLoadStrategy.EAGER);
}
private static void addPreferences(ChromeOptions chromeOptions) {
HashMap<String, Object> chromePreferences = new HashMap<>();
chromePreferences.put("credentials_enable_service", false);
chromePreferences.put("profile.password_manager_enabled", false);
chromeOptions.setExperimentalOption("prefs", chromePreferences);
}
}
Thank you for providing a test case to reproduce this. If I use version 4.1.0
I can reproduce the issue. When I run the same test using the code we have in trunk
, I see the test passes, which means that #10081 is also fixing this.
We are doing a release in the next days that includes this fix.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What happened?
Hello, after updating to v 4.1.0 our Grid Server stoped working. We have Docker network with Grid Server. Hub has own container. Nodes have own containers. We tried Server Grid 3 and Server Grid 4.1.0 with Selenium 4.1.1 (If we run Selenium 4.0.0 with Selenium Server 4.1.0 it woks without issues.) Error is the same for all browsers
How can we reproduce the issue?
Relevant log output
Operating System
Ubuntu
Selenium version
Java 4.1.1
What are the browser(s) and version(s) where you see this issue?
Chrome 96.0.4664.93, FF 94.0.2 and Edge 96.0.1054.43
What are the browser driver(s) and version(s) where you see this issue?
Chrome WebDriver 96.0.4664.45, FF WebDriver 0.30.0 and Edge WebDriver 96.0.1054.43
Are you using Selenium Grid?
4.1.1 and 3.141.59