puppeteer: hb_font_set_variations: symbol not found
Steps to reproduce
Tell us about your environment:
- Puppeteer version: 1.4.0
- Platform / OS version: Linux alpine
- Node.js version: node 8.11.3
What steps will reproduce the problem?
Please include code that reproduces the issue.
Dockerfile
FROM node:8.11-alpine
RUN apk update && apk upgrade && \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
apk add --no-cache \
chromium@edge \
nss@edge
WORKDIR /app
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN npm i puppeteer@1.4.0
COPY . .
# RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
# && chown -R pptruser:pptruser /app
# USER pptruser
CMD ["node", "/app/index.js"]
index.js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({executablePath: '/usr/bin/chromium-browser', args: ['--no-sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();
await page.goto('https://google.com');
await browser.close();
})();
docker build -t foo/puppeteer .
docker run -it --rm foo/puppeteer
What is the expected result? Puppeteer should start, no errors.
What happens instead?
(node:1) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
Error relocating /usr/lib/chromium/chrome: hb_font_set_variations: symbol not found
Error relocating /usr/lib/chromium/chrome: hb_face_get_table_tags: symbol not found
Error relocating /usr/lib/chromium/chrome: hb_font_set_ptem: symbol not found
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/app/node_modules/puppeteer/lib/Launcher.js:255:14)
at Interface.helper.addEventListener (/app/node_modules/puppeteer/lib/Launcher.js:244:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
Things I have tried:
node:9-alpine
- latest puppeteer
--cap-add=SYS_ADMIN
Related https://github.com/stereobooster/react-snap/issues/229
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 16
- Comments: 17 (2 by maintainers)
Commits related to this issue
- docs(troubleshooting.md): Add missing depencies https://github.com/GoogleChrome/puppeteer/issues/3019#issuecomment-417227105 — committed to picheli20/puppeteer by picheli20 5 years ago
- docs(troubleshooting.md): Add missing depencies (#4182) https://github.com/GoogleChrome/puppeteer/issues/3019#issuecomment-417227105 — committed to puppeteer/puppeteer by picheli20 5 years ago
- docs(troubleshooting.md): Add missing depencies (#4182) https://github.com/GoogleChrome/puppeteer/issues/3019#issuecomment-417227105 — committed to kiku-jw/puppeteer by picheli20 5 years ago
Sorry to add yet another solution without much of an explanation, but here’s my configuration that I got to work: (You could probably use
@edge
instead of@3.8
, but I wanted to stick to more stable versions after getting burned by this today)I’m assuming the rest of your configuration will work for you if it had been working already. The main idea behind this solution is adding the
freetype
andharfbuzz
packages. Reaching this conclusion took two main steps:hb_font_set_variations
symbol, andharfbuzz
came up among the results. Installingharfbuzz@3.8
cleared the previous errors about thehb_
-prefixed symbols, and a new error came up referring to aFT_Done_MM_Var
symbol.freetype
came up. I installedfreetype@3.8
, and things finally ran smoothly.Why? I don’t know.
I’ve been struggling with the same issue.
chromium@v3.8 (64.0.3282.168-r0)
works for me 🔥Starting puppeteer with the following flags:
Thank you @fritz-c 👏 . The following Dockerfile works:
Just run in the same problem this worked for me:
Dockerfile
@mfix22 i’ve fixed this by specifying some more dependencies:
Seems to work for me on puppeteer 1.1.0
https://bugs.alpinelinux.org/issues/9161 : Related?