{"record":{"id":"e6ba61ff403c102e","repo":"Zackriya-Solutions/meetily","slug":"failed-to-save-onboarding-store-to-disk","errorCode":null,"errorMessage":"Failed to save onboarding store to disk: {}","messagePattern":"Failed to save onboarding store to disk: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/onboarding.rs","lineNumber":104,"sourceCode":"\n    // Get or create store\n    let store = app.store(\"onboarding-status.json\")\n        .map_err(|e| anyhow::anyhow!(\"Failed to access onboarding store: {}\", e))?;\n\n    // Update last_updated timestamp\n    let mut status = status.clone();\n    status.last_updated = chrono::Utc::now().to_rfc3339();\n\n    // Serialize status to JSON value\n    let status_value = serde_json::to_value(&status)\n        .map_err(|e| anyhow::anyhow!(\"Failed to serialize onboarding status: {}\", e))?;\n\n    // Save to store\n    store.set(\"status\", status_value);\n\n    // Persist to disk\n    store.save()\n        .map_err(|e| anyhow::anyhow!(\"Failed to save onboarding store to disk: {}\", e))?;\n\n    info!(\"Successfully persisted onboarding status to disk\");\n    Ok(())\n}\n\n/// Reset onboarding status (delete from store)\npub async fn reset_onboarding_status<R: Runtime>(\n    app: &AppHandle<R>,\n) -> Result<()> {\n    info!(\"Resetting onboarding status\");\n\n    let store = app.store(\"onboarding-status.json\")\n        .map_err(|e| anyhow::anyhow!(\"Failed to access onboarding store: {}\", e))?;\n\n    // Clear the status key\n    store.delete(\"status\");\n\n    // Persist deletion to disk","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/onboarding.rs#L86-L122","documentation":"store.save() failed to persist onboarding-status.json to disk after set(\"status\", ...). The in-memory store updated fine; flushing to the config dir failed - an OS-level write problem (permissions, disk full, path issues) or the file being locked.","triggerScenarios":"Config directory read-only or out of space; onboarding-status.json locked by another process (second app instance, backup/AV scanner); the directory was removed while the app was running.","commonSituations":"Disk-full machines; enterprise policies protecting user config dirs; two instances of the app running simultaneously.","solutions":["Check free space and write permissions on the config dir (df -h; ls -l)","Ensure only one instance of the app runs (single-instance plugin)","Retry the save once - transient AV/backup locks commonly clear","If the directory was deleted externally, recreate it and retry"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Check the store file is writable before save\nfn store_writable(path: &std::path::Path) -> bool {\n    if let Some(p) = path.parent() {\n        if std::fs::create_dir_all(p).is_err() { return false; }\n    }\n    std::fs::OpenOptions::new().write(true).create(true).open(path).is_ok()\n}","typeGuard":null,"tryCatchPattern":"// One bounded retry absorbs transient locks (AV/backup scanners)\nlet mut last = None;\nfor _ in 0..2 {\n    match store.save() {\n        Ok(()) => { last = None; break; }\n        Err(e) => { last = Some(e); std::thread::sleep(std::time::Duration::from_millis(250)); }\n    }\n}\nif let Some(e) = last { warn!(\"Could not persist onboarding status: {e}\"); }","preventionTips":["Enforce single-instance execution","Ensure the config dir exists and is writable before the first save","Surface persist failures in settings so users notice data loss risk"],"tags":["tauri","plugin-store","disk-io","onboarding"],"backgroundTag":"tauri-store-save-failed","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}