Closed jmandawg closed 7 months ago
chromium
puppeteer
puppeteer-core
nodejs18.x
Example code below should run.
Hangs on browser.newPage
const chromium = require('chromium'); exports.handler = async (event, context, callback) => { let result = null; let browser = null; try { browser = await puppeteer.launch({ args: chromium.args, defaultViewport: chromium.defaultViewport, executablePath: await chromium.executablePath(), headless: chromium.headless, ignoreHTTPSErrors: true, }); let page = await browser.newPage(); await page.goto(event.url || 'https://example.com'); result = await page.title(); } catch (error) { return callback(error); } finally { if (browser !== null) { await browser.close(); } } return callback(null, result); };
sorry need to do more research, something is causing it to hang when running in AWS.
Environment
chromium
Version: 123.0.1puppeteer
/puppeteer-core
22.6.4nodejs18.x
Expected Behavior
Example code below should run.
Current Behavior
Hangs on browser.newPage
Steps to Reproduce