I've enjoyed Laravel, Homestead, and Dusk for years. Everything was working fine, but I recently needed to upgrade to PHP 7.4 for a new package I wanted to install, so I went ahead and upgraded VirtualBox, Vagrant, etc to:
vboxmanage --version
=6.1.2r135662
- Vagrant 2.2.7
- laravel/homestead (virtualbox, 9.2.0)
- Homestead v10.2.0
- Laravel 6.13.1
- Dusk v5.9.0
- Ubuntu 18.04.3 LTS
- PHP 7.4.1
- Windows 10 is the host
Now, when I run my Dusk browser tests, they produce screenshots with this error in Chrome: "This site can't be reached" ERR_CONNECTION_REFUSED
But in Windows Chrome, I can browse to my local site fine, as usual (Windows is the host of my Homestead box).
My APP_URL
in .env
is (and has always been) APP_URL=https://abc.192.168.1.105.xip.io:44300
, and it's the same in my .env.dusk.local
file, which I've always had.
In Vagrant, when I run wget https://abc.192.168.1.105.xip.io:44300
, the result says failed: Connection refused
. But if I run wget 127.0.0.1
, it downloads the correct page.
So then I figured I could change my APP_URL to 127.0.0.1 (although I wouldn't know why my upgrades would lead me to be required to make that change).
However, then the error in the Dusk Chrome screenshot becomes "Your connection is not private" NET::ERR_CERT_AUTHORITY_INVALID
.
I have not found the docs at https://laravel.com/docs/6.x/dusk#installation to help with these problems. Ideas?
P.S. If I change to APP_URL=https://google.com
, the screenshot successfully shows Google. So at least Chrome is installed properly in Homestead.