Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Linux CLI auth status panics when accessing Secret Service inside Tokio runtime

Open
#2,329 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Trace cap::credentials::resolve_agent and cap::run from the reported stack trace, then inspect how keyring and Secret Service are accessed inside the Tokio runtime. Reproduce with cap auth status --json on Linux and verify that it returns status JSON or a handled credential error without panicking.

Written by the indexing model from the issue text.

Description

Description

On Linux, cap auth status --json panics while resolving the stored agent credential through Secret Service.

I expected the command to return its documented status JSON, or a handled credential error. Instead, it aborts with a nested Tokio runtime panic. This reproduces consistently with the bundled CLI. cap doctor --json reports "ok": true and "captureReady": true.

Reproduction
  1. Use the Cap Desktop bundled CLI on Ubuntu 24.04 with GNOME on Wayland.

  2. Run:

    cap auth status --json
    
  3. The CLI panics before producing JSON.

Actual output
thread 'cap-cli-runtime' panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/multi_thread/mod.rs:86:9:
Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: tokio::runtime::context::runtime::enter_runtime
   3: tokio::runtime::runtime::Runtime::block_on_inner
   4: zbus::utils::block_on
   5: secret_service::blocking::SecretService::connect
   6: zbus_secret_service_keyring_store::store::Store::new_internal
   7: keyring::v1::Entry::new
   8: cap::credentials::resolve_agent
   9: cap::run::{{closure}}
error: CLI runtime thread panicked
Additional Context
  • Cap version: cap 0.1.0
  • Distribution: bundled (/usr/bin/cap-cli, invoked through the Cap shim)
  • Operating system: Ubuntu 24.04.5 LTS
  • Kernel: Linux 6.8.0-139-generic x86_64
  • Desktop/session: GNOME Classic, Wayland
  • Architecture: x86_64

(Codex helped draft this)

Dominant language
Rust
Stars
22.5k
Forks
1.9k
Avg merge
6h 33m
Merged PRs (30d)
77

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CapSoftware/Cap

All issues in CapSoftware/Cap

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.