Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#2,329 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

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
  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)

主要语言
Rust
星标
22.5k
派生
1.9k
平均合并
7 小时 43 分钟
30 天内合并 PR
80

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CapSoftware/Cap 的其他 Issue

查看 CapSoftware/Cap 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。