nix-darwin icon indicating copy to clipboard operation
nix-darwin copied to clipboard

`systemsetup` error during 'configuring time' step on macOS 11.6

Open montchr opened this issue 2 years ago • 6 comments

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?

montchr avatar Sep 16 '21 17:09 montchr

FWIW, I see the same on 10.15.7

abathur avatar Nov 20 '21 16:11 abathur

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

montchr avatar Nov 28 '21 20:11 montchr

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

plowry01 avatar Apr 12 '22 16:04 plowry01

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

gbrindisi avatar Aug 03 '22 12:08 gbrindisi

Same issue on Monterey 12.5, with a different error code

I reproduced this on Monterey with the same error message (Error:-99).

weakish avatar Aug 09 '22 14:08 weakish

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

thavamm avatar Aug 10 '22 09:08 thavamm

I see the same error message at macOS Ventura 13.1, but the timezone gets configured anyway.

dhoppe avatar Jan 12 '23 13:01 dhoppe

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

n8henrie avatar Jan 30 '23 16:01 n8henrie

Still seeing this error. Ventura 13.3.1.

zhengpd avatar May 15 '23 01:05 zhengpd

Still seeing this error. Ventura 13.4.1

fishhead108 avatar Jul 23 '23 13:07 fishhead108

Still seeing this error. Ventura 13.5 (22G74)

tunciko avatar Aug 29 '23 10:08 tunciko

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 avatar Sep 03 '23 09:09 fxcl

@fxcl is there something in particular you are hoping to point out in your comment?

montchr avatar Sep 15 '23 19:09 montchr

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

montchr avatar Sep 15 '23 19:09 montchr

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

usersina avatar Sep 28 '23 08:09 usersina

Me too. Sonoma.

AnubisGreat avatar Feb 06 '24 09:02 AnubisGreat

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?

abathur avatar Feb 06 '24 15:02 abathur