puppeteer-lambda-starter-kit
puppeteer-lambda-starter-kit copied to clipboard
Unable to start Chrome on Lambda
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 `
I'm experiencing the same problem.
same problem here
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.
It works fine for me.
I configured 'Timeout' = 30 sec
(default 3 sec, too short) in 'Basic settings' of lambda configuration.
I got the same error with Puppeteer 1.0.0 and HeadlessChrome-65.0.3325.31
Any updates on this one? I am facing the same problem.
@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:
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 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: 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.
I use Puppeteer 0.10 and it works.