checked failed crashForExceptionInNonABIComplianceCodeRange the code below its functon is to create PDF file
(async function() { try { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.setContent(pdfOutput); await page.emulateMedia("screen"); await page.pdf({ path: "routes/planiton/pdf/mypdf.pdf", format: "A4", printBackground: true }); console.log('done'); await browser.close(); //process.exit(); } catch (e) { console.log("Our Error", e) } })();
To use Puppeteer with a different version of Chrome or Chromium, pass in the executable's path when creating a Browser instance: const browser = await puppeteer.
Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome or Chromium. An explanation of what Puppeteer is and the things it can do.
If you have Microsoft Edge installed, you can use puppeteer-core. puppeteer-core is a lightweight version of Puppeteer that launches an existing browser installation, like Microsoft Edge. To download Microsoft Edge, go to Download Microsoft Edge Insider Channels. Puppeteer is a Node library.
Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.
I had the same issue, I tried everything which is listed from the Puppeteer guide, none of them worked for me.
What works for me was to download chromium manually sudo apt-get install chromium-browser
.
And then, tell Puppeteer where chromium is located :
const browser = await puppeteer.launch({ executablePath: '/usr/bin/chromium-browser' })
Hope this will help someone :)
const browser = await puppeteer.launch({ headless:false, args: ["--no-sandbox"] });
install puppeteer and puppeteer-core.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With