{"record":{"id":"163895859d177436","repo":"Zackriya-Solutions/meetily","slug":"failed-to-access-store","errorCode":null,"errorMessage":"Failed to access store: {}","messagePattern":"Failed to access store: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/audio/recording_preferences.rs","lineNumber":149,"sourceCode":"    info!(\"Loaded recording preferences: save_folder={:?}, auto_save={}, format={}, mic={:?}, system={:?}\",\n          prefs.save_folder, prefs.auto_save, prefs.file_format,\n          prefs.preferred_mic_device, prefs.preferred_system_device);\n    Ok(prefs)\n}\n\n/// Save recording preferences to store\npub async fn save_recording_preferences<R: Runtime>(\n    app: &AppHandle<R>,\n    preferences: &RecordingPreferences,\n) -> Result<()> {\n    info!(\"Saving recording preferences: save_folder={:?}, auto_save={}, format={}, mic={:?}, system={:?}\",\n          preferences.save_folder, preferences.auto_save, preferences.file_format,\n          preferences.preferred_mic_device, preferences.preferred_system_device);\n\n    // Get or create store\n    let store = app\n        .store(\"recording_preferences.json\")\n        .map_err(|e| anyhow::anyhow!(\"Failed to access store: {}\", e))?;\n\n    // Serialize preferences to JSON value\n    let prefs_value = serde_json::to_value(preferences)\n        .map_err(|e| anyhow::anyhow!(\"Failed to serialize preferences: {}\", e))?;\n\n    // Save to store\n    store.set(\"preferences\", prefs_value);\n\n    // Persist to disk\n    store\n        .save()\n        .map_err(|e| anyhow::anyhow!(\"Failed to save store to disk: {}\", e))?;\n\n    info!(\"Successfully persisted recording preferences to disk\");\n\n    // Save backend preference to global config\n    #[cfg(target_os = \"macos\")]\n    if let Some(backend_str) = &preferences.system_audio_backend {","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/audio/recording_preferences.rs#L131-L167","documentation":"save_recording_preferences calls app.store('recording_preferences.json') from tauri-plugin-store. The error means the store could not be created or loaded - most commonly the plugin was never registered on the Tauri Builder, or the underlying file in the app data directory cannot be read or created.","triggerScenarios":"The Builder is missing .plugin(tauri_plugin_store::Builder::new().build()); the app-data directory is missing or read-only; an existing recording_preferences.json is corrupt so the store fails to deserialize on open.","commonSituations":"A refactor dropped plugin registration; permissions changed on the app support directory; the store file was truncated by a crash or full disk; feature flag for the store plugin disabled in build.","solutions":["Confirm tauri_plugin_store is registered in the tauri::Builder chain in lib.rs","Verify the app data directory exists and is writable by the app user","Rename or delete the corrupt recording_preferences.json so a fresh store is created","Inspect the underlying error kind - NotFound, PermissionDenied, and Json errors point to different fixes"],"exampleFix":"// before\ntauri::Builder::default()\n    .run(app.handle())?;\n\n// after - store plugin must be registered for app.store() to work\ntauri::Builder::default()\n    .plugin(tauri_plugin_store::Builder::new().build())\n    .run(app.handle())?;","handlingStrategy":"try-catch","validationCode":"// Startup smoke test: opening the store early surfaces registration/permission issues immediately\nlet _ = app.store(\"recording_preferences.json\");","typeGuard":null,"tryCatchPattern":"Catch the store error in save_recording_preferences callers and keep preferences in memory (return Ok with a warn log) so a store problem never blocks recording start; queue a retry of the save.","preventionTips":["Register tauri_plugin_store in the Builder and add a startup smoke test that opens the store","Verify app-data directory writability during onboarding","If the store JSON is corrupt, rename it and rebuild defaults instead of failing every save"],"tags":["tauri","plugin-store","persistence","configuration"],"backgroundTag":"tauri-store-error","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}