-
Notifications
You must be signed in to change notification settings - Fork 1
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
Apply Google Chrome --no-sandbox flag to fix Travis CI and enable headless Firefox #169
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull requests started failing Travis CI builds with the following message: 05 02 2018 20:50:18.131:ERROR [launcher]: Cannot start ChromeHeadless [0205/205017.988204:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /opt/google/chrome/chrome-sandbox is owned by root and has mode 4755. From: https://travis-ci.org/mbland/custom-links/jobs/337734109 As it turns out, Chrome is now directly supported as an addon (rather than requiring it be installed via `addons: apt: packages: -google-chrome-stable`), and the source of the error is well-documented in the Travis docs: https://docs.travis-ci.com/user/chrome#Sandboxing This change applies the `--no-sandbox` flag for headless Google Chrome via the `./go test browser --single-run` command and via Karma. Updated the `mocha-chrome` package and moved it from `dependencies:` to `devDependencies:` in the process.
The previous commit caused the build to continue to fail in part because the removal of `xvfb` caused the Firefox Karma run to fail. This commit should fix that aspect of the breakage by enabling a headless Firefox run: https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-the-Firefox-addon-in-headless-mode
This should've been included in the commit before last to fix the Travis CI build failure due to sandboxing being eventually disabled: https://docs.travis-ci.com/user/chrome#Sandboxing
akashvbabu
approved these changes
Feb 5, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Coveralls is dragging in pushing its report to GitHub...will merge now, but keep the branch around until the Coveralls run has reported back. |
1 similar comment
akashvbabu
added a commit
that referenced
this pull request
Apr 6, 2018
Chromium started failing with the same issue as in #169, so we had to Chromium to the list of filters to work around karma-detect-browsers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull requests started failing Travis CI builds with the following message:
From: https://travis-ci.org/mbland/custom-links/jobs/337734109
As it turns out, Chrome is now directly supported as an addon (rather than requiring it be installed via
addons: apt: packages: -google-chrome-stable
), and the source of the error is well-documented in the Travis docs:https://docs.travis-ci.com/user/chrome#Sandboxing
This change applies the
--no-sandbox
flag for headless Google Chrome via the./go test browser --single-run
command, via Karma, and via./go test end-to-end
. Updated themocha-chrome
package and moved it fromdependencies:
todevDependencies:
in the process.Since this change removes
xvfb
, I also took the opportunity to switch to headless Firefox in the process via:https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-the-Firefox-addon-in-headless-mode