{"record":{"id":"7b10701a57b4c117","repo":"zed-industries/zed","slug":"cannot-open-buffer-while-disconnected","errorCode":null,"errorMessage":"cannot open buffer while disconnected","messagePattern":"cannot open buffer while disconnected","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/project.rs","lineNumber":3431,"sourceCode":"        cx: &mut Context<Self>,\n    ) -> Task<Result<Entity<Buffer>>> {\n        if let Some(buffer) = self.buffer_for_id(id, cx) {\n            Task::ready(Ok(buffer))\n        } else if self.is_local() || self.is_via_remote_server() {\n            Task::ready(Err(anyhow!(\"buffer {id} does not exist\")))\n        } else if let Some(project_id) = self.remote_id() {\n            let request = self.collab_client.request(proto::OpenBufferById {\n                project_id,\n                id: id.into(),\n            });\n            cx.spawn(async move |project, cx| {\n                let buffer_id = BufferId::new(request.await?.buffer_id)?;\n                project\n                    .update(cx, |project, cx| {\n                        project.buffer_store.update(cx, |buffer_store, cx| {\n                            buffer_store.wait_for_remote_buffer(buffer_id, cx)\n                        })\n                    })?\n                    .await\n            })\n        } else {\n            Task::ready(Err(anyhow!(\"cannot open buffer while disconnected\")))\n        }\n    }\n\n    pub fn save_buffers(\n        &self,\n        buffers: HashSet<Entity<Buffer>>,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<()>> {\n        cx.spawn(async move |this, cx| {\n            let save_tasks = buffers.into_iter().filter_map(|buffer| {\n                this.update(cx, |this, cx| this.save_buffer(buffer, cx))\n                    .ok()\n            });\n            try_join_all(save_tasks).await?;","sourceCodeStart":3413,"sourceCodeEnd":3449,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/project.rs#L3413-L3449","documentation":"Raised during remote buffer operations (open_buffer_by_id path): the project is currently disconnected from its remote server, so opening a buffer cannot proceed. It is a connection-state guard mirroring ErrorCode::Disconnected.","triggerScenarios":"Thrown at crates/project/src/project.rs:3418 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reconnect to the remote project and retry"],"exampleFix":null,"handlingStrategy":"retry","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-14T00:17:10.932Z"}