nix-darwin
nix-darwin copied to clipboard
`systemsetup` error during 'configuring time' step on macOS 11.6
Since updating to macOS Big Sur 11.6 (which provides an important security update, as I understand it), I've been receiving the following non-blocking error during rebuilds:
configuring time...
2021-09-16 13:08:57.284 systemsetup[46864:2995101] ### Error:2 File:/System/Volumes/Data/SWE/macOS/BuildRoots/38cf1d983f/Library/Caches/com.apple.xbs/Sources/Admin/Admin-876.1/InternetServices.m Line:379
I haven't seen any notable side effects from this, and the rebuild completes successfully.
Considering that Caches
is in the path, maybe it's some leftover state from the previous macOS version?
FWIW, I see the same on 10.15.7
FWIW, I ran the equivalent of this command in my shell:
https://github.com/LnL7/nix-darwin/blob/a7492a8c76dcc702d0a65cd820a5f9baa8702684/modules/time/default.nix#L14
And got the same error:
❯ sudo systemsetup -settimezone 'America/New_York'
2021-11-28 15:24:49.739 systemsetup[16228:4483112] ### Error:2 File:/System/Volumes/Data/SWE/macOS/BuildRoots/38cf1d983f/Library/Caches/com.apple.xbs/Sources/Admin/Admin-876.1/InternetServices.m Line:379
Set TimeZone: America/New_York
I had the same error too, but setting up time with server:
systemsetup -setnetworktimeserver domain.here.edu... Result of command: 2022-04-12 11:43:56.668 systemsetup[520:3998] ### Error:2 File:/System/Volumes/Data/SWE/macOS/BuildRoots/9dc5c14c79/Library/Caches/com.apple.xbs/Sources/Admin/Admin-876.2/InternetServices.m Line:379 setNetworkTimeServer: domian.here.edu
Same issue on Monterey 12.5, with a different error code:
> sudo systemsetup -settimezone 'Europe/Rome'
2022-08-03 14:00:01.963 systemsetup[22313:2122531] ### Error:-99 File:/AppleInternal/Library/BuildRoots/20d6c351-ee94-11ec-bcaf-7247572f23b4/Library/Caches/com.apple.xbs/Sources/Admin/InternetServices.m Line:379
Set TimeZone: Europe/Rome
Same issue on Monterey 12.5, with a different error code
I reproduced this on Monterey with the same error message (Error:-99).
I too having same issue.
macOS Monterey - version 12.5
sudo systemsetup -settimezone America/Los_Angeles
Error:-99 File:/AppleInternal/Library/BuildRoots/10d6c999-ee77-99ec-bcaf-123456b4/Library/Caches/com.apple.xbs/Sources/Admin/InternetServices.m Line:379 Set TimeZone: America/Los_Angele
I see the same error message at macOS Ventura 13.1, but the timezone gets configured anyway.
I thought this might be because I have the "set timezone automatically" option checked, but it is not.
It seems to work (successfully changes my system time) in spite of the error message, so perhaps it should be ignored so as to not confuse others?
Looks like others are just ignoring the error:
- https://www.reddit.com/r/macsysadmin/comments/vy1ecd/systemsetup_throws_error99_with_timezones/
- https://discussions.apple.com/thread/254546193
Still seeing this error. Ventura 13.3.1.
Still seeing this error. Ventura 13.4.1
Still seeing this error. Ventura 13.5 (22G74)
2023-09-03 09:12:16.957 systemsetup[37567:1016572] ### Error:-99 File:/AppleInternal/Library/BuildRoots/d9889869-120b-11ee-b796-7a03568b17ac/Library/Caches/com.apple.xbs/Sources/Admin/InternetServices.m Line:379
@fxcl is there something in particular you are hoping to point out in your comment?
I've noticed that the identifier directory under BuildRoots
appears to have changed sometime after https://github.com/LnL7/nix-darwin/issues/359#issuecomment-981146427 (2021-11-28) and before https://github.com/LnL7/nix-darwin/issues/359#issuecomment-1096923986 (2022-04-12). It looks like a UUIDv4, but changes based on some unknown influence (system version? user?).
Considering that this is clearly a "feature not a bug" of macOS, I don't think it's possible or helpful to consider a real "fix". But, to avoid confusion or scaring people, we should (as @n8henrie suggested) hide the output of this command entirely, as it is not helpful and unlikely to go away.
Edit: I think a pull request changing the line in question to the following would work:
systemsetup -settimezone "${cfg.timeZone}" 2>/dev/null 1>&2
Same issue with Sonoma 14.0 (23A344)
2023-09-28 09:27:47.821 systemsetup[23606:256075] ### Error:-99 File:/AppleInternal/Library/BuildRoots/98ed8ad3-3356-11ee-9b53-aead88ae2785/Library/Caches/com.apple.xbs/Sources/Admin/InternetServices.m Line:379
Me too. Sonoma.
Have you either freshly installed or updated nix-darwin since mid September?
The workaround to discard all output from the -settimezone command is still in place:
https://github.com/LnL7/nix-darwin/blob/bdbae6ecff8fcc322bf6b9053c0b984912378af7/modules/time/default.nix#L14
I don't imagine it's emitting anything unless you aren't on a version new enough to have the mitigation. Unless maybe sudo systemsetup -listtimezones
has started emitting this error as well--can you confirm that it doesn't?