Skip to content

Commit

Permalink
fix(scraper): disable gpu for headless chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
mytlogos committed Aug 26, 2022
1 parent 405d76a commit 9b84f1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/scraper/src/externals/request/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ export class Requestor {
config: R,
): Promise<Response<P, T>> {
// 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;
Expand Down

0 comments on commit 9b84f1e

Please sign in to comment.