{"record":{"id":"93a6a4f6bceaeb10","repo":"Zackriya-Solutions/meetily","slug":"failed-to-access-onboarding-store","errorCode":null,"errorMessage":"Failed to access onboarding store: {}","messagePattern":"Failed to access onboarding store: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/onboarding.rs","lineNumber":89,"sourceCode":"    } else {\n        info!(\"No stored onboarding status found, using defaults\");\n        OnboardingStatus::default()\n    };\n\n    Ok(status)\n}\n\n/// Save onboarding status to store\npub async fn save_onboarding_status<R: Runtime>(\n    app: &AppHandle<R>,\n    status: &OnboardingStatus,\n) -> Result<()> {\n    info!(\"Saving onboarding status: step={}, completed={}\",\n          status.current_step, status.completed);\n\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(())","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/onboarding.rs#L71-L107","documentation":"app.store(\"onboarding-status.json\") returned an error while getting/creating the Tauri store in save_onboarding_status. In Tauri 2 this fails when the store plugin is not registered on the builder, or when the store file cannot be created/opened (permissions, disk, corrupt JSON).","triggerScenarios":"Calling save_onboarding_status in a build where tauri_plugin_store was never registered via .plugin(...); the app config directory is read-only or full; onboarding-status.json exists but is corrupted so opening it fails.","commonSituations":"Adding onboarding code without wiring the store plugin; packaged app writing to a sandboxed/protected dir; two instances racing on the same store file.","solutions":["Register the store plugin in the Tauri builder: .plugin(tauri_plugin_store::Builder::new().build())","Check the app config dir is writable and has space","Delete/rename a corrupted onboarding-status.json so it is recreated","Ensure a single app instance (or accept last-writer-wins) for store files"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match app.store(\"onboarding-status.json\") {\n    Ok(store) => { /* set + save */ }\n    Err(e) => {\n        error!(\"Onboarding store unavailable: {e}\");\n        // keep onboarding state in memory; persist on next successful open\n    }\n}","preventionTips":["Register tauri_plugin_store in the Tauri builder before shipping","Add an integration test that opens every store path the app uses","Recreate corrupted store files instead of failing the flow"],"tags":["tauri","plugin-store","onboarding","persistence"],"backgroundTag":"tauri-store-open-failed","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}