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

[🐛 Bug]: unknown error: unhandled inspector error: {"code":-32000,"message":"Browser window not found"} #14231

Closed
pranesh517 opened this issue Jul 5, 2024 · 2 comments

Comments

@pranesh517
Copy link

What happened?

Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Browser window not found"}
is received during driver.manage().window().maximize();

Tried using Selenium Manager as well, facing same issue while maximizing the browser window.

How can we reproduce the issue?

Below is the script to reproduce the issue:

public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--no-sandbox");
        options.addArguments("--disable-dev-shm-usage");
        options.addArguments("--remote-debugging-pipe");
        options.addArguments("--disable-gpu");

        WebDriver driver = new ChromeDriver(options);
        driver.navigate().to("https://www.selenium.dev/documentation/selenium_manager/");
        driver.manage().window().maximize();
        System.out.println(driver.getTitle());
        driver.quit();
    }

Relevant log output

Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Browser window not found"}
  (Session info: chrome=126.0.6478.127)
Build info: version: '4.22.0', revision: 'c5f3146703*'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '21.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [7541ae55119a2abb59c06d86aea3ffeb, maximizeCurrentWindow {}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 126.0.6478.127, chrome: {chromedriverVersion: 126.0.6478.126 (d36ace6122e..., userDataDir: C:\Users\gaikwap6\AppData\L...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:54510}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:54510/devtoo..., se:cdpVersion: 126.0.6478.127, 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: 7541ae55119a2abb59c06d86aea3ffeb
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
	at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:591)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
	at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:1034)
	at com.testcases.internationalisation.sample.main(sample.java:24)

Operating System

Windows 10

Selenium version

4.22.0

What are the browser(s) and version(s) where you see this issue?

Chrome - 126.0.6478.127

What are the browser driver(s) and version(s) where you see this issue?

Chrome - 126.0.6478.127

Are you using Selenium Grid?

No

Copy link

github-actions bot commented Jul 5, 2024

@pranesh517, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

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, MSEdgeDriver, 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!

@diemol
Copy link
Member

diemol commented Jul 8, 2024

I cannot reproduce the issue.

Does this happen when you use Firefox? Have you tried it on a different machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants