sambaiz / puppeteer-lambda-starter-kit

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

Updating puppeteer will stop this to work #10

Closed Praveena0989 closed 6 years ago

Praveena0989 commented 6 years ago

I tried updating puppeteer but without success

Kikobeats commented 6 years ago

I'm having the same issue, any idea? no error trace 🤔

Kikobeats commented 6 years ago

Maybe because puppeteer 0.13 needs Chromium 64.0.3264.0 (r515411)

Kikobeats commented 6 years ago

In addition, the chrome version to use with puppeteer is declared on package.json: https://github.com/GoogleChrome/puppeteer/blob/master/package.json#L39

The script of this project is taking the last version available at chromium browsers, it could be different.

I proposed add a tiny CLI around installing process of puppeter: https://github.com/GoogleChrome/puppeteer/pull/1652

doing

node install.js --platform linux

but not sure if the bundle generated can be aws lambda compatible; The script of this projects is doing additional things, not sure why:

https://github.com/sambaiz/puppeteer-lambda-starter-kit/blob/master/chrome/buildChrome.sh#L23

@sambaiz can you clarify? 😄

Kikobeats commented 6 years ago

I found this script, it's very similar but version is customizable: https://github.com/adieuadieu/serverless-chrome/blob/master/packages/lambda/builds/chromium/build/build.sh#L19

We can update our script for supporting specify the version, and then generate the version compatible with puppeteer 0.13.

shadowfool commented 6 years ago

You may also want to consider the api changes from .10.2 to .13, I've found that several configuration options are drastically different in .13. Changing versions might break the boilerplate code in src.

Praveena0989 commented 6 years ago

Puppeteer/Chromium guys are working on /dev/shm issue(This is the issue which makes us to use all tricks to compile chromium manually and executing it) here

Kikobeats commented 6 years ago

actually it was removed: https://github.com/adieuadieu/serverless-chrome/issues/87

I think if we use the latest chrome version available + puppeteer 0.13 it should be works

Praveena0989 commented 6 years ago

I downloaded latest prebuilt binary from here and renamed and rezipped files to match previous file names and it is working perfectly with puppeteer 13

Kikobeats commented 6 years ago

@Praveena0989 what build, beta? thanks!

edit: ok dev, sounds a little creepy but 👍

Praveena0989 commented 6 years ago

@Kikobeats I used beta beta-headless-chromium-64.0.3282.71-amazonlinux-2017-03.zip