Linux CLI auth status panics when accessing Secret Service inside Tokio runtime
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
- Domain
- authentication, cli
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
-
Use the Cap Desktop bundled CLI on Ubuntu 24.04 with GNOME on Wayland.
-
Run:
cap auth status --json -
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CapSoftware/Cap
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
CapSoftware/Cap#2305 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CapSoftware/Cap#1714 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
CapSoftware/Cap#2328 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
CapSoftware/Cap#2324 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
CapSoftware/Cap#2323 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
state:needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
zed-industries/zed#64680 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
RustPython/RustPython#8802 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TheLarkInn/aipm#2390 ·