Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kokoshneta's avatar

Browsershot on Windows: Puppeteer cannot find Chromium

I’m trying to get Spatie’s Browsershot to work on a Windows server, but so far with no luck.

I have Node and NPM installed at the latest versions, and I can install Puppeteer (version 19.2.2) with no issues. Browsershot is required in Composer and is called correctly.

According to the configuration page, the default location of the Chromium browser that is downloaded and installed with Puppeteer since version 19.0.0 is ~/.cache/puppeteer. Indeed, when I look in the current user’s folder on the server, this folder exists and contains a subfolder chrome/win64-1056772/chrome-win, in which there is a chrome.exe executable.

However, when I run Browsershot, I get this error message:

Error: Could not find Chromium (rev. 1056772). This can occur if either

1. you did not perform an installation before running the script (e.g. `npm install`) or
2. your cache path is incorrectly configured (which is: C:\Windows\system32\config\systemprofile\.cache\puppeteer).

For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.

	at ChromeLauncher.resolveExecutablePath (C:\inetpub\vhosts\my_project\app\node_modules\puppeteer-core\lib\cjs\puppeteer\node\ProductLauncher.js:120:27)

	at ChromeLauncher.executablePath (C:\inetpub\vhosts\my_project\app\node_modules\puppeteer-core\lib\cjs\puppeteer\node\ChromeLauncher.js:166:25)

	at ChromeLauncher.launch (C:\inetpub\vhosts\my_project\app\node_modules\puppeteer-core\lib\cjs\puppeteer\node\ChromeLauncher.js:70:37)

	at async callChrome (C:\inetpub\vhosts\my_project\app\vendor\spatie\browsershot\bin\browser.js:84:23)

Note the cache path it gives there: C:\Windows\system32\config\systemprofile\.cache\puppeteer. This folder does not exist, and I’m not even sure if the error message is generating this path dynamically, or if it’s just a static path that hasn’t been updated since the default location was changed in version 19.0.0. I’ve tried copying the entire cache folder into the systemprofile folder, just in case, but this had no effect.

I’ve also tried adding a .puppeteerrc.cjs file in the project root, as well as defining an environmental variable. The config file definitely gets picked up when reinstalling Puppeteer, because I made a typo in it first time around, which caused the installer to fail completely.

I’ve also tried calling Browsershot with a custom Chromium executable path, copy-pasting the absolute path to the executable (or its containing folder).

But nothing works. Puppeteer still cannot find Chromium.

I’m kind of at my wits’ end now. Where can I go from here to figure out where Puppeteer through Browsershot is actually trying to load the executable from – and fix it if it’s trying from the wrong location?

0 likes
5 replies
kokoshneta's avatar
kokoshneta
OP
Best Answer
Level 27

This is apparently a known issue with Browsershot since Puppeteer 19. This earlier Github discussion has more details.

Nobody who’s been troubled by the issue appears to have managed to solve it yet, but since it’s only an issue with Puppeteer 19 onwards, downgrading seems to consistently fix it. I uninstalled Puppeteer 19.2.2 (and removed the installed Chromiums), then installed Puppeteer 17.1.3, which installed Chromium in the node_modules folder. That fixed it.

8 likes
toby's avatar

@kokoshneta Thank you very much; using v17.1.3 did the trick!!

Has anybody made this work with 19.x?

venuscreats's avatar

@kokoshneta Yes. I worked with my project and faced same issue in few weeks ago and no one helped. but this is the answer what I needed. thanks a lot. Puppeteer 17.1.3 worked well.

Please or to participate in this conversation.