Skip to content

Hub Configuration causes issues when the system's keyring can't be accessed #1249

@abrugaro

Description

@abrugaro

When running kai without a properly configured keyring, calling context.secrets.store() produces
the following issues:

  1. When running on a system without a keyring, the call hangs indefinitely. This has been
    addressed here
  2. When running in a system with a keyring installed but disabled, the configuration is not persisted

Reproduction

First issue:

  1. Run VSCode extension tests in a Linux CI environment without gnome-keyring running
  2. Attempt to save configuration using context.secrets.store(key, value)

The call hangs indefinitely

Second issue:

  1. Disable your system's keyring if you're in linux (gnome-keyring / kde kwallet)
  2. Configure the hub connection & restart vscode

Kai is able to reach the hub when configured but the configuration is not persisted

Expected Behavior

Kai should:

  1. Fail quickly with a clear error when keyring services are unavailable
  2. Respect JavaScript-level timeouts and allow Promise cancellation
  3. Provide a configuration option to disable secret storage for testing scenarios
  4. Add a native-level timeout for keyring operations

Environment

  • Latest dev build
  • Platform: Linux (Ubuntu 24.04 - GitHub Actions runner) & Fedora 41
  • VSCode: 1.109.0

Claude says:

VSCode uses libsecret on Linux to communicate with the system keyring via D-Bus. When the
org.freedesktop.secrets D-Bus service is not available:

  • Local environments (keyring installed but stopped): D-Bus responds with an error → libsecret fails
    quickly → VSCode shows error gracefully
  • CI environments (no keyring installed): libsecret waits indefinitely for service activation that
    never happens → native blocking call cannot be interrupted by JavaScript timeouts

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions