Skip to content

TimeSync 0.1.3 — actually fix chronyc error message

Choose a tag to compare

@vu2cpl vu2cpl released this 09 May 09:27
· 15 commits to main since this release

Bug fix. v0.1.2 was supposed to translate chronyc exit 1: 506 Cannot talk to daemon into a helpful message — but the fix was checking the wrong stream. chronyc emits its protocol responses (506, 501, etc.) on stdout, and my code only looked at stderr. So the friendly-error path never fired and a fresh user saw the same cryptic error v0.1.2 was supposed to remove.

Reproduced locally:

$ launchctl bootout system/com.vu2cpl.chrony
$ chronyc makestep > /tmp/c.out 2> /tmp/c.err
  exit code: 1
  stdout:    "506 Cannot talk to daemon"
  stderr:    ""

v0.1.3 combines stdout+stderr before pattern-matching. The Step Clock button on a Mac with chrony installed but chronyd not running now correctly shows:

chronyd is not running. Run server/install.sh from the timesync-mac repo to install and start it.

Also added handling for 501 Not authorised (shouldn't happen in normal operation but worth surfacing if it does).

Verifying

shasum -a 256 TimeSync-0.1.3.zip
# expect: f566b7615bc5908fd906ddc110ba7ce2f597fc75d37646a158553f4f5060b1e8

unzip TimeSync-0.1.3.zip
spctl -a -vvv TimeSync.app
# expect: source=Notarized Developer ID, accepted

Upgrading

Quit TimeSync, drop new TimeSync.app over old in /Applications/, launch. Then force-reload the helper so the corrected error path takes effect:

sudo launchctl kickstart -k system/com.vu2cpl.TimeSync.Helper

(Or Settings → Helper → Uninstall, then Install Helper… again.)

73 de Manoj VU2CPL