{"record":{"id":"cb53642f501a480a","repo":"Zackriya-Solutions/meetily","slug":"failed-to-save-onboarding-store-after-reset","errorCode":null,"errorMessage":"Failed to save onboarding store after reset: {}","messagePattern":"Failed to save onboarding store after reset: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/onboarding.rs","lineNumber":124,"sourceCode":"    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\n    store.save()\n        .map_err(|e| anyhow::anyhow!(\"Failed to save onboarding store after reset: {}\", e))?;\n\n    info!(\"Successfully reset onboarding status\");\n    Ok(())\n}\n\n/// Tauri commands for onboarding status\n#[tauri::command]\npub async fn get_onboarding_status<R: Runtime>(\n    app: AppHandle<R>,\n) -> Result<Option<OnboardingStatus>, String> {\n    let status = load_onboarding_status(&app)\n        .await\n        .map_err(|e| format!(\"Failed to load onboarding status: {}\", e))?;\n\n    // Return None if it's the default (never saved before)\n    // Check if we have any saved data by seeing if the store has the key\n    let store = app.store(\"onboarding-status.json\")\n        .map_err(|e| format!(\"Failed to access store: {}\", e))?;","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/onboarding.rs#L106-L142","documentation":"store.save() failed after store.delete(\"status\") while resetting onboarding - the delete succeeded in memory but flushing the emptied store back to onboarding-status.json failed with an IO error.","triggerScenarios":"Same as any store flush: read-only or full config dir, file locked by a second instance, or the file vanished between open and save.","commonSituations":"Reset attempted while another app instance holds the store file; disk full at exactly the reset step.","solutions":["Check disk space and permissions on the config dir","Close other app instances before resetting","As a recovery path, delete onboarding-status.json directly if the store flush keeps failing"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Best-effort flush with one retry; a failed reset flush should not block onboarding restart\nlet mut attempt = 0;\nloop {\n    match store.save() {\n        Ok(()) => break,\n        Err(e) if attempt == 0 => { attempt += 1; std::thread::sleep(std::time::Duration::from_millis(250)); }\n        Err(e) => { warn!(\"Store flush after reset failed: {e}\"); break; }\n    }\n}","preventionTips":["Close other app instances before resetting","Check disk space and permissions when this recurs","Offer direct file deletion as a documented recovery path"],"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"}