Laravel Dusk able to open browser but not control it

467 Views Asked by At

I am using Laravel 7 on Ubuntu 20.04 and attempting to use Dusk.

I have followed the documentation for Dusk https://laravel.com/docs/7.x/dusk, however when I attempt to run the provided example test (or any test that I make), it does not work as expected.

I have edited DuskTestCase.php so the browser is not headless, commenting out '--disable-gpu' and '--headless'.

Whenever I run the test, the chrome browser opens, however it seems like the test is unable to control it. $browser->visit does nothing, and the url of the chrome browser just stays on data:,.

Any ideas? I've had trouble researching this problem and I can't find anyone encountering a similar issue, and I am getting no errors that I can find.

1

There are 1 best solutions below

0
On

I had the same exact issue on my ubuntu 21.04 as you described. The only solution that worked for me and solved the issue was uninstalling chromium browser that I installed via snap

sudo snap remove chromium-browser

And then installing the google version of chrome.

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

I did not have to change any config that I had already. Swapping chrome version was all I have done.