I write a demo to run puppeteer v21.6.1 in Euler;
const browser = await puppeteer.launch({
headless: true,
args: ['--disable-gpu']
});
await page.goto(url, { waitUntil: 'networkidle2', timeout: 120000 });
const buffer = await page.pdf({
format: 'a4',
printBackground: true,
scale: 0.7,
margin: {left: '0.5cm', top: '1cm', right: '0.5cm', bottom: '1cm' }
});
run Error: Protocol error (Page.navigate): Target closed;
And it is ok in ubantu
expected it works ok
成大人 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
0