lbjlaq/Antigravity-Manager · error
Keyring write timed out (10s). The D-Bus session bus is not…
Error message
Keyring write timed out (10s). The D-Bus session bus is not reachable from this process.
What it means
write_to_system_keyring shells out to secret-tool (libsecret) to store a credential and enforces a 10-second timeout. If the child process hangs — typically because no D-Bus session bus is reachable — the function aborts and returns this error string instead of blocking forever.
Solutions
- Ensure a D-Bus session bus is running and DBUS_SESSION_BUS_ADDRESS is set in the app's environment
- Install/enable a secret service (gnome-keyring) and unlock the login keyring
- Launch the app from a normal desktop session rather than SSH/systemd/cron
- Fall back to file-based or in-app credential storage when the keyring is unavailable
Example fix
// before
return Err("Keyring write timed out (10s). The D-Bus session bus is not reachable from this process.".to_string());
// after
return Err(format!(
"Keyring write timed out (10s). D-Bus session bus unreachable (DBUS_SESSION_BUS_ADDRESS={:?}). Install/unlock gnome-keyring or configure a fallback store.",
std::env::var("DBUS_SESSION_BUS_ADDRESS").as_deref().unwrap_or("<unset>")
)); Defensive patterns
Strategy: fallback
Validate before calling
let bus_ok = std::env::var("DBUS_SESSION_BUS_ADDRESS").map(|p| std::path::Path::new(&p).exists()).unwrap_or(false); if !bus_ok { return Err("keyring unavailable: no D-Bus session bus".into()); } Try / catch
match write_to_system_keyring(entry, secret) { Err(e) if e.contains("timed out") => { log::warn!("{e}; falling back to encrypted file store"); fallback_store.write(entry, secret) } r => r } Prevention
- Detect secret-service availability at startup and warn early
- Provide a documented fallback credential store
- Avoid launching the app from environments without a session bus (SSH/cron/systemd)
When it happens
Trigger: on_account_switch triggers a keyring write while the process has no D-Bus session bus (secret-tool blocks >10s), e.g. running the app via SSH, systemd service, cron, or a desktop session without gnome-keyring/secret-service.
Common situations: Launching the Tauri app from a headless session or sudo -E; SSH without dbus-launch; broken XDG_RUNTIME_DIR so the bus address is unresolvable.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
AI-assisted analysis of lbjlaq/Antigravity-Manager@90a2b6b207 (2026-09-19).
Data as JSON: /api/errors/d51cd2239648dcf5.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/modules/integration.rs:393
let child_pid = child.id();
let (tx, rx) = mpsc::channel::<Result<std::process::Output, std::io::Error>>();
std::thread::spawn(move || {
let _ = tx.send(child.wait_with_output());
});
let output = match rx.recv_timeout(std::time::Duration::from_secs(10)) {
Ok(result) => {
result.map_err(|e| format!("Failed to wait for secret-tool: {}", e))?
}
Err(_) => {
let _ = Command::new("kill")
.args(["-9", &child_pid.to_string()])
.output();
crate::modules::logger::log_error(
"[Desktop] secret-tool store blocked for >10s — D-Bus session bus unreachable.",
);
return Err(
"Keyring write timed out (10s). The D-Bus session bus is not reachable from this process."
.to_string(),
);
}
};
if !output.status.success() {
let err_msg = String::from_utf8_lossy(&output.stderr);
return Err(format!("Linux secret-tool failed: {}", err_msg.trim()));
}
Ok(())
};
// 1. 优先尝试写入 'login' 集合(agy CLI 所需)
let login_res = store_to_collection(Some("login"), payload_json.as_bytes());
// 2. 同时写入默认集合(保证其他依赖 default collection 的系统工具也能读取)View on GitHub (pinned to 90a2b6b207)