Puppeteer 1.17 not compatible with node alpine anymore
See original GitHub issueSteps to reproduce
Tell us about your environment:
-
Puppeteer version: 1.17.0
-
Platform / OS version: Docker version 18.03.1-ce, build 9ee9f40 with Docker image
node:10.16-alpine
-
Node.js version: 10.16.3
What steps will reproduce the problem?
Our docker image have chrome 73 but apparently Puppeteer 1.17 is not able to dialog with chromium 73 or not completely but i cant found why …
My dockerfile is the following :
FROM node:10.16-alpine
# Environnement de build de l'image
ARG NODE_ENV
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Installs make, g++, python and Chromium (73) packages.
RUN apk update && apk upgrade && \
echo @3.10 http://nl.alpinelinux.org/alpine/v3.10/community >> /etc/apk/repositories && \
echo @3.10 http://nl.alpinelinux.org/alpine/v3.10/main >> /etc/apk/repositories && \
apk add --no-cache \
chromium@3.10=~73.0.3683.103 \
nss@3.10 \
freetype@3.10 \
freetype@3.10 \
harfbuzz@3.10 \
ttf-freefont@3.10
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
COPY package.json ./
RUN npm install
# On installe cross-env seulement en environnement de test
RUN if [ "${NODE_ENV}" = "test" ]; then echo "installing cross-env" && npm install cross-env; fi
COPY . .
EXPOSE 3000
ENTRYPOINT [ "npm" ]
CMD ["run", "prod"]
The part of my which is crashing is the following :
this.logger.info("Puppeter launch")
const browser = await puppeteer.launch(puppeteerParams);
this.logger.info("Puppeter launched successfully")
const page = await browser.newPage();
await page.setContent(html);
const pdf = await page.pdf({ format: 'A4' });
this.logger.info("pdf generated")
My logs are the following :
2019-09-30T14:18:02.985Z [CORE] [/test] info: Puppeter launch
2019-09-30T14:18:03.133Z [CORE] [/test] info: Puppeter launched successfully
2019-09-30T14:18:03.308Z [CORE] [/test] error: 500 - b6a03eaf11bc4c669433d067418b5165 - Protocol error (IO.read): Invalid parameters handle: string value expected - /test - GET- 127.0.0.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Docker Node-Alpine: puppeteer-core@1.20.0 throw error in ...
When checking puppeteer document, it requires to install puppeteer-core since version 1.17.0. However, I would like to install puppeteer ...
Read more >Troubleshooting - Puppeteer
For the former, we do not support deprecated versions of Node.js. ... The newest Chromium package supported on Alpine is 100, which corresponds...
Read more >This version has been deprecated - puppeteer - npm
There are two reasons for this: Puppeteer is bundled with Chromium--not Chrome--and so by default, it inherits all of Chromium's media-related ...
Read more >Running Puppeteer-Sharp on Docker - Hardkoded
I get many questions about running Puppeteer-Sharp on Docker. Let's see if we can get a:
Read more >puppeteer-core: Versions - Openbase
Node 12 is no longer supported. Features. add support for Apple Silicon chromium builds (#7546) (baa017d), closes #6622; chromium: roll to Chromium 102.0....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay i found out what was the problem, in my
package.json
i had the following :"puppeteer": "^1.12.2"
it means that it will be the last 1.x.x version being updated but it will stay"puppeteer": "^1.12.2"
in the json but will currently instal 1.20.0.To not have to update at each update when it breaks we fixed our version by doing so :
npm uninstall puppeteer
npm i puppeteer@1.12.2
And our Dockerfile contain the following : Becareful you’ll have to manually update to the latest stable version, periodically
I encountered the same issue , while using Aliyun Functional Compute Service, which is using nodejs v10.
Higher version of puppeteer is incompatable with that. So I downgrade my puppeteer-core to v1.16.0 . Works like magic ~ 🎉