Linux CLI auth status panics when accessing Secret Service inside Tokio runtime
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- authentication, cli
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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)
- 主要语言
- Rust
- 星标
- 22.5k
- 派生
- 1.9k
- 平均合并
- 7 小时 43 分钟
- 30 天内合并 PR
- 80
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CapSoftware/Cap 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
CapSoftware/Cap#2305 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
CapSoftware/Cap#1714 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
CapSoftware/Cap#2340 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
CapSoftware/Cap#2339 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
CapSoftware/Cap#2328 · 1 条评论 ·
相似的 Issue
-
bug CLI custom-model
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
难度 2/5 1-3 小时 新手友好度 75/100