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

Devcontainer: fix "Cannot start ChromeHeadless" error when running tests #10137

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

laurb9
Copy link
Contributor

@laurb9 laurb9 commented Jun 23, 2023

Type of change

  • Other (devcontainer fix)

Description of change

Hacky fix to allow running the test suite in devcontainer.

karma.conf.maker.js uses is-docker npm plugin to add the --no-sandbox chrome flag when in docker, but the plugin does not work in devcontainers.

The proposed simple fix is to create /.dockerenv for now, one of the things is-docker looks for.

Adding "securityOpt": ["seccomp=unconfined"] to devcontainer would also work by raising its privileges so the flag isn't needed, but is less secure.

Eventually the test in karma.conf.maker.js should be updated to use something else, requires further discussion to cover all the previous use cases.

Other information

Resolves #10066

@patmmccann patmmccann self-requested a review June 23, 2023 10:46
@patmmccann patmmccann self-assigned this Jun 23, 2023
@patmmccann patmmccann merged commit 7cf3088 into prebid:master Jun 23, 2023
2 checks passed
@laurb9 laurb9 deleted the devcontainer branch June 23, 2023 16:20
github-ishara-chan-tung pushed a commit to ebuzzing/Prebid.js that referenced this pull request Jul 12, 2023
musikele pushed a commit to rubicon-project/Prebid.js that referenced this pull request Aug 28, 2023
santii7395 pushed a commit to themaven-net/Prebid.js that referenced this pull request Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DevContainer only] "Cannot start ChromeHeadless" when running tests
2 participants