Muhammad Asad
Muhammad Asad

Reputation: 3793

Valet Stopped Working after macOS High Sierra Upgrade from macOS Sierra

Upgrading the macOS from Sierra to High Sierra breaks working Valet installation. Ping works just fine, it is just *.dev on browser gives error that unable to connect, site cannot be connected.

I have tried usual troubleshooting steps like Uninstalling Valet and installing again but same issue.

I read somewhere it was related DNSMasq so i have unlinked and uninstalled it many times via brew with no success.

Anyone has faced this issue and any suggested fixes?

Upvotes: 3

Views: 2864

Answers (4)

James Marx
James Marx

Reputation: 1

I run into this almost every time after MacOS updates.

Running valet install normally does the trick for me.

To avoid other common issues:

  1. Accept the new TOC
  2. Update Xcode

Upvotes: 0

Tahniat Ashraf
Tahniat Ashraf

Reputation: 1050

I did, valet domain localhost and could open http://mysite.localhost in browser without any further problems

Upvotes: 0

DavidT
DavidT

Reputation: 2481

I came across this answer having experienced the same problem, however DNSmasq was not the problem for my Valet. I fixed the same symptoms by following the below steps.

Step 1
Uninstalled and reinstalled valet to v2

  1. valet stop
  2. valet uninstall
  3. composer global require laravel/valet - assuming this is how you installed it.
  4. valet install
  5. valet restart

This did not entirely fix the problem. But the browser then gives

secure connection could not be made

Which leads on to step 2.

Step 2
Having read this GitHub discussion on Google enforcing HTTPS on the .dev domain name it turned out that simply running valet secure [name of app] allowed it work again.

Alternatively, if you don't want to do this for lots of apps, or specifically want to run as HTTP, then running valet domain localhost will update your Valet sites to use .localhost instead. Localhost is a reserved word and therefore should not be subject to the same problem later on.

Upvotes: 3

Muhammad Asad
Muhammad Asad

Reputation: 3793

Update: I got it fixed finally. It was related to DNSmasq as originally suspected, however it did not matter how many times I removed and re installed dnsmasq via Brew.

So here is what worked for me:

  1. Removed dnsmasq brew uninstall dnsmasq had it done many times but this time, did next step which helped.

  2. Remove dnsmasq's config files and any dnsmasq directory in /usr/local/etc (this step is what fixed my issue)

  3. Now reinstall Valet, valet install it will install missing dnsmasq itself and new config of dnsmasq will work just fine as it worked in my case.

Hope it works for you also.

PS. Also I removed whole Valet and reinstalled Valet after removing old valet directory settings in home directory i.e. removed ~/.valet and then installed Valet again.

Upvotes: 6

Related Questions