Open Ambassador-of-programming opened 1 month ago
Same problem here, but this is not a problem in undetected-chromedriver, but in chrome itself, after it has updated to version 129.
I found something about in here: https://issues.chromium.org/issues/367755364#comment2
They said that won't fix (probably not in 129).
Some things you can try:
Use --window-position= to hide that blank screen instead of using headless.
options.add_argument("--window-position=-2400,-2400")
Using group policy, you can downgrade Chrome to version 128 or use Chrome 130 (Beta), both are working.
Downgrade: https://support.google.com/chrome/a/answer/7125792
Using group policy: https://support.google.com/chrome/a/answer/6350036?hl=en&ref_topic=9023448&sjid=13249569283913473483-SA#zippy=%2Croll-back-chrome-browser-to-a-previous-version
You can try to use some CEF client from these versions too and change options.binary_location
You can find more information here: https://stackoverflow.com/questions/78996364/chrome-129-headless-shows-blank-window
https://googlechromelabs.github.io/chrome-for-testing/#beta
browser_executable_path = './chrome-win64/chrome.exe'
driver = uc.Chrome(options=options, browser_executable_path=browser_executable_path)
https://googlechromelabs.github.io/chrome-for-testing/#beta
browser_executable_path = './chrome-win64/chrome.exe' driver = uc.Chrome(options=options, browser_executable_path=browser_executable_path)
I tried installing https://googlechromelabs.github.io/chrome-for-testing/#beta
and set headless=True, but it doesn't work and gives an error, but if I set False, everything works successfully.
class Cian:
def __init__(self):
self.user_agent = UserAgent().chrome
self.options_chrome = uc.ChromeOptions()
self.options_chrome.add_argument(f'user-agent={self.user_agent}')
self.driver = uc.Chrome(
browser_executable_path='chrome/chrome-win64/chrome.exe',
driver_executable_path='chrome/chromedriver-win64/chromedriver.exe',
headless=True
)
I noticed that the site uses a defense. When headless=True is enabled it doesn't give the html page but only when False is disabled it gives the result. How can this problem be solved?
this works for me
options.add_argument("--headless=new")
options.add_argument("--window-position=-2400,-2400")
I think this issue may be related with selenium and chrome 129. Like links below same issues have been uploaded on selenium issues. https://github.com/SeleniumHQ/selenium/issues/14550
Google Chrome version 129.0.6668.71 undetected-chromedriver version 3.5.5
the error is this:
(Session info: chrome=129.0.6668.71); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace: GetHandleVerifier [0x00B86AB3+25587] (No symbol) [0x00B19C54] (No symbol) [0x00A12113] (No symbol) [0x00A56F62] (No symbol) [0x00A571AB] (No symbol) [0x00A97852] (No symbol) [0x00A7ABE4] (No symbol) [0x00A95370] (No symbol) [0x00A7A936] (No symbol) [0x00A4BA73] (No symbol) [0x00A4C4CD] GetHandleVerifier [0x00E64C63+3032483] GetHandleVerifier [0x00EB6B99+3368153] GetHandleVerifier [0x00C18F62+624802] GetHandleVerifier [0x00C207DC+655644] (No symbol) [0x00B2260D] (No symbol) [0x00B1F6D8] (No symbol) [0x00B1F875] (No symbol) [0x00B11CA6] BaseThreadInitThunk [0x76E37BA9+25] RtlInitializeExceptionChain [0x77D7C11B+107] RtlClearBits [0x77D7C09F+191]