As mentioned in https://developer.apple.com/forums//thread/759955 I was having trouble on macOS 15 with a launch agent accessing local network resources, even if the local network permission dialog pops up, and Settings app visually claims the app has permission granted.
The following was logged:
nehelper +[NEProcessInfo copyUUIDsForExecutable:]_block_invoke: failed to get UUIDs for /Users/foo/my-binary
It turned out that the problem was caused by the default golang
toolchain not producing a LC_UUID
load command, which seems to be critical for the network privacy subsystem to determine whether the binary is allowed access or not.
The issue has been reported upstream here: https://github.com/golang/go/issues/68678
To work around this I added -ldflags="-linkmode=external"
when building the go binary, so that the system linker (which does add LC_UUID
) is invoked.