From 9b84f1e1bd38eec6e2a57687570c287524e4bd40 Mon Sep 17 00:00:00 2001 From: mytlogos Date: Fri, 26 Aug 2022 17:02:52 +0200 Subject: [PATCH] fix(scraper): disable gpu for headless chrome --- packages/scraper/src/externals/request/request.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/scraper/src/externals/request/request.ts b/packages/scraper/src/externals/request/request.ts index 97654b01..745e204c 100644 --- a/packages/scraper/src/externals/request/request.ts +++ b/packages/scraper/src/externals/request/request.ts @@ -122,8 +122,9 @@ export class Requestor { config: R, ): Promise> { // using puppeteer in chromium requires disabling the sandbox + // disable-gpu for headless environments, e.g. docker puppeteerBrowser ??= puppeteer.launch({ - args: ["--no-sandbox", "--disable-setuid-sandbox"], + args: ["--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu"], }); const browser = await puppeteerBrowser;