Zackriya-Solutions/meetily · error · anyhow::Error

Failed to save onboarding store after reset: {}

Error message

Failed to save onboarding store after reset: {}

What it means

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.

Source

Thrown at frontend/src-tauri/src/onboarding.rs:124

    info!("Successfully persisted onboarding status to disk");
    Ok(())
}

/// Reset onboarding status (delete from store)
pub async fn reset_onboarding_status<R: Runtime>(
    app: &AppHandle<R>,
) -> Result<()> {
    info!("Resetting onboarding status");

    let store = app.store("onboarding-status.json")
        .map_err(|e| anyhow::anyhow!("Failed to access onboarding store: {}", e))?;

    // Clear the status key
    store.delete("status");

    // Persist deletion to disk
    store.save()
        .map_err(|e| anyhow::anyhow!("Failed to save onboarding store after reset: {}", e))?;

    info!("Successfully reset onboarding status");
    Ok(())
}

/// Tauri commands for onboarding status
#[tauri::command]
pub async fn get_onboarding_status<R: Runtime>(
    app: AppHandle<R>,
) -> Result<Option<OnboardingStatus>, String> {
    let status = load_onboarding_status(&app)
        .await
        .map_err(|e| format!("Failed to load onboarding status: {}", e))?;

    // Return None if it's the default (never saved before)
    // Check if we have any saved data by seeing if the store has the key
    let store = app.store("onboarding-status.json")
        .map_err(|e| format!("Failed to access store: {}", e))?;

View on GitHub (pinned to 0281737d87)

Solutions

  1. Check disk space and permissions on the config dir
  2. Close other app instances before resetting
  3. As a recovery path, delete onboarding-status.json directly if the store flush keeps failing
Defensive patterns

Strategy: retry

Try / catch

// Best-effort flush with one retry; a failed reset flush should not block onboarding restart
let mut attempt = 0;
loop {
    match store.save() {
        Ok(()) => break,
        Err(e) if attempt == 0 => { attempt += 1; std::thread::sleep(std::time::Duration::from_millis(250)); }
        Err(e) => { warn!("Store flush after reset failed: {e}"); break; }
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: Reset attempted while another app instance holds the store file; disk full at exactly the reset step.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16). Data as JSON: /api/errors/cb53642f501a480a. Report an issue: GitHub.