Bug
I'm trying to run testcafe inside of a docker container based on openshift/jenkins-slave-base-centos7. using chrome headless.
The command I run is:
node_modules/testcafe/bin/testcafe.js chrome:headless integration_tests
The tests fail to run and after a while i get the following exception
Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.
After some digging I've found that the problem is that chrome headless needs a couple of additional flags to run correctly. This command opens the browser successfully and runs the tests
node node_modules/testcafe/bin/testcafe.js 'chrome:headless --no-sandbox --disable-gpu' integration_tests
Could these arguments be passed in by default?
As an aside i found it a little tricky working the syntax for passing in the additional flags, could this be added to the readme?
Hello @KaneMorgan!
We already have a note about --no-sandbox flag in our docs:
Add the --no-sandbox flag to Chromium if the container is run in the unprivileged mode.
So if you run the image with docker run --privileged, you won't need this flag.
Also, official TestCafe image based on Alpine + Chromium works fine without --disable-gpu flag on Docker Toolbox for Windows and Mac. Could you please try to run your image without it, only with --no-sandbox flag?
Thanks for the speedy response.
yes it seems to work with just the no-sandbox flag,
I'll close this issue
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.
Most helpful comment
Thanks for the speedy response.
yes it seems to work with just the no-sandbox flag,
I'll close this issue