If your Puppeteer code calls both page.emulateMediaType() and page.emulateMediaFeatures(), Puppeteer 25.18.1 keeps only the one you called last, and so did 24.11.1, the other older version we tested. Ask for print styles and then dark mode, and you get screen styles in dark mode. Ask for dark mode and then screen styles, and you get light mode. Puppeteer 25.19.0, released on 25 November 2026, fixes this. Below are the tests we ran on both versions, what the fix changes, a workaround for older versions, and what the release's other screenshot change, a browser-wide screenshot lock, does to capture speed.
What goes wrong
Puppeteer sends both settings to Chrome through one DevTools Protocol (CDP) command, Emulation.setEmulatedMedia. It takes two optional parameters: media, the CSS media type, and features, a list of media features such as prefers-color-scheme. When either parameter is left out, Chrome resets it.
Up to 25.18.1, Puppeteer sent each setting on its own: emulateMediaType() sent only media, and emulateMediaFeatures() sent only features. So each call wiped out the other. The 25.19.0 code now keeps one combined state and always sends both, with a comment saying that the command "resets the media type or the features when they are omitted". Pull request #15745 explains the impact: PDF wrappers call the two methods in exactly this order, so their pages render with the wrong media. We checked two of the wrappers it names. The browsershot (PHP) and grover (Ruby) sources both call emulateMediaType and then emulateMediaFeatures.
Our test
We ran the script below with puppeteer-core 25.18.1 and with 25.19.0. To keep the browser the same in both runs, both used the Google Chrome 158.0.8127.37 installed on the Mac instead of the browser each release downloads. The script tries the calls in both orders on fresh pages and asks the page which media queries match.
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.launch({
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
});
const dark = [{ name: 'prefers-color-scheme', value: 'dark' }];
const state = (page) => page.evaluate(() => ({
print: matchMedia('print').matches,
dark: matchMedia('(prefers-color-scheme: dark)').matches,
}));
const a = await browser.newPage();
await a.emulateMediaType('print');
await a.emulateMediaFeatures(dark);
console.log('type, then features:', await state(a));
const b = await browser.newPage();
await b.emulateMediaFeatures(dark);
await b.emulateMediaType('screen');
console.log('features, then type:', await state(b));
await browser.close();
Output with 25.18.1:
type, then features: { print: false, dark: true }
features, then type: { print: false, dark: false }
Output with 25.19.0:
type, then features: { print: true, dark: true }
features, then type: { print: false, dark: true }
The second line is correct in both versions only because screen is also what the page uses with no emulation. Losing the media type looks harmless there, but the lost dark mode is a real change. The same script with puppeteer 24.11.1 printed the same wrong results as 25.18.1, so this behaviour is not new in the 25.x line.
What it does to screenshots and PDFs
We made a small test page that prints which media type and colour scheme are active, then captured it after each pair of calls.

Two practical results (for the basics of each, see our guides to dark-mode screenshots and HTML to PDF in JavaScript):
- Dark-mode screenshots come out light. If your code turns on dark mode and later sets the media type, perhaps in a separate helper that runs before every capture, 25.18.1 and older silently go back to light mode.
- PDFs use the wrong stylesheet. Chrome uses print styles for
page.pdf() unless the media type is set to screen. We set screen and then dark mode, generated a PDF with each version, and extracted the text with pdftotext. The 25.18.1 PDF said "media type: print" and the 25.19.0 PDF said "media type: screen". Anyone asking for a PDF that looks like the screen version got the print version instead.
The fix, and a workaround for older versions
The fix is to upgrade to puppeteer or puppeteer-core 25.19.0. Note that 25.19.0 also moves the bundled Chrome to 158.0.8127.88, so test your captures after upgrading as usual.
If you can't upgrade yet, set both values in one CDP call. Chrome then gets both parameters together and neither resets the other:
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.launch({
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
});
const page = await browser.newPage();
const cdp = await page.createCDPSession();
await cdp.send('Emulation.setEmulatedMedia', {
media: 'print',
features: [{ name: 'prefers-color-scheme', value: 'dark' }],
});
console.log(await page.evaluate(() => ({
print: matchMedia('print').matches,
dark: matchMedia('(prefers-color-scheme: dark)').matches,
})));
await browser.close();
This printed { print: true, dark: true } with both 25.18.1 and 25.19.0. Puppeteer doesn't track settings made this way, so don't mix this call with later emulateMediaType() or emulateMediaFeatures() calls on the same page. On older versions, those calls would reset one of the values again.
A smaller thing we noticed: to clear the feature emulation, call emulateMediaFeatures() with no argument or with []. Passing null threw a protocol error ("Failed to deserialize params.features") in both versions. The method's signature doesn't allow null anyway, unlike emulateMediaType(), whose documentation says null turns off media emulation.
The other screenshot change: one lock per browser
The same release lists "serialize page screenshots across browser contexts" (pull request #15775). It moves Puppeteer's screenshot lock from each browser context to the browser, and removes a separate lock on Page.screenshot that the pull request calls redundant. If you run captures in parallel in isolated contexts, you might expect this to slow you down. In our test it didn't. The removed lock in 25.18.1 was already keyed on the browser, so screenshots in one browser already ran one at a time.
We took full-page screenshots of a 7,200-pixel-tall local page at a 1280×800 viewport, four at once, seven rounds per setup, and recorded the median time.

| Setup (4 screenshots at once) | 25.18.1 | 25.19.0 |
|---|
| 1 page alone, for comparison | 1,631 to 1,679 ms | 1,621 to 1,694 ms |
| 4 pages in 1 context | 6,451 to 6,771 ms | 6,420 to 6,654 ms |
| 4 pages in 4 contexts | 6,404 to 6,596 ms | 6,439 to 6,690 ms |
| 4 pages in 4 browsers | 1,824 ms | 1,766 ms |
Four screenshots in one browser took about four times as long as one, whether or not the pages shared a context, and the two versions were within run-to-run noise. Four separate browser processes finished all four in about the time of one. So if screenshot throughput matters, run more browser processes, not more contexts. Contexts still matter for isolation: they keep cookies and storage apart between captures.
What to do
- Upgrade to Puppeteer 25.19.0 if any code path sets both a media type and media features, including PDF wrappers built on Puppeteer.
- Check your dark-mode captures and screen-styled PDFs from before the upgrade. Any that went through both calls may have been captured in light mode or with print styles.
- On older versions, use the single
Emulation.setEmulatedMedia call above.
If you'd rather not manage this yourself, our free screenshot tool and screenshot API handle browser setup for you.