Closed lukasbestle closed 7 months ago
When you isolate a site, the Herd CLI communicates with the Herd macOS application via an Apple Script.
It seems like this does not work for you and I assume the 55
, 54
, etc. is the time that minute of the hour this command failed.
What do you get when you run this from your terminal:
osascript -e 'tell application "Herd"
get valet path
end tell'
Just copy and paste it like this, including the newlines.
Thank you very much for your super quick and helpful reply. It was spot-on.
The output I got was:
2024-02-07 20:34:56.689 osascript[2618:48473] ApplePersistence=NO
path:/Applications/Herd.app/Contents/Resources/valet/server.php
The reason for the first line was that I had manually disabled macOS auto-save globally via the defaults
command. I now set this specifically for the apps where I need it, so the line is no longer printed by osascript
. This immediately solved the issue for all sites after triggering a config rewrite in Herd (by switching the PHP version and then back again).
Posting this mainly to document the issue should it occur to anyone else in the future. But maybe you could still improve the robustness of the Herd setup by making the Herd CLI parse the osascript
output in a way that ignores any additional output.
Ohh interesting - I didn't know that here could be additional output! I'm glad that you got it working, and I'll try to improve the osascript output parsing!
Operating system version
macOS Ventura 13.6.3
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.4.0 (Build 20)
PHP Version
No response
Bug description
A few weeks ago (still on 1.3.2), one of my sites using the built-in HTTPS stopped working. I got infinite redirects to an integer path like
https://my-site.test/32
. I didn't have the time to investigate, so I disabled HTTPS for now and the site started to work again.Now (seemingly after the 1.4.0 update), all of my sites show this behavior and even if I disable HTTPS. As a first step I have uninstalled Herd according to the steps described in the docs. Afterwards I reinstalled Herd. The same thing happens, but the integer keeps counting up each time Herd/Valet adds a new site to its management (it is now at 55 for all sites).
I noticed that the
55
is in the nginx config files at~/Library/Application Support/Herd/config/valet/Nginx/*
, therewrite
rule likely being the source for the infinite redirect behavior. Here's an example:I don't have any idea where to continue debugging this. Please help 🙏
Steps to reproduce
No response
Relevant log output