Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Fresh install of Herd on macOS not finding [project].test sites #795

Closed
nalenb opened this issue Jun 12, 2024 · 19 comments
Closed

[Bug]: Fresh install of Herd on macOS not finding [project].test sites #795

nalenb opened this issue Jun 12, 2024 · 19 comments
Labels

Comments

@nalenb
Copy link

nalenb commented Jun 12, 2024

Platform

macOS

Operating system version

macOS Sonoma 14.5 (23F79)

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.7.0 (build 27)

PHP Version

PHP 8.3.7 (cli) (built: May 10 2024 12:47:16) (NTS)

Bug description

Seems similar to #650

I installed macOS, then Xcode, then Herd. I have not installed brew. The machine is my own and not managed by anyone.

I created a site via terminal and via Herd's add site button, both give me a 404 error when I visit the [project].test site.

I'm not running Herd pro and I see nothing in the logs. I also tried rebooting several times.

Screenshot 2024-06-12 at 5 09 13 PM

Steps to reproduce

I wiped my Mac today.
Downloaded Herd from https://herd.laravel.com today 6/12/2024
Copied Herd to my Applications folder
Ran Herd and had no issues in the install
Via Herd settings I installed Node 20 (20.14.0)
I created a new app in ~/Herd via Laravel new chirper from the terminal
I tried to open http://chirper.test in my browser and receive 404

Navigating to http://localhost gives me a nice Laravel Herd 404 error, so I think nginx is running.

Herd shows everything is running.

Screenshot 2024-06-12 at 5 10 57 PM

Running ps aux shows me that nginx, php-fpm, and dnsmasq are running, but dnsmasq is running under user "nobody"
nobody 1518 0.0 0.0 410751264 2240 ?? S 4:51PM 0:00.01 /Applications/Herd.app/Contents/Resources/dnsmasq-arm64 --keep-in-foreground --conf-file=/Users/nalenb/Library/Application Support/Herd/config/dnsmasq/dnsmasq.conf

Not sure what else I can provide

Relevant log output

I see nothing in the logs.
@issuelabeler issuelabeler bot added the macOS label Jun 12, 2024
@nalenb
Copy link
Author

nalenb commented Jun 13, 2024

Can't ping the site either

ping chirper.test
ping: cannot resolve chirper.test: Unknown host

I did install Herd a few days ago and it was working fine. It's only after I reinstalled macOS that I'm having the issue.

@mpociot
Copy link
Member

mpociot commented Jun 13, 2024

What happens when you run

ping foo.test

?

@nalenb
Copy link
Author

nalenb commented Jun 13, 2024

I assume you mean to replace foo with one of my sites?

ping chirper.test
ping: cannot resolve chirper.test: Unknown host

Also, clarification above, I'm not getting the nice Herd 404 page, I get the Safari server not found page.

Screenshot 2024-06-12 at 11 27 48 PM

@mpociot
Copy link
Member

mpociot commented Jun 13, 2024

As dnsmasq resolves any *.test domain to localhost, it actually doesn't matter.

You should have this file: /etc/resolver/test

With this content: nameserver 127.0.0.1

Can you confirm this?

@nalenb
Copy link
Author

nalenb commented Jun 13, 2024

I do not have a /etc/resolver folder at all.

@mpociot
Copy link
Member

mpociot commented Jun 13, 2024

That's weird. Could you run this in your terminal:

sudo mkdir -p /etc/resolver
echo "nameserver 127.0.0.1" | sudo tee -a /etc/resolver/test

This should fix it 👍

@nalenb
Copy link
Author

nalenb commented Jun 13, 2024

That fixed it. I wonder why I don't have that folder by default. Does the Herd install create it or should it already exist on a fresh macOS install? I might try wiping again tomorrow and reinstalling Herd again.

@mpociot
Copy link
Member

mpociot commented Jun 13, 2024

That's a regression bug in Herd 1.7.0 as we changed the way we run sudo code. I'm publishing a 1.7.1 version right now, so thanks for reporting this :)

@nalenb
Copy link
Author

nalenb commented Jun 13, 2024

Ah, okay. I'll look for 1.7.1 and wipe and verify it :-)

@datune
Copy link

datune commented Jun 13, 2024

I can confirm this behaviour, I just went through the same ordeal before finding this bug report, running the suggestion by mpociot fixed it.

@sschlein
Copy link
Member

We've just released Herd 1.7.1 which should fix that 🙂 Please let me know if it didn't.

This update follows a phased rollout, so you might not get it automatically today but be on a group that gets it next week. You can bypass this by manually trigger the update check and get the update directly.

@nalenb
Copy link
Author

nalenb commented Jun 13, 2024

I just reinstalled macOS and then ran the installer for Herd 1.7.1. Everything works as expected. Thanks for fixing this so quickly.

@andersonbsp
Copy link

I'm having the same problem above even with version 1.7.1, it was working perfectly but I went to update it and now it doesn't recognize the host and I can't add any other one, where can I download the previous versions?

@mpociot
Copy link
Member

mpociot commented Jun 14, 2024

I'm having the same problem above even with version 1.7.1, it was working perfectly but I went to update it and now it doesn't recognize the host and I can't add any other one, where can I download the previous versions?

What exactly do you mean? Is dnsmasq running for you?

@andersonbsp
Copy link

Yes, everything works, but with this problem after I did the update, I even did a new installation and the problem continues.

@andersonbsp
Copy link

Is there somewhere I can find previous versions of herd for mac?

@GaniyuWi
Copy link

I'm having this same problem but on windows.

@fschroiff
Copy link

I had a DNS configuration profile installed, once I removed it Herd worked fine.

@idsosd
Copy link

idsosd commented Jan 29, 2025

I'm having the same problem as described by nalenb.

I use Herd 1.14.1 but I can see my sites at http://127.0.0.1/site.test (instead of http://site.test). So in a way, it works, but the database connections fail and I don't know how to workaround that problem. All things seem to be up and running, including the line in '/etc/resolver/test'.

http://127.0.0.1/ gives the 'Laravel - Herd 404 page not found site' with:
'The site "127.0.0.1" could not be found in your parked or linked sites.
Please ensure that the folder is within your parked paths.'

In the DNSMasq-logfile there's one line saying 'dnsmasq: failed to create listening socket for 127.0.0.1: Address already in use'.

% brew services list --->php (Name) none (Status) - (User) - (File)

What am I missing? Any suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants