From f97866fe82463a92cb7c6dca0e843db04e60a6a0 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 3 Jun 2019 13:45:57 +0200 Subject: [PATCH] fix(core): update --- ts/smartpdf.classes.smartpdf.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ts/smartpdf.classes.smartpdf.ts b/ts/smartpdf.classes.smartpdf.ts index 1310979..8e8b9ab 100644 --- a/ts/smartpdf.classes.smartpdf.ts +++ b/ts/smartpdf.classes.smartpdf.ts @@ -23,7 +23,13 @@ export class SmartPdf { async start() { // setup puppeteer if (!this.headlessBrowser) { - this.headlessBrowser = await plugins.puppeteer.launch(); + let chromeArgs: string[] = []; + if(process.env.CI) { + chromeArgs = chromeArgs.concat(['--no-sandbox', '--disable-setuid-sandbox']) + } + this.headlessBrowser = await plugins.puppeteer.launch({ + args: chromeArgs + }); } else { this.externalBrowser = true; }