Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last version of google chrome broke puppeteer #6192

Closed
hugodes opened this issue Jul 9, 2020 · 8 comments · Fixed by #6267
Closed

Last version of google chrome broke puppeteer #6192

hugodes opened this issue Jul 9, 2020 · 8 comments · Fixed by #6267

Comments

@hugodes
Copy link

hugodes commented Jul 9, 2020

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 5.0.0
  • Platform / OS version: Docker (node 12)
  • Node.js version: 12

What steps will reproduce the problem?

run with a clean (--no-cache) build.

I followed the steps here https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md for docker
RUN apt-get update \ && apt-get install -y wget gnupg \ && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ && apt-get update \ && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/*

I was able to make it work by changing google-chrome-unstable with google-chrome-stable. Is this okay ? If so do you want a PR to update the documentation ?

What is the expected result?

No errors

What happens instead?

sut_1 | Error: Failed to launch the browser process!
sut_1 | /app/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
sut_1 |
sut_1 |
sut_1 | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
sut_1 |
sut_1 | at onClose (/app/node_modules/puppeteer/lib/cjs/node/BrowserRunner.js:193:20)
sut_1 | at Interface. (/app/node_modules/puppeteer/lib/cjs/node/BrowserRunner.js:183:65)
sut_1 | at Interface.emit (events.js:327:22)
sut_1 | at Interface.EventEmitter.emit (domain.js:482:12)
sut_1 | at Interface.close (readline.js:416:8)
sut_1 | at Socket.onend (readline.js:194:10)
sut_1 | at Socket.emit (events.js:327:22)
sut_1 | at Socket.EventEmitter.emit (domain.js:482:12)
sut_1 | at endReadableNT (_stream_readable.js:1221:12)
sut_1 | at processTicksAndRejections (internal/process/task_queues.js:84:21)

@dougnd
Copy link

dougnd commented Jul 13, 2020

I've had the same issue. I fixed it by adding libxss1 to the list of fetched libraries:

RUN apt-get update \ 
    && apt-get install -y wget gnupg \ 
    && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ 
    && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ 
    && apt-get update \ 
    && apt-get install -y libxss1 google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \ --no-install-recommends \ 
    && rm -rf /var/lib/apt/lists/*

@zhuyuedlut
Copy link

I also have met the same issue~

error Failed to launch the browser process!
/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

@jackfranklin
Copy link
Collaborator

Hi all,

I'm not sure why the docs suggest google-chrome-unstable but if that's causing issues then a PR to update the docs would be welcome. Similarly for any other missing deps or issues people hit with Docker, please feel free to make a PR.

Thanks!

@hugodes
Copy link
Author

hugodes commented Jul 23, 2020

@jackfranklin done ! #6267

@foundryspatial-duncan
Copy link

The docs still mention google-chome-unstable further down in the same code snippet:

CMD ["google-chrome-unstable"]

Should that be updated as well?

@hugodes
Copy link
Author

hugodes commented Aug 27, 2020

@foundryspatial-duncan yes !! Feel free to make a PR 🙂

pmusaraj added a commit to discourse/discourse_docker that referenced this issue Aug 30, 2020
@ygorth
Copy link

ygorth commented Sep 11, 2020

I had the same issue on CentOS 7, I fixed by doing that:

$ repoquery --nvr --whatprovides libXss.so.1
libXScrnSaver-1.2.2-6.1.el7
$ yum install libXScrnSaver

@danielo515
Copy link

So... adding libxss1 is enough? Is the stable chrome version the correct one to use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants