diff options
Diffstat (limited to 'src/handlers')
-rw-r--r-- | src/handlers/index.js | 2 | ||||
-rw-r--r-- | src/handlers/launchUserSession.js | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/handlers/index.js b/src/handlers/index.js index e6f84df..18946fc 100644 --- a/src/handlers/index.js +++ b/src/handlers/index.js @@ -8,7 +8,7 @@ const { clickElementBySelector } = require('./utils.js'); const { EDUFPMI_URL, NODE_ENV, HEADLESS } = process.env; // Always run headless in production, but allow configuring for development -const headless = NODE_ENV === 'production' || HEADLESS || false; +const headless = NODE_ENV === 'production' || HEADLESS; const handleJobAsUser = async (job, user) => { diff --git a/src/handlers/launchUserSession.js b/src/handlers/launchUserSession.js index 58dde62..44f2193 100644 --- a/src/handlers/launchUserSession.js +++ b/src/handlers/launchUserSession.js @@ -3,8 +3,10 @@ const { clickElementBySelector } = require('./utils.js'); const { EDUFPMI_URL } = process.env; -const launchUserSession = (user, headless = true) => puppeteer.launch({ headless }) - .then(async browser => { +const launchUserSession = (user, headless = true) => puppeteer.launch({ + headless, + args: ['--no-sandbox'] +}).then(async browser => { const { username, password } = user; const page = await browser.newPage(); |