[Bug]: executablePath fails in puppeteer 19+ on windows
See original GitHub issueBug description
Steps to reproduce the problem:
- Use puppeteer 19+ on windows
- Try to call
puppeteer.executablePath()
Expected result: path to puppeteer executable
Actual result:
TypeError: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:372:5)
at validateString (node:internal/validators:120:11)
at join (node:path:429:7)
at PuppeteerNode.get defaultDownloadPath [as defaultDownloadPath] (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\PuppeteerNode.ts:232:11)
at ChromeLauncher.resolveExecutablePath (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\ProductLauncher.ts:105:28)
at ChromeLauncher.executablePath (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\ChromeLauncher.ts:227:19)
at PuppeteerNode.executablePath (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\PuppeteerNode.ts:213:27)
Puppeteer version v18 and below are unaffected
Puppeteer version
19.2.0
Node.js version
16.16.0
npm version
8.11.0
What operating system are you seeing the problem on?
Windows
Configuration file
No response
Relevant log output
TypeError: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:372:5)
at validateString (node:internal/validators:120:11)
at join (node:path:429:7)
at PuppeteerNode.get defaultDownloadPath [as defaultDownloadPath] (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\PuppeteerNode.ts:232:11)
at ChromeLauncher.resolveExecutablePath (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\ProductLauncher.ts:105:28)
at ChromeLauncher.executablePath (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\ChromeLauncher.ts:227:19)
at PuppeteerNode.executablePath (C:\SrcRep\asy-browser-service\node_modules\puppeteer-core\src\node\PuppeteerNode.ts:213:27)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Puppeteer error: An `executablePath` or `channel` must be ...
It seems like puppeteer-core now requires executablePath as mandatory. Try this: import bypass from './captcha/captchaBypasser.js'; import ...
Read more >Troubleshooting - Puppeteer
The most common cause is a bug in Node.js v14.0.0 which broke extract-zip , the module Puppeteer uses to extract browser downloads into...
Read more >Browsershot on Windows: Puppeteer cannot find Chromium
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...
Read more >Error while launching headless browser using puppeteer.
Why I am getting error :failed to launch browser ? ... await puppeteer.launch({ executablePath:'/usr/bin/chromium-browser'}); const page = await browser.
Read more >How to use Puppeteer inside a Docker container
launch({ args: args, executablePath: '/usr/bin/google-chrome', });. and i get this error "Protocol error (Target.setAutoAttach): ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem was in puppeteer-extra.
results in error with puppeteer v19+, puppeteer-extra v3.3.4
Please open a bug with
puppeteer-extra
. In general, we recommend posting this on stack overflow and discussing it there until the scope of the issue can be found.