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]: driver fails calling to minimize_browser() with error: failed to change window state to 'minimized', current state is 'normal' (Linux ENV) #15192

Open
bwomsm1 opened this issue Jan 30, 2025 · 8 comments

Comments

@bwomsm1
Copy link

bwomsm1 commented Jan 30, 2025

What happened?

I am running the following simple test script:

import time
from selenium import webdriver

driver = webdriver.Chrome()
driver.get('http://www.google.com')

time.sleep(2)
driver.minimize_window()
time.sleep(5)

driver.quit()

My script failed in line 7 when calling to driver.minimize_window() with the following error:

Message: unknown error: failed to change window state to 'minimized', current state is 'normal'
  (Session info: chrome=132.0.6834.159)

How can we reproduce the issue?

Run the follwing script:

import time
from selenium import webdriver

driver = webdriver.Chrome()
driver.get('http://www.google.com')

time.sleep(2)
driver.minimize_window()
time.sleep(5)

driver.quit()

Against Linux ENV:

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Relevant log output

Message: unknown error: failed to change window state to 'minimized', current state is 'normal'
  (Session info: chrome=132.0.6834.159)

Operating System

Linux Debian GNU/Linux 12 (bookworm)

Selenium version

Python Selenium 4.26.0

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

Chrome

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

132.0.6834.159

Are you using Selenium Grid?

NO

Copy link

@bwomsm1, 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!

@pujagani
Copy link
Contributor

pujagani commented Jan 31, 2025

I have tried to reproduce this on MacOS and unable to with Java. I doubt it is language-specific but will try with Python as well. What version of Chromedriver are you using? Does it occur with Firefox or other versions of Chrome?

@pujagani
Copy link
Contributor

Even with python, the behavior is expected.

@bwomsm1
Copy link
Author

bwomsm1 commented Jan 31, 2025

I am experiencing the problem with ChromeOS, my test is running from the Linux CMD in the Chromebook.

@bwomsm1
Copy link
Author

bwomsm1 commented Jan 31, 2025

My guess is that if you will run it in the env PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" you will also be able to see the problem

@bwomsm1
Copy link
Author

bwomsm1 commented Feb 3, 2025

@pujagani and all, any news about this issue? The problem is easily reproducing against Linux environments.

@pujagani
Copy link
Contributor

pujagani commented Feb 4, 2025

If it is specific to Linux environments, only reproducible with Chrome, then there is a good chance it is a Chrome issue.

@bwomsm1
Copy link
Author

bwomsm1 commented Feb 4, 2025

If it is specific to Linux environments, only reproducible with Chrome, then there is a good chance it is a Chrome issue.

It is reproducing with various of Linux OSs, also my team mates are experiencing the problem

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