examples icon indicating copy to clipboard operation
examples copied to clipboard

aws-node-puppeteer - {"message": "Internal server error"}

Open unickq opened this issue 5 years ago • 17 comments

Cloned aws-node-puppeteer repo.

npm i serverless offline - works as expected serverless deploy - {"message": "Internal server error"}

what's wrong? any additional config required?

Thanks

unickq avatar Mar 23 '20 19:03 unickq

I have the same problem...

michaldolnik avatar Mar 30 '20 10:03 michaldolnik

Same here!

Here is the Cloud watch error I get

Error occured in serverless-plugin-chrome wrapper when trying to ensure Chrome for hello() handler. { flags: [] } Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the log

Here is the full gist https://gist.github.com/mvaneijgen/c4356a8e7dab84ed8abf80d33604f7d1

mvaneijgen avatar Apr 21 '20 14:04 mvaneijgen

Same here!

I tried adding a --headless flag in "/node-modules/@serverless-chrome/lamba/dis/bundle.es.js/" around lines 338 / 349 after seeing that referenced in an older issue thread, but still no dice.

All I've done is clone / setup / deploy, so no other custom configs could be messing with the mojo....

JaredReando avatar Jun 23 '20 18:06 JaredReando

Same here. Here is my log

ERROR   Uncaught Exception      {"errorType":"Error","errorMessage":"spawn /var/task/node_modules/@serverless-chrome/lambda/dist/headless-chromium EACCES","code":"EACCES","errno":"EACCES","syscall":"spawn /var/task/node_modules/@serverless-chrome/lambda/dist/headless-chromium","path":"/var/task/node_modules/@serverless-chrome/lambda/dist/headless-chromium","spawnargs":["--disable-dev-shm-usage","--disable-gpu","--single-process","--no-zygote","--no-sandbox","--remote-debugging-port=9222","--user-data-dir=/tmp/chrome.AUlavv8","--disable-setuid-sandbox","--disable-dev-shm-usage","--disable-gpu","--single-process","--no-zygote","--no-sandbox","about:blank"],"stack":["Error: spawn /var/task/node_modules/@serverless-chrome/lambda/dist/headless-chromium EACCES","    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)","    at onErrorNT (internal/child_process.js:469:16)","    at processTicksAndRejections (internal/process/task_queues.js:84:21)"]}
END RequestId: 99eb7477-0fa6-4919-a881-70715199a495
REPORT RequestId: 99eb7477-0fa6-4919-a881-70715199a495  Duration: 94.39 ms      Billed Duration: 100 ms Memory Size: 1024 MB                 Max Memory Used: 26 MB

Unknown application error occurred

demilp avatar Jul 06 '20 21:07 demilp

mee too... 🥺

YuK1Game avatar Jul 20 '20 03:07 YuK1Game

I'm experiencing the same issues. Has anyone managed to find a fix?

tiboprea avatar Aug 03 '20 18:08 tiboprea

I believe this is linked to this issue (https://github.com/adieuadieu/serverless-chrome/issues/240)

Azsael avatar Aug 14 '20 01:08 Azsael

Also getting the same thing :-/

botoxparty avatar Sep 09 '20 18:09 botoxparty

I've got the same issue

hndr91 avatar Sep 26 '20 16:09 hndr91

same issue

Liu-huaicheng avatar Nov 29 '20 05:11 Liu-huaicheng

Actually I have ended up with using AWS Fargate for my use case. As long as AWS lamba has 15 mins runtime, it's not useful for my use case anymore...

michaldolnik avatar Nov 29 '20 07:11 michaldolnik

const puppeteer = require('puppeteer');

(async () => { //const browser = await puppeteer.launch({headless: false, defaultViewport: null}); const browser = await puppeteer.launch({defaultViewport: null}); const page = await browser.newPage(); await page.setViewport({ width: 1920, height: 1080});

await page.goto('https://www.rezultati.com/', {waitUntil: 'networkidle2'});

const firstTeamName = await page.evaluate(() => { let a = document.querySelector("#g_1_KAjFXPMu > div.event__participant.event__participant--home"); return a.innerText; })

console.log(firstTeamName)

await browser.close(); })();

hir09 avatar Jan 29 '21 11:01 hir09

above is my script and blow is my error....please help , any hero expert here :

i followed this

https://www.serverless.com/examples/aws-node-puppeteer

2021-01-29T06:21:00.312Z 0333c6a5-06af-4a23-a37f-0f0ef8a675b4 ERROR Invoke Error { "errorType": "Error", "errorMessage": "Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.", "stack": [ "Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.", " at /var/task/node_modules/@serverless-chrome/lambda/dist/bundle.cjs.js:376:13", " at Generator.throw ()", " at step (/var/task/node_modules/@serverless-chrome/lambda/dist/bundle.cjs.js:311:193)", " at /var/task/node_modules/@serverless-chrome/lambda/dist/bundle.cjs.js:311:404", " at processTicksAndRejections (internal/process/task_queues.js:97:5)" ] }

and this is the error

hir09 avatar Jan 29 '21 11:01 hir09

Same here. Also, putting DEBUD: "*" seems to break the logs page by causing infinite loading. I have tried disabling --v=99 flag on node_modules/@serverless-chrome/lambda/dist/bundle.es.js as it was suggested on multiple issues.

yanekyuk avatar Mar 07 '21 15:03 yanekyuk

It's still happening :(

chicomcastro avatar Dec 22 '21 17:12 chicomcastro

+1

sbbeez avatar Aug 29 '23 17:08 sbbeez