Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

webcityro's avatar

Laravel dusk can't disable headless mode on laravel sail with wsl2

i have a existing up to date laravel 11 project that's running under laravel sail with docker in windows 11 with wsl2 (ubuntu). i've installed and configured laravel dusk according to the official laravel docs the dusk test are running fine but i cant disable headless mode to open a browser window no matter what i try

The first think i tried was to add DUSK_HEADLESS_DISABLED=true in my .env.dusk.local did not work.

Next i commented out '--headless=new' in the driver method in DuskTestCase.php and did nothing

The same with '--disable-gpu'

Tried adding '--no-sandbox' suggested by chat GPT and guess what? it did nothing

Next i fended a discussion on laracasts where someone suggested to change my selenium image in my docker-compose.yml to: image: 'selenium/standalone-chrome:4.1.2-20220217' that did not work either.

tried sail down sail up --build -d.

I'm stuck and any help with be greatly appreciated.

0 likes
0 replies

Please or to participate in this conversation.