chromium: [BUG] The input directory "/var/bin" does not exist
Environment
chromiumVersion: 109.0.1puppeteer/puppeteer-coreVersion: 19.4.0- Node.js Version: v18.12.0
- Lambda / GCF Runtime: nodejs18.x
Expected Behavior
https://github.com/Sparticuz/chromium/issues/24#issuecomment-1366863330
Current Behavior
The input directory \"/var/bin\" does not exist.
Steps to Reproduce
const browser = await puppeteer.launch({
args: chromium.args,
defaultViewport: chromium.defaultViewport,
executablePath: await chromium.executablePath("/var/bin"),
headless: chromium.headless,
ignoreHTTPSErrors: true,
});
Possible Solution
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (5 by maintainers)
Not sure if this is a hack or what but here’s how I made it work with AWS SAM:
AWS Lambda Layerfrom here."puppeteer-core": "^19.6.0"and"@sparticuz/chromium": "^110.0.0"as dev dependenciesexecutablePath: await chromium.executablePath('/opt/nodejs/node_modules/@sparticuz/chromium/bin')Hope this helps the next noob like myself trying to make this work.
I encountered a similar issue, and the solution was to exclude ‘@sparticuz/chromium’ from the bundled lambda. Here’s a code snippet using CDK:
I think you need to reopen this issue, because this bug is permanently happening with all the possible hacks applied. @Sparticuz
Can confirm that #41 (comment) did the trick for me as well.
Randomly starting getting this error after a deploy, but specifying the chromium path fixed it