Closed pwagener closed 5 years ago
I spent a bit of time poking around at this and found a reasonable way to determine it:
headless_shell
up to the EC2 instanceheadless_shell
with the debugging: ./headless_shell --remote-debugging-port=9222 --no-sandbox --disable-gpu
navigator.appVersion
Pretty round-about way to do it, but it works. In hindsight I could've just evaluated navigator.appVersion
in the Lambda itself and that probably would've been fine. Anywhoo, it reports itself as:
"5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/67.0.3361.0 Safari/537.36"
According to the Puppeteer Releases, Chromium version 67.0.3361.0
would fall somewhere between Puppeter v1.1.0
(released with Chromium 66.0.3348.0
) and v1.2.0
(released with Chromium 67.0.3372.0
).
I'll give my particular project a go with Puppeteer 1.2, but I expect that to be a challenge. Might end up building my own with the current release of Puppeteer. I'll report back to this thread on progress.
if you have the latest headless_shell, share with us. We are getting printing rendering problems with this actual version and chrome 71 it does not happen
I was looking at another serverless puppeteer layers repository: https://github.com/alixaxel/chrome-aws-lambda
That repo seems to have a list of versions compatible with puppeteer.
Here's a set of instructions that alixaxel provided to build your own chrome version using ansible: https://github.com/alixaxel/chrome-aws-lambda/tree/master/_/ansible
I'm struggling to move beyond the basic demo shown here, and I believe it's because I'm unsure what version of Chromium the built
headless_shell
file came from.I have a similar lambda that creates screenshots just fine, but I'm working on a project that uses some more advanced features of Puppeteer. One piece of my code is doing this:
Running the code to interact with locally-installed Chrome works great. When run in the Lambda, that call to
exposeFunction
produces an error:A quick search turns up several issues in the Puppeteer project (sample one, sample two). In all cases the Puppeteer developers point to this FAQ entry ...
Q: Why doesn’t Puppeteer v.XXX work with Chromium v.YYY?
... which suggests ensuring the version of Puppeteer is aligned with the version of Chromium in use.
So, where did this particular
headless_shell
come from, and do you happen to know the exact version of Chromium it came from?