Never worked with Sail, but it looks like the error is related to Dusk, because Dusk uses Selenium under the hood. Have you also removed --disable-gpu (as well as --headless)? Because you need to have the GPU enabled for it to work.
Possible to show browser window for Dusk tests via Sail?
I'm running Laravel 8 with the Docker/Sail-based setup from the docs (on a Linux Mint [Ubuntu-ish] host system). It mostly all works, including Dusk tests, which I run with "sail dusk".
However, the Dusk tests are all headless. But I want to see the browser window. (I can see the screenshots that are saved on failures, which helps a little.)
I've tried editing DuskTestCase.php and removing the --headless line.
I've added DUSK_HEADLESS_DISABLED=true to my .env.dusk.local file.
No dice. And no errors that I can see, with one exception. I don't know if this is related, but I get this in my "sail up" terminal output:
selenium_1 | [1645499305.708][SEVERE]: bind() failed: Cannot assign requested address (99)
That sounds bad... but, the tests do work, and I can't tell if that's related to trying to launch the browser window? Nothing in docker-compose.yml nor DuskTestCase.php nor my .env* refers to port 99.
I've done a ton of searching on this, and can find almost nobody talking about the same issue. So I wonder if maybe "headful" mode is not even possible when running tests in a Laravel Docker/Sail container?
Thanks for any suggestions.
Try this image tag:
image: 'selenium/standalone-chrome:4.1.2-20220217'
This is currently working on one of my projects.
Please or to participate in this conversation.