You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing puppeteer with deno on Windows 10, I noticed that the deno.exe stays idle for some seconds.
Code to reproduce:
importpuppeteerfrom"npm:[email protected]";//deno run --allow-read --allow-env --allow-write=./temp,./export --allow-run --allow-net=127.0.0.1 --node-modules-dir=false main.tsconsole.time("pdf");// deno-lint-ignore no-explicit-any(puppeteerasany).configuration={temporaryDirectory: "./temp"};constbrowser=awaitpuppeteer.launch({executablePath: String.raw`C:\Program Files\Google\Chrome\Application\chrome.exe`,handleSIGHUP: false,});constpage=awaitbrowser.newPage();awaitpage.goto("https://news.ycombinator.com",{waitUntil: "networkidle2",});// page.pdf() is currently supported only in headless mode.// @see https://bugs.chromium.org/p/chromium/issues/detail?id=753118constbuffer=awaitpage.pdf({format: "letter",});awaitDeno.writeFile("./export/hn.pdf",buffer);awaitbrowser.close();console.timeEnd("pdf");// Deno.exit(0); //required because deno stays idle for some seconds
Expected behavior: the process should exit immediately after awaiting browser.close();.
A similar node script behaves as expected:
importpuppeteerfrom'puppeteer-core';//node main.mjs(async()=>{console.time("pdf");puppeteer.configuration={temporaryDirectory: "./temp"};constbrowser=awaitpuppeteer.launch({executablePath: String.raw`C:\Program Files\Google\Chrome\Application\chrome.exe`,handleSIGHUP: false,});constpage=awaitbrowser.newPage();awaitpage.goto("https://news.ycombinator.com",{waitUntil: "networkidle2",});// page.pdf() is currently supported only in headless mode.// @see https://bugs.chromium.org/p/chromium/issues/detail?id=753118awaitpage.pdf({path: "./export/hn_node.pdf",format: "letter",});awaitbrowser.close();console.timeEnd("pdf");})();
The text was updated successfully, but these errors were encountered:
When testing puppeteer with deno on Windows 10, I noticed that the deno.exe stays idle for some seconds.
Code to reproduce:
Expected behavior: the process should exit immediately after awaiting
browser.close();
.A similar node script behaves as expected:
The text was updated successfully, but these errors were encountered: