Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallUse Firebase Functions with a supported Node.js runtime, install the standard puppeteer package, keep its browser cache inside node_modules, and pin the lockfile. Puppeteer then downloads a compatible Chrome for Testing build (and, for applicable releases, chrome-headless-shell). This is the safest meaning of “latest”: the newest browser that Puppeteer’s selected version supports, not an independently upgraded Chromium binary.
The steps below target Node.js Firebase Cloud Functions. First- and second-generation functions share the packaging principles, but generation-specific limits and settings still apply to your project.
What “latest Chromium” means with Puppeteer
The normal puppeteer package manages a browser download during installation. Puppeteer documents that this is a recent Chrome for Testing build and, from Puppeteer 21.6.0 for applicable versions, a chrome-headless-shell download as well. That browser is guaranteed to work with the Puppeteer version that downloaded it.
Do not assume that updating Chromium separately while leaving Puppeteer unchanged is safe. Chromium and Puppeteer communicate through a tested protocol pairing. If you need a separately managed browser, choose and validate the pairing yourself, then pass its path or channel explicitly.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Reference Book
- Osprey Fortress #58 Vietnam Firebases 1965-73 American & Australian Forces by Randy E M Foster & Peter Dennis
- Book has slightly yellowed
Two supported models
| Model | How it works | Main benefit | Main responsibility |
|---|---|---|---|
| Puppeteer-managed | Install puppeteer; its install step downloads the compatible browser. |
Version pairing is handled by Puppeteer. | Ensure install scripts run and the downloaded files are deployed. |
| Separately managed | Package Chromium/Chrome yourself and set executablePath or a supported channel. |
Control over the exact browser build and OS packaging. | Keep the browser compatible, include all files and libraries, and maintain updates. |
Choose a Firebase runtime that is still supported
Firebase currently lists Node.js 22 and Node.js 20 as supported Cloud Functions runtimes; Node.js 18 is deprecated. Runtime support changes, so check Firebase’s current “Manage functions” documentation when you create or update a service.
Set the runtime in functions/package.json
For a standard Firebase project, put an engines entry in the functions/package.json file:
{
"name": "functions",
"engines": {
"node": "22"
},
"main": "index.js",
"dependencies": {
"firebase-functions": "^6.0.0",
"firebase-admin": "^13.0.0",
"puppeteer": "^24.0.0"
}
}
Use the Puppeteer major version you have selected rather than copying this illustrative range blindly, then commit package-lock.json. A lockfile makes a deployment reproducible while “latest” continues to change upstream.
Or set it in firebase.json
Firebase also supports a runtime setting in firebase.json. When both are present, the Firebase CLI gives the firebase.json setting precedence. Keep one intentional source of truth to avoid deploying a different Node.js version than you expect.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteRank #2
Deploying Cloud Functions requires the Firebase project to be on the Blaze pricing plan, according to Firebase’s getting-started documentation.
Install Puppeteer as a production dependency
From your project directory, install Puppeteer with your package manager and save the lockfile:
cd functions
npm install puppeteer
npm ci
Use puppeteer, not puppeteer-core, when you want Puppeteer to download its own compatible browser. puppeteer-core does not automatically download a browser; it is appropriate only when your project has another browser-packaging plan.
Confirm the browser install actually ran
Package managers and CI systems can disable lifecycle scripts. If the postinstall step is skipped, JavaScript dependencies may be present while the browser executable is missing. During development, inspect Puppeteer’s cache directory after npm ci and run a launch check before deploying:
Rank #3
node -e "const p=require('puppeteer'); p.launch({headless:true}).then(async b=>{console.log('browser launch ok'); await b.close()}).catch(e=>{console.error(e); process.exit(1)})"
That check proves the local install, not the deployed artifact. Treat deployment verification as a separate step.
Put the Puppeteer cache inside node_modules
Puppeteer’s Google Cloud Functions troubleshooting guidance recommends placing its cache beneath node_modules. This mitigates a failure mode where a cached dependency install skips Puppeteer’s install script and the browser executable never reaches the function bundle.
Create a project-level Puppeteer configuration file, for example functions/.puppeteerrc.cjs:
const { join } = require('path');
/** @type {import('puppeteer').Configuration} */
module.exports = {
cacheDirectory: join(__dirname, 'node_modules', '.cache', 'puppeteer')
};
Run npm ci after adding the file so the browser is downloaded into that location. Before deployment, inspect the generated files and confirm that your Firebase ignore rules are not excluding the nested cache. The deployed artifact must contain the browser files; a successful local launch cannot establish that on its own.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #4
Write a function that always closes the browser
This HTTPS function uses Puppeteer’s downloaded, matching executable. The finally block closes Chrome even when navigation or page processing fails.
const { onRequest } = require('firebase-functions/v2/https');
const puppeteer = require('puppeteer');
exports.capture = onRequest(async (req, res) => {
let browser;
try {
const target = typeof req.query.url === 'string'
? req.query.url
: 'https://example.com';
browser = await puppeteer.launch({
headless: true,
args: []
});
const page = await browser.newPage();
await page.goto(target, {
waitUntil: 'networkidle2',
timeout: 45_000
});
const png = await page.screenshot({ fullPage: true });
res.set('Content-Type', 'image/png').status(200).send(png);
} catch (error) {
console.error('capture failed', error);
res.status(500).send('Screenshot failed');
} finally {
if (browser) {
await browser.close().catch(error => console.error('browser close failed', error));
}
}
});
Validate and restrict any URL supplied by a caller before using this pattern in a public endpoint. Otherwise, the function can become a server-side request proxy. Add authentication, allowlists, or both for production use.
When you manage Chrome yourself
Supply an explicit executable path (or a supported channel) when the browser is packaged separately:
const browser = await puppeteer.launch({
headless: true,
executablePath: process.env.CHROME_EXECUTABLE_PATH
});
Set CHROME_EXECUTABLE_PATH to a path that exists in the deployed filesystem. Validate the exact Chromium/Chrome build with the Puppeteer version in your lockfile. Do not add --no-sandbox reflexively. Puppeteer describes it as an exceptional option for trusted content when a usable sandbox is unavailable; disabling sandboxing reduces isolation.
Best Value
Test locally, then deploy and inspect logs
- Install dependencies with lifecycle scripts enabled and run the launch check.
- Start the Firebase Local Emulator Suite for Functions. Its default region may differ from your production region, so do not treat a local success as proof that production packaging is correct.
- Invoke the emulated endpoint with a known URL and watch memory, timeout, navigation and browser-close behavior.
- Deploy with the Firebase CLI, for example
firebase deploy --only functions. - Call the deployed function and inspect Firebase logs for the runtime version, browser path, launch errors and navigation timeouts.
Choose memory and timeout settings from measurements of your pages, concurrency and traffic. There is no universal value: large pages, PDFs, many simultaneous launches and JavaScript-heavy sites consume more resources. Reuse a browser only when you have designed isolation and crash recovery; otherwise launch per request and always close it.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting “Could not find Chrome” and related failures
Could not find Chrome or browser executable
- Cause: Puppeteer’s install script was skipped, or the cache was outside the deployed bundle.
- Fix: run
npm ciwith install scripts enabled, use the.puppeteerrc.cjscache path undernode_modules, inspect the deployment artifact, and redeploy.
The function deploys but launch fails immediately
- Cause: an explicit
executablePathpoints to a local or nonexistent path. - Fix: remove the path to use Puppeteer’s managed executable, or package the browser at the exact path and set the environment variable accordingly.
Navigation times out
- Cause: the target site is slow, blocked, waiting indefinitely, or requires interaction.
- Fix: set a workload-appropriate timeout, use a deliberate
waitUntilcondition, log the URL and failure, and handle the error without leaking the browser. Do not simply make the timeout unlimited.
Sandbox or permission error
- Cause: the runtime cannot use Chrome’s sandbox under the chosen deployment setup.
- Fix: first correct the runtime and packaging. Only for trusted content, and only when sandboxing genuinely cannot be used, consider the documented
--no-sandboxexception.
Works in the emulator but not after deployment
- Cause: different region, Node.js runtime, ignored files, cache behavior or environment variables.
- Fix: compare the deployed runtime and artifact with local settings, verify the browser files are present, and inspect production logs.
When Cloud Run is a better fit
Cloud Run is a separate platform choice, not a different Firebase Functions flag. Use it when you need a custom container, reproducible OS-level setup or control over native packages. Puppeteer’s troubleshooting documentation says the default Cloud Run Node.js runtime lacks the system packages needed for Headless Chrome; a Dockerfile must install those dependencies and your browser packaging.
Stay with Firebase Functions when managed function deployment and Firebase integration are the priority and the Puppeteer-managed browser fits. Choose Cloud Run when you are prepared to own the container, operating-system libraries, browser binary and update process. The available guidance establishes this packaging distinction, not a universal performance or cost advantage.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; failed loads, bot checks/CAPTCHAs, blank pages and cache hits are not billed, with the result identified by response headers. AI agents can call its MCP tools, including take_screenshot, get_page_info and capture_pdf.
One GET request returns an image or PDF:
See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The free plan includes 1,000 screenshots a month with no card. Paid plans start at $5 for 3,000 shots, and every feature is included on every plan. Create a free ScreenshotNeo account.
Frequently Asked Questions
Should I use puppeteer or puppeteer-core in Firebase Functions?
Use puppeteer when you want Puppeteer to download its compatible browser. Use puppeteer-core only when you separately package a browser and configure its executable path or channel.
Does a newer Chromium version always work with my installed Puppeteer?
No. Puppeteer guarantees compatibility with the browser it downloads for that release, but an independently updated Chromium build must be validated against your Puppeteer version.
Is Cloud Run required for headless Chrome?
No. Firebase Functions can run Puppeteer when the browser and cache are packaged correctly. Cloud Run is an alternative when you need a custom container and OS-level dependency control.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




