Today, I updated the Chrome browser to the latest version (129). After the update, running Chrome in headless mode produces an unusual result: a blank white window appears, matching the size of the browser. I was using Puppeteer and Selenium with Chrome 129 on Windows.
Why did this blank window start appearing? Is this a bug with Chrome 129?
Test Result:
Chrome128 | Chrome129 | Chrome130 | |
---|---|---|---|
Puppeteer(v23.4.0) | O | X | O |
Selenium(v4.0) | O | X | O |
Playwright(v1.47.1) | O | X | O |
Update: MacOS, Linux no problem.
Bug tickets were filed for this in the Chromium project:
This affects Windows users of headless Chromium 129, where Chromium changed the default headless
mode from the old one (--headless=old
) to the new one (--headless=new
).
If you read all the Stack Overflow comments of https://stackoverflow.com/a/73840130/7058266, you'll find that the old headless mode is being retired this year. (It's already not the default headless mode anymore.)
Here's my temporary fix for the bug (when using Chrome's new headless mode):
--window-position=-2400,-2400
options.add_argument("--window-position=-2400,-2400")
(I moved the window far off-screen so that it's not seen.)
Or, for now, you can switch back to the old headless mode (--headless=old
), but that's being retired soon, and lacks the features of the new headless mode. The PR with the fix has already been merged: https://chromium-review.googlesource.com/c/chromium/src/+/5789117 (but you might not see that until Chrome 130).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With