zed-industries/zed · error · anyhow::Error

No onboarding page to deserialize

Error message

No onboarding page to deserialize

What it means

Restore guard in Onboarding::deserialize: workspace serialization asked this item type to deserialize itself, but OnboardingPagesDb has no persisted onboarding page for the given item/workspace id, so the item cannot be restored. Expected when the onboarding tab state was never saved or was cleared.

Source

Thrown at crates/onboarding/src/onboarding.rs:623

            &persistence::OnboardingPagesDb::global(cx),
            cx,
        )
    }

    fn deserialize(
        _project: Entity<project::Project>,
        workspace: WeakEntity<Workspace>,
        workspace_id: workspace::WorkspaceId,
        item_id: workspace::ItemId,
        window: &mut Window,
        cx: &mut App,
    ) -> gpui::Task<gpui::Result<Entity<Self>>> {
        let db = persistence::OnboardingPagesDb::global(cx);
        window.spawn(cx, async move |cx| {
            if let Some(_) = db.get_onboarding_page(item_id, workspace_id)? {
                workspace.update(cx, |workspace, cx| Onboarding::new(workspace, cx))
            } else {
                Err(anyhow::anyhow!("No onboarding page to deserialize"))
            }
        })
    }

    fn serialize(
        &mut self,
        workspace: &mut Workspace,
        item_id: workspace::ItemId,
        _closing: bool,
        _window: &mut Window,
        cx: &mut ui::Context<Self>,
    ) -> Option<gpui::Task<gpui::Result<()>>> {
        let workspace_id = workspace.database_id()?;

        let db = persistence::OnboardingPagesDb::global(cx);
        Some(
            cx.background_spawn(
                async move { db.save_onboarding_page(item_id, workspace_id).await },

View on GitHub (pinned to f4178619ac)

Solutions

  1. Reopen onboarding from the welcome/agent panel instead of restoring the old tab
  2. Ignore if it appears during workspace restore of a closed onboarding page
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/onboarding/src/onboarding.rs:623 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/f471ba2f15fefb59. Report an issue: GitHub.