Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem running dusk on Homestead #50
So I just installed a new Laravel 5.4 project and thought I'd give Dusk a try..
Followed the installation steps in the documentation:
But when I run
It seems to be outputting the script instead of executing it.
I'm running latest Homestead on Windows 10 with
PS. PHPUnit works as expected.
Finally got it working in Vagrant on Ubuntu 14.04 (not a Homestead image though). My host OS is Windows 10.
First of all,
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - $ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' $ sudo apt-get update && sudo apt-get install -y google-chrome-stable
Next thing is
$ sudo apt-get install -y xvfb
Try to start
$ sudo apt-get install -y libnss3-dev libxi6 libgconf-2-4
When you see
this means ChromeDriver can be started (so
$ Xvfb :0 -screen 0 1280x960x24 &
in a separate terminal window.
Also you may want to add your dev domain in guest's
And finally run
$ php artisan dusk
I didn't try more complex tests for now, but assume they should work. The only thing I've noticed not working is a screenshot feature. I have blank white screen instead of actual browser window.
Edit: screenshots feature is working, just don't load Google Fonts.
I'm having issues running on Homestead as well, but I'm running my Vagrant box on Linux Mint. I have updated Homestead to latest, and tried using a new test site. Also, tried the various methods listed above which didn't work.
If I follow the Dusk setup exactly, I get the following:
I have gotten a little farther by marking the /vendor/laravel/dusk/bin/chromedriver-linux executable:
After making this edit, I now get a timeout error:
Unfortunately, this solution seems to be buggy since the tests are sometimes very slow to run.
The following, (taken from here) worked for me:
No, I get a timeout:
I get the same issue, ubuntu 16.04, laravel v5.4.15, dusk v1.0.10. Making excecutable the file, or more extreme giving chmod 777 on entire folder
Again, dowloading the crhomedriver latest version and replacing, don't work!
But mi error is
But running $ vendor/laravel/dusk/bin/crhomedriver-linux on another terminal i get this work fin, but that isn't the idea.
Lots of solutions floating around but this here is the official solution that will be included in the next vagrant homestead box. I've tried it and it works good
and then update your aliases with the latest ones which includes this new function
You can also alternatively use this release candidate homestead box which has the fix in it
just to clarify I had the same problem - I did:
sudo apt-get update
chmod a+x ./vendor/laravel/dusk/bin/chromedriver-linux
and it seemed to have solved the problem
i'm not sure how you're setup, but Homestead really only exists in the terminal, so it doesn't have a GUI to popup a Chrome window.
Run the command in your host OS if you want to popup the browser and see what's going on. If you want to go faster, just run it in Homestead with headless turned on. (you still get screenshots on errors I believe)
I only live in Linux world, though, so maybe Windows is different.
OK! My answer here : https://developers.google.com/web/updates/2017/04/headless-chrome :
@webcrazy same issue here (Laravel 5.5, Win10, Homestead).