Skip to content

Return an error when the Secret Service prompt stream ends - #620

Merged
bilelmoussaoui merged 1 commit into
linux-credentials:mainfrom
bennetbo:fix-prompt-stream-closed
Oct 23, 2026
Merged

bilelmoussaoui merged 1 commit into
linux-credentials:mainfrom
bennetbo:fix-prompt-stream-closed

Conversation

@bennetbo

@bennetbo bennetbo commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

We use oo7 in Zed and Delta. Over the past 365 days, Sentry recorded 602 crash events with this Option::unwrap() panic.

We investigated the reports but haven't determined why the D-Bus Completed signal stream ends before yielding a message. The reports don't include the underlying D-Bus close reason. I think it is still a good idea to return an Error rather than panicking.

Representative stack excerpt (unrelated runtime frames omitted):

at gpui_linux::linux::platform::LinuxPlatform<T>::read_credentials::{closure#0} (platform.rs:741)
    let keyring = oo7::Keyring::new().await?;
at oo7::keyring::Keyring::new::{closure#0} (keyring.rs:68)
    let collection = service.default_collection().await?;
at {async_fn#0} (service.rs:140)
    Ok(None) => self.create_collection(label, Some(alias), window_id).await,
...
at {async_fn#0} (service.rs:132)
    let response = prompt.receive_completed(window_id).await?;
at oo7::dbus::api::prompt::Prompt::receive_completed::{closure#0} (prompt.rs:81)
...
at {async_block#0} (prompt.rs:83)
    let message = stream.next().await.unwrap();
at unwrap<T> (option.rs:1014)
at core::option::unwrap_failed (option.rs:2251)

@github-actions

Copy link
Copy Markdown

📊 Code Coverage Report

Metric Value
Current PR Coverage 83.37%
Main Branch Coverage 83.37%
Coverage Change ➡️ 0.00%

Coverage report generated by cargo-tarpaulin

@bilelmoussaoui
bilelmoussaoui merged commit aab9efb into linux-credentials:main Oct 23, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants