{"record":{"id":"5e555ced94d664e7","repo":"zed-industries/zed","slug":"unable-to-deserialize-editor-no-entry-in-database","errorCode":null,"errorMessage":"Unable to deserialize editor: No entry in database for item_id: {item_id} and workspace_id {workspace_id:?}","messagePattern":"Unable to deserialize editor: No entry in database for item_id: (.+?) and workspace_id (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/editor/src/items.rs","lineNumber":1303,"sourceCode":"        item_id: ItemId,\n        window: &mut Window,\n        cx: &mut App,\n    ) -> Task<Result<Entity<Self>>> {\n        let serialized_editor = match EditorDb::global(cx)\n            .get_serialized_editor(item_id, workspace_id)\n            .context(\"Failed to query editor state\")\n        {\n            Ok(Some(serialized_editor)) => {\n                if ProjectSettings::get_global(cx)\n                    .session\n                    .restore_unsaved_buffers\n                {\n                    serialized_editor\n                } else {\n                    SerializedEditor {\n                        abs_path: serialized_editor.abs_path,\n                        contents: None,\n                        language: None,\n                        mtime: None,\n                    }\n                }\n            }\n            Ok(None) => {\n                return Task::ready(Err(anyhow!(\n                    \"Unable to deserialize editor: No entry in database for item_id: {item_id} and workspace_id {workspace_id:?}\"\n                )));\n            }\n            Err(error) => {\n                return Task::ready(Err(error));\n            }\n        };\n        log::debug!(\n            \"Deserialized editor {item_id:?} in workspace {workspace_id:?}, {serialized_editor:?}\"\n        );\n\n        match serialized_editor {","sourceCodeStart":1285,"sourceCodeEnd":1321,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/editor/src/items.rs#L1285-L1321","documentation":"Session restore tried to deserialize a saved editor but the database has no row for the given item_id in the given workspace_id. The serialized-editor lookup (guarded by 'Failed to query editor state') succeeded structurally but the JOIN/lookup on the items table found no entry, meaning the persisted editor row was deleted or the session references a stale item.","triggerScenarios":"Thrown at crates/editor/src/items.rs:1295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Skip restoring this editor and continue the session restore for remaining items","Run the session cleanup routine that prunes orphaned editor-state rows referencing missing items","Treat as non-fatal: log it, since a missing saved buffer is recoverable by simply not reopening that editor"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}