Chrome 129 Headless Blank Window on Windows
Problem Statement
When running Chrome 129 in headless mode on Windows systems, users encounter an unexpected blank white window that matches the browser size (see screenshot below). This issue occurs across popular automation frameworks including Puppeteer, Selenium, and Playwright.
Affected Environments:
- Only Windows OS (macOS and Linux unaffected)
- Chrome version 129 specifically
- Automation Tools:none
+---------------------+----------+----------+----------+ | Tool | Chrome128| Chrome129| Chrome130| +---------------------+----------+----------+----------+ | Puppeteer (v23.4.0) | ✓ | ✗ | ✓ | | Selenium (v4.0) | ✓ | ✗ | ✓ | | Playwright (v1.47.1)| ✓ | ✗ | ✓ | +---------------------+----------+----------+----------+
Cause: A Windows-specific rendering bug introduced in Chrome's new headless mode (--headless=new
) implementation. Chrome 129 switched to this mode by default, but the bug was quickly identified and fixed in Chrome 130.
WARNING
The issue occurs only on Windows machines. If you're developing on macOS/Linux, you might not encounter this bug during local testing.
Recommended Solutions
Temporary Solution: Use Legacy Headless Mode
The most effective workaround for Chrome 129 is to revert to the legacy headless mode using the --headless=old
flag. This mode isn't affected by the Windows rendering bug.
Puppeteer Example:
const browser = await puppeteer.launch({
headless: false, // Never use boolean true in this case!
args: ['--headless=old', '--disable-gpu']
});
Selenium (Python) Example:
from selenium.webdriver import ChromeOptions
options = ChromeOptions()
options.add_argument("--headless=old")
options.add_argument("--disable-gpu")
driver = webdriver.Chrome(options=options)
Playwright Example:
const { chromium } = require('playwright');
const browser = await chromium.launch({
headless: false, // Overridden by args
args: ['--headless=old']
});
Compatibility Note
Add the --headless=old
argument even if you configure headless:false
in Puppeteer/Playwright. Browser launch arguments take priority.
::: caution Deprecation Notice The old headless mode is scheduled for removal in a future Chrome release. Use this only as a temporary fix for Chrome 129. :::
Alternative Workaround: Move Off-Screen
If switching to legacy mode isn't feasible, move the browser window off-screen:
# Python (Selenium/Puppeteer-Python)
options.add_argument("--window-position=-2400,-2400")
// JavaScript (Puppeteer)
await page.setViewport({ width: 1200, height: 800 });
await page.evaluate(_ => {
window.moveTo(-2400, -2400);
});
Permanent Solution: Update Chrome
The defect is fixed in Chrome 130 and later. Upgrade immediately:
- Manual Update: Download directly from Google Chrome
- Package Managers:
- Chocolatey (Windows):
choco upgrade googlechrome
- Homebrew (macOS):
brew upgrade --cask google-chrome
- Chocolatey (Windows):
TIP
Check compatibility after updating:
# Python verification
import selenium.webdriver as webdriver
driver = webdriver.Chrome()
print('Chrome version:', driver.capabilities['browserVersion'])
driver.quit()
Explanation
Chrome 129 changed its default headless behavior from --headless=old
to --headless=new
, introducing an unexpected regression in window handling specifically on Windows platforms. The new headless mode uses a different rendering pipeline that accidentally created this visible blank window.
Key Events:
- Chrome 109 introduced new headless mode
- Chrome 129 made it default (triggering the bug)
- Chrome 130 contains the fix (Chromium Patch)
Why the Fuss About Headless Modes?
The new headless mode (--headless=new
) offers significant improvements:
- Better resource efficiency
- Enhanced debugging capabilities
- Improved compliance with web standards
- Advanced screenshot and PDF features
Best Practice Recommendations
- Version Locking: Pin Chrome to version 128 or 130+ in CI/CD pipelines
- Cross-Browser Testing: Always test on multiple Chrome versions during QA
- Monitoring: Track Chromium issue tracker for breaking changes (Issues 367755364, Issues 359921643)
When Chrome 130 becomes widely available (typically within 1-3 weeks of initial release), discontinue all workarounds and leverage the updated headless mode features as originally intended.