puppeteer-lambda-starter-kit icon indicating copy to clipboard operation
puppeteer-lambda-starter-kit copied to clipboard

Unable to start Chrome on Lambda

Open an-adamchuk opened this issue 7 years ago • 11 comments

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 `

an-adamchuk avatar Dec 05 '17 09:12 an-adamchuk

I'm experiencing the same problem.

berdyshev avatar Dec 07 '17 13:12 berdyshev

same problem here

MaksJS avatar Dec 25 '17 13:12 MaksJS

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.

rossfishkind avatar Jan 10 '18 18:01 rossfishkind

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

roundrop avatar Feb 01 '18 03:02 roundrop

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

danielsantiago avatar Feb 05 '18 17:02 danielsantiago

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

hkhan-lumatax avatar Mar 07 '18 17:03 hkhan-lumatax

@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".

danielsantiago avatar Mar 07 '18 17:03 danielsantiago

@danielsantiago:

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

  • HeadlessChrome-63.0.3213.0.tar.gz
  • headless_shell.tar.gz

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?

hkhan-lumatax avatar Mar 07 '18 18:03 hkhan-lumatax

@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.

danielsantiago avatar Mar 07 '18 18:03 danielsantiago

@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.

hkhan-lumatax avatar Mar 07 '18 18:03 hkhan-lumatax

I use Puppeteer 0.10 and it works.

gregorym avatar Mar 14 '18 16:03 gregorym