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

Fix headless chrome in CircleCI #1636

Merged
merged 13 commits into from
Dec 25, 2017

Conversation

fearphage
Copy link
Member

@fearphage fearphage commented Dec 19, 2017

This re-enables headless chrome testing in CircleCI. It has one huge hack in it right now (manually editing a dependency). I think perhaps we should wait on merging this for a cleaner solution. I filed an issue with mochify (mantoni/mochify.js#162) (cc @mantoni).

This reverts small amounts of #1629.

# HACK: modify mochify to pass args to chrome to allow it to run as root
# --no-sandbox --disable-setuid-sandbox
# See https://github.com/mantoni/mochify.js/issues/162
sed -i "s#'--allow-insecure-localhost'#'--allow-insecure-localhost', '--no-sandbox', '--disable-setuid-sandbox'#" node_modules/mochify/lib/chromium.js && echo "modified mochify/lib/chromium.js";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is gross but a necessary evil for now. This is the result without the hack.

Copy link
Member

@mantoni mantoni Dec 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll get this fixed in Mochify.

@fearphage
Copy link
Member Author

@mantoni merged the fix to mochify (mantoni/mochify.js#163) and I tested it and everything is working. Just need an npm version of mochify to point to wrap this puppy up. (Thanks for the quick merge.)

@mantoni
Copy link
Member

mantoni commented Dec 19, 2017

@fearphage Already there. Just published v5.1.0.

@fearphage
Copy link
Member Author

You're quick!

@mantoni
Copy link
Member

mantoni commented Dec 19, 2017

Out of curiosity, why did you go with a separate download of chromium instead of relying on the puppeteer install script?

@fearphage
Copy link
Member Author

why did you go with a separate download of chromium instead of relying on the puppeteer install script?

I read it was necessary (when researching #1629). I didn't even try the default installed version.

@fearphage fearphage force-pushed the fix-headless-chrome-in-circle branch from 1e93b17 to d078af9 Compare December 19, 2017 17:26
@mantoni
Copy link
Member

mantoni commented Dec 19, 2017

Hm, I think it now used the cache instead of doing a new npm install and therefore doesn't find Chrome.

switched v4 and v8 to using alpine images
@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.5% when pulling 39186f4 on fearphage:fix-headless-chrome-in-circle into 78a8986 on sinonjs:master.

@fearphage
Copy link
Member Author

I'm done fiddling with this one. Review/merge away.

I think it now used the cache instead of doing a new npm install and therefore doesn't find Chrome.

Did a fresh npm install and that build failed.

@sinonjs sinonjs deleted a comment from coveralls Dec 19, 2017
@sinonjs sinonjs deleted a comment from coveralls Dec 19, 2017
@sinonjs sinonjs deleted a comment from coveralls Dec 19, 2017
@sinonjs sinonjs deleted a comment from coveralls Dec 19, 2017
@sinonjs sinonjs deleted a comment from coveralls Dec 19, 2017
@sinonjs sinonjs deleted a comment from coveralls Dec 19, 2017
@mantoni
Copy link
Member

mantoni commented Dec 19, 2017

@fearphage Thank for trying. Hopefully this gets resolved with a future release of puppeteer.

Copy link
Member

@mantoni mantoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to merge.

@fatso83 fatso83 merged commit ca9e2fa into sinonjs:master Dec 25, 2017
@fearphage fearphage deleted the fix-headless-chrome-in-circle branch May 22, 2018 13:56
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 this pull request may close these issues.

4 participants