diff --git a/epic-games.js b/epic-games.js index 7d359fa..a664c1b 100644 --- a/epic-games.js +++ b/epic-games.js @@ -30,6 +30,7 @@ const context = await chromium.launchPersistentContext(cfg.dir.browser, { // https://peter.sh/experiments/chromium-command-line-switches/ args: [ '--hide-crash-restore-bubble', + '--ignore-gpu-blocklist', ], // The following makes the browser crash in docker with 'Chromium sandboxing failed!': // chromiumSandbox: true, // https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues/52 @@ -43,7 +44,7 @@ handleSIGINT(context); if (!cfg.debug) context.setDefaultTimeout(cfg.timeout); const page = context.pages().length ? context.pages()[0] : await context.newPage(); // should always exist -await page.setViewportSize({ width: cfg.width, height: cfg.height }); // TODO workaround for https://github.com/vogler/free-games-claimer/issues/277 until Playwright fixes it +// await page.setViewportSize({ width: cfg.width, height: cfg.height }); // TODO workaround for https://github.com/vogler/free-games-claimer/issues/277 until Playwright fixes it // some debug info about the page (screen dimensions, user agent, platform) if (cfg.debug) console.debug(await page.evaluate(() => [(({ width, height, availWidth, availHeight }) => ({ width, height, availWidth, availHeight }))(window.screen), navigator.userAgent, navigator.platform, navigator.vendor])); // deconstruct screen needed since `window.screen` prints {}, `window.screen.toString()` '[object Screen]', and can't use some pick function without defining it on `page`