You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1][security] init_keyring() panic on Linux + ConnectionStore::new.expect() block all app launches #278
If the OS keyring backend cannot initialize (no D-Bus Secret Service in a headless/CI/Flatpak session), the app currently panics inside init_keyring() and cannot start.
Problem
src-tauri/src/lib.rs:18-37 calls .expect() on each keyring backend. On Linux, linux_keyutils_keyring_store::Store::new() returns Err when D-Bus Secret Service is unavailable. ConnectionStore::new propagates errors via .expect("Failed to initialize connection store") if migrate_plaintext_passwords fails. Result: any user with existing profiles whose keyring is broken cannot start the app.
src-tauri/crates/mas-core/src/connection/manager.rs (no degraded-mode path)
Repro
Run SQLPilot under dbus-launch --exit-with-session /bin/false (no Secret Service). App crashes on startup before reaching the connection list.
Expected
App starts normally with a status bar banner "Credentials will not be saved across sessions". Profile creation succeeds (in-memory password only). Subsequent launches prompt for password entry until keyring is fixed.
Proposed fix
Scope M. Replace .expect() with explicit error logging + store init error in AppState. Add keyring_status Tauri command returning {available: bool, reason: Option<String>}. In ConnectionStore::new, let _ = migrate_plaintext_passwords(...); when unavailable. Frontend renders banner when available=false.
Acceptance
Launch with no keyring backend available — app starts; banner shown; profile creation succeeds; restart prompts for password.
Fixed by #527. init_keyring no longer .expect()s: a missing or locked credential store is treated as a degraded mode, the app starts, and the status bar says Passwords not saved so the user learns it immediately rather than at the next launch.
ConnectionStore::new no longer fails construction either — migrate_plaintext_passwords skips a profile it cannot move and leaves the plaintext row in place so a later launch retries.
Worth recording: nothing was needed for the degraded path itself. keyring-core already returns NoDefaultStore as an error rather than panicking, so every password operation fails cleanly once no store is attached.
Not auto-closed because the PR body wrote Refs #278.
Activity
fix(connection): start without a keyring, and stop cancelled connects…
EVWorth commentedon Sep 7, 2026
Fixed by #527.
init_keyringno longer.expect()s: a missing or locked credential store is treated as a degraded mode, the app starts, and the status bar saysPasswords not savedso the user learns it immediately rather than at the next launch.ConnectionStore::newno longer fails construction either —migrate_plaintext_passwordsskips a profile it cannot move and leaves the plaintext row in place so a later launch retries.Worth recording: nothing was needed for the degraded path itself.
keyring-corealready returnsNoDefaultStoreas an error rather than panicking, so every password operation fails cleanly once no store is attached.Not auto-closed because the PR body wrote
Refs #278.fix(startup): stop panicking before the window exists (#666)