sambaiz / puppeteer-lambda-starter-kit

Starter Kit for running Headless-Chrome by Puppeteer on AWS Lambda.
MIT License
580 stars 82 forks source link

Unable to start Chrome on Lambda #9

Open an-adamchuk opened 6 years ago

an-adamchuk commented 6 years ago

I uploaded headless_shell.tar.gz to S3. Lambda returns error:

`START RequestId: 4279d41e-d99e-11e7-8d7c-754f3d6a60fb Version: $LATEST 2017-12-05T09:25:40.241Z 4279d41e-d99e-11e7-8d7c-754f3d6a60fb /tmp/headless_shell 2017-12-05T09:25:40.241Z 4279d41e-d99e-11e7-8d7c-754f3d6a60fb [ '--no-sandbox', '--disable-gpu', '--single-process' ] 2017-12-05T09:25:40.246Z 4279d41e-d99e-11e7-8d7c-754f3d6a60fb (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Failed to launch chrome! spawn /tmp/headless_shell ENOENT

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

END RequestId: 4279d41e-d99e-11e7-8d7c-754f3d6a60fb REPORT RequestId: 4279d41e-d99e-11e7-8d7c-754f3d6a60fb Duration: 91.17 ms Billed Duration: 100 ms Memory Size: 512 MB Max Memory Used: 40 MB `

berdyshev commented 6 years ago

I'm experiencing the same problem.

MaksJS commented 6 years ago

same problem here

rossfishkind commented 6 years ago

What version of Puppeteer is everyone using? Currently, if you are running the starter kit as is, you want to make sure you are using version 10.2 of Puppeteer.

roundrop commented 6 years ago

It works fine for me. I configured 'Timeout' = 30 sec (default 3 sec, too short) in 'Basic settings' of lambda configuration.

danielsantiago commented 6 years ago

I got the same error with Puppeteer 1.0.0 and HeadlessChrome-65.0.3325.31

hkhan-lumatax commented 6 years ago

Any updates on this one? I am facing the same problem.

danielsantiago commented 6 years ago

@hkhan-lumatax If I remember correctly I was having whis problem because I was using the compressed files from serverless-chrome, and that file has a file named "headless-chromium", and puppeteer-lambda-starter-kit expect it to be "headless_shell".

hkhan-lumatax commented 6 years ago

@danielsantiago:

What exactly are you referring to? I have the following in my S3:

I have set the ENV variable CHROME_BUCKET too. Thats a public bucket and I believe the Lambda code can pick it up automatically.

Also, which version are you running in your lambda? Is it the latest one?

danielsantiago commented 6 years ago

@hkhan-lumatax my problem was that I used the chromium build files from: https://github.com/adieuadieu/serverless-chrome/releases.

If your files are from "puppeteer-lambda-starter-kit" them is not the same problem that I had.

hkhan-lumatax commented 6 years ago

@danielsantiago: Can you please share some steps as how you did that? Did you uploaded a release from serverless-chrome to S3 and then used its key in environment variable or did something else?

If you can provide some insight on the process, that would be helpful.

gregorym commented 6 years ago

I use Puppeteer 0.10 and it works.