Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Running in Travis #60

Open
dariosky opened this issue Apr 7, 2018 · 5 comments
Open

Running in Travis #60

dariosky opened this issue Apr 7, 2018 · 5 comments

Comments

@dariosky
Copy link

dariosky commented Apr 7, 2018

Good day, thanks for the awesome project!
I'm having some problem running it in Travis, and it seems that you succeeded, could you help documenting how to do it?

I've tried several options both from the travis doc and checking other puppeteer configurations but after
[W:pyppeteer.chromium_downloader] chromium extracted to: /home/travis/.pyppeteer/local-chromium/543305
I get a pyppeteer.errors.BrowserError: Failed to connect to browser port: http://127.0.0.1:39289/json/version and I'm not sure how to debug it.
Do you have any suggestion?

@miyakogi
Copy link
Owner

miyakogi commented Apr 7, 2018

Maybe chromium is hanged.
Try --no-sandbox option and don't add ----remote-debugging-port=9222 on launch.

Example: browser = await launch(args=['--no-sandbox'])

Details please see Puppeteer's troubleshooting.

I will update readme document later and try to show better error message.

@dariosky
Copy link
Author

dariosky commented Apr 8, 2018

Thank you, that made the trick:

So to summarize:

No need for the Travis chrome addon, for xvfb or the libnss3 package.

It may be useful to passenv the TRAVIS os environment variable in tox so to change the launch parameters only when testing in Travis.

@miyakogi
Copy link
Owner

miyakogi commented Apr 9, 2018

Thank you for information.
I will try some settings on travis.

@neekey
Copy link

neekey commented May 2, 2018

I have the same error running it in docker, browser = await launch(args=['--no-sandbox']) does not solve the problem

@neekey
Copy link

neekey commented May 2, 2018

seems like the issue with the chrome binary, adding extra libs in the container seems fix this issue.

Add this in the dockerfile:

# install lib deps for chrome
# see https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
RUN apt-get update && apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

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

No branches or pull requests

3 participants