You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maximize_window() fails with Chrome 133+ in undetected-chromedriver
Issue Description
When using undetected-chromedriver with Chrome version 133 or higher, the maximize_window() method fails with a JavaScript evaluation error. This issue does not occur with Chrome version 131 or lower.
Importantly, this issue is specific to undetected-chromedriver - the same code works perfectly fine with regular ChromeDriver:
# Works fine with regular ChromeDriverfromseleniumimportwebdriverfromselenium.webdriver.chrome.serviceimportServicefromselenium.webdriver.chrome.optionsimportOptionsoptions=Options()
options.add_argument('--start-maximized')
driver=webdriver.Chrome(
options=options
)
driver.maximize_window() # Works without any issues# Fails with undetected-chromedriverimportundetected_chromedriverasucoptions=uc.ChromeOptions()
options.add_argument('--start-maximized')
driver=uc.Chrome(
headless=False,
use_subprocess=False,
version_main=134, # Issue occurs with version 133+options=options
)
driver.maximize_window() # Triggers the error
Environment
undetected-chromedriver: 3.5.5
Chrome version: 134.0.6998.3
Python: 3.11
OS: Ubuntu 22.04 (Docker)
Steps to Reproduce
Install undetected-chromedriver and set up Chrome 134
Run the example code above
The error occurs specifically with undetected-chromedriver, while regular ChromeDriver works normally
Error Message
selenium.common.exceptions.WebDriverException: Message: unknown error: JavaScript code failed
from unknown command: 'Runtime.evaluate' wasn't found
(Session info: chrome=134.0.6998.3)
Expected Behavior
The browser window should maximize without any errors
This functionality works correctly with:
Chrome version 131 in undetected-chromedriver
All Chrome versions in regular ChromeDriver
Additional Information
The issue is exclusive to undetected-chromedriver (regular ChromeDriver works fine with all versions)
The error occurs in both headless and non-headless modes
Adding --start-maximized to ChromeOptions does not prevent the issue
Current Workaround
Using Chrome version 131 as a temporary solution:
driver=uc.Chrome(
version_main=131, # Using older version as workaroundoptions=options
)
Please let me know if you need any additional information to investigate this issue.
The text was updated successfully, but these errors were encountered:
I feel that not only maximize_window(), but also many of the driver.~ commands are not working properly. I would like to ask the developers of uc to address this issue as soon as possible.
maximize_window() fails with Chrome 133+ in undetected-chromedriver
Issue Description
When using undetected-chromedriver with Chrome version 133 or higher, the
maximize_window()
method fails with a JavaScript evaluation error. This issue does not occur with Chrome version 131 or lower.Importantly, this issue is specific to undetected-chromedriver - the same code works perfectly fine with regular ChromeDriver:
Environment
Steps to Reproduce
Error Message
Expected Behavior
Additional Information
--start-maximized
to ChromeOptions does not prevent the issueCurrent Workaround
Using Chrome version 131 as a temporary solution:
Please let me know if you need any additional information to investigate this issue.
The text was updated successfully, but these errors were encountered: