Repository navigation
fix(secrets): detect headless Linux and avoid D-Bus hangs - #51
Closed
salmonumbrella wants to merge 0 commit into
Closed
salmonumbrella wants to merge 0 commit into
salmonumbrella wants to merge 0 commit into
Conversation
Collaborator
|
Thanks!! |
steipete
added a commit
that referenced
this pull request
Jan 9, 2026
steipete
force-pushed
the
fix/keyring-timeout-headless
branch
from
January 9, 2026 01:00
e47060d to
088bb6c
Compare
Collaborator
|
Landed on main as 088bb6c.
Tests: pnpm lint && pnpm build && pnpm test (from internal/tracking/worker) Thanks @salmonumbrella! |
manascb1344
pushed a commit
to manascb1344/gogcli
that referenced
this pull request
Jan 15, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DBUS_SESSION_BUS_ADDRESSon Linux and automatically use file backend (avoids hang entirely)GOG_KEYRING_BACKEND=fileBackground
Issue #45 reported that
gog auth tokens importhangs indefinitely on headless Raspberry Pi. The root cause is the keyring library trying to connect to D-Bus SecretService when gnome-keyring is installed but not running.Approach
Two-layer protection:
DBUS_SESSION_BUS_ADDRESSis not set on Linux with "auto" backend, force file backend. This handles the common headless case cleanly with no goroutine leaks.Test plan
TestOpenKeyring_NoDBus_ForcesFileBackend- verifies D-Bus detectionTestOpenKeyring_ExplicitBackend_IgnoresDBusDetection- explicit backend bypasses detectionTestOpenKeyringWithTimeout_Success- timeout wrapper worksTestOpenKeyringWithTimeout_Timeout- timeout error message is correctFixes #45
🤖 Generated with Claude Code