-
-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Description
Environment
chromium
Version: 108puppeteer-core
Version: 19.3.0- Node.js Version: 14.x and 16.x
- Lambda
nodejs14.x
andnodejs16.x
-->
Expected Behavior
adding the layer and launching the browser works
Current Behavior
2022-12-01T20:25:16.992Z 83285b39-c65f-4d14-99ab-cbecd1546d68 ERROR [Error: ENOENT: no such file or directory, open '/var/bin/chromium.br'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/var/bin/chromium.br'
}
Steps to Reproduce
- build the zip file lie described here: https://github.com/Sparticuz/chromium#aws-lambda-layer
- double-checked the ZIP is good (it is, contains "nodejs/node_modules"
- project has
puppeteer-core
as prod dep - project has
@sparticuz/chromium
as dev dep - deployment with CDK
- lambda code:
exports.handler = async (event: any) => {
console.log(event);
try {
const browser = await puppeteer.launch({
args: chromium.args,
defaultViewport: chromium.defaultViewport,
executablePath: await chromium.executablePath,
headless: chromium.headless,
ignoreHTTPSErrors: true,
});
return browser;
} catch (err) {
console.error(err);
}
return ''
}
-->
Possible Solution
nguyentoanit, MLaidlawScott, avegao and MisterJimson
Metadata
Metadata
Assignees
Labels
No labels