v0.13.0: keyring backend hangs indefinitely on macOS — all auth-requiring commands SIGKILL'd (rollback to v0.12.0 restores)
Bug: v0.13.0 keyring backend hangs indefinitely on macOS (commands SIGKILL'd)
After upgrading from v0.12.0 → v0.13.0 via brew upgrade steipete/tap/gogcli, every command that touches the keyring hangs indefinitely and is eventually killed with SIGKILL. This includes gog auth list, gog gmail search, gog gmail autoreply, etc. — any command that needs to read stored OAuth tokens.
Rolling back to v0.12.0 (same OAuth tokens in the macOS Keychain) restores full functionality instantly.
Reproduction
- Upgrade:
brew upgrade steipete/tap/gogcli(from v0.12.0 → v0.13.0) - Run any auth-requiring command:
gog auth list gog gmail search -a [email protected] "newer_than:1h" --max 5 - Command hangs. After 10–60s, exits with SIGKILL (no output, no prompt, no error message). No macOS Keychain prompt appears.
gog --versionworks fine (no keyring access needed).- Also tested
--no-inputflag — same hang.
What I tried
gog auth list --no-input→ hangs, SIGKILLGOG_KEYRING_BACKEND=file gog auth list→ returns instantly with "No tokens stored" (file backend works, but the tokens are in macOS Keychain, so this isn't a fix)- Flag
--keyring-namespacerejected with "unknown flag" (release notes mention keyring namespace overrides landed in v0.13.0 — the flag name may have changed?) - Checked release notes for breaking changes around keyring/auth — didn't find anything explicit for macOS
Rollback
Installing v0.12.0 from tap git history restored full functionality:
cd $(brew --repository)/Library/Taps/steipete/homebrew-tap
git show 7a44daf:Formula/gogcli.rb > /tmp/gogcli-0.12.rb
brew uninstall gogcli
cp /tmp/gogcli-0.12.rb Formula/gogcli.rb # temporarily pin
brew install steipete/tap/gogcli
Exact same OAuth tokens in Keychain, exact same accounts ([email protected], [email protected]) — gog auth list on v0.12.0 returns in < 1 second. Upgrade to v0.13.0 → hang. Revert to v0.12.0 → works again.
Environment
- macOS: 15.3.1 (build 24D70) — Apple Silicon (arm64)
- gogcli: v0.13.0 (5cd913e 2026-04-20T22:14:47Z) — installed via
brew install steipete/tap/gogcli - Shell: zsh
- Keyring backend setting:
auto(default, pergog --helpoutput)
Hypothesis
The "keyring namespace overrides" refactor in v0.13.0 (#463) may have changed how the auto keyring backend probes macOS Keychain, possibly waiting on a prompt that never surfaces in non-TTY contexts (or maybe always, given this fails in interactive shell too).
What would help
- A
--keyring-backend fileflag orGOG_KEYRING_BACKEND=filesupport that gracefully migrates existing tokens from macOS Keychain → file on first use - Or a debug/verbose flag that surfaces the keyring operation being attempted (so we can see where the hang is)
- Or fix the
autobackend to not hang on macOS when Keychain interaction is needed non-interactively
Happy to provide additional logs/traces if useful — just let me know what would help.
Fixed on main in 6430dd1, with cleanup in c2ea4f5.
macOS Keychain operations now run behind a timeout and return a recovery hint when a permission prompt cannot surface, instead of hanging indefinitely. I used operation-level coverage (Keys / Get / Set / Remove) because the macOS keyring backend does not do the blocking Security query during Open(). Local make ci passed before push.