moonD4rk/HackBrowserData · error
get collections: %w
Error message
get collections: %w
What it means
Enumerating the Secret Service collections (e.g. the 'login' collection) failed after a session was opened. GetAllCollections performs D-Bus calls against org.freedesktop.Secret.Collection objects; failures here mean the keyring's collection tree could not be read.
Source
Thrown at masterkey/retriever_linux.go:44
conn, err := dbus.SessionBus()
if err != nil {
return nil, fmt.Errorf("dbus session: %w", err)
}
svc, err := keyring.GetSecretService(conn)
if err != nil {
return nil, fmt.Errorf("secret service: %w", err)
}
session, err := svc.OpenSession()
if err != nil {
return nil, fmt.Errorf("open session: %w", err)
}
defer session.Close()
collections, err := svc.GetAllCollections()
if err != nil {
return nil, fmt.Errorf("get collections: %w", err)
}
for _, col := range collections {
items, err := col.GetAllItems()
if err != nil {
continue
}
for _, item := range items {
label, err := item.GetLabel()
if err != nil {
continue
}
if label == storage {
secret, err := item.GetSecret(session.Path())
if err != nil {
return nil, fmt.Errorf("get secret for %s: %w", storage, err)
}
if len(secret.Value) > 0 {View on GitHub (pinned to 0503d04d7a)
Solutions
- Unlock the login collection: secret-tool search --unlock ... or via seahorse ('Unlock' on the keyring)
- Restart gnome-keyring-daemon and retry, since stale collection objects cause transient D-Bus errors
- Inspect the underlying error (%w) — D-Bus error names like org.freedesktop.DBus.Error.AccessDenied point to permission vs corruption
- Fall back to the v10 path: PosixRetriever's PBKDF2("peanuts") key often suffices for older profiles
Defensive patterns
Strategy: fallback
Validate before calling
null
Try / catch
key, err := dbusRetriever.RetrieveKey(hints)
if err != nil && strings.HasPrefix(err.Error(), "get collections:") {
key, err = posixRetriever.RetrieveKey(hints) // v10 fallback
} Prevention
- Unlock keyring collections (secret-tool unlock or Seahorse) before extraction
- Restart the keyring daemon if collection enumeration is persistently failing
- Read the wrapped cause to distinguish D-Bus AccessDenied from corruption
- Keep PosixRetriever in the chain for profiles that work without the keyring
When it happens
Trigger: svc.GetAllCollections() errors: the default collection is locked in a way that blocks listing, the daemon returns an internal D-Bus error, or collection objects vanished mid-enumeration.
Common situations: Keyring collection corrupt after an unclean shutdown; daemon upgraded/restarted between the OpenSession and GetAllCollections calls; restricted environments where the service refuses collection enumeration.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
AI-assisted analysis of moonD4rk/HackBrowserData@0503d04d7a (2026-09-06).
Data as JSON: /api/errors/fb52ff8eab2a2899.
Report an issue: GitHub.