{"record":{"id":"d12f276e0e7ef731","repo":"zed-industries/zed","slug":"not-a-remote-project","errorCode":null,"errorMessage":"not a remote project","messagePattern":"not a remote project","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/project.rs","lineNumber":3220,"sourceCode":"            self.open_buffer_with_lsp((worktree.read(cx).id(), relative_path), cx)\n        } else {\n            Task::ready(Err(anyhow!(\"no such path\")))\n        }\n    }\n\n    pub fn download_file(\n        &mut self,\n        worktree_id: WorktreeId,\n        path: Arc<RelPath>,\n        destination_path: PathBuf,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<()>> {\n        log::debug!(\n            \"download_file called: worktree_id={:?}, path={:?}, destination={:?}\",\n            worktree_id,\n            path,\n            destination_path\n        );\n\n        let Some(remote_client) = &self.remote_client else {\n            log::error!(\"download_file: not a remote project\");\n            return Task::ready(Err(anyhow!(\"not a remote project\")));\n        };\n\n        let proto_client = remote_client.read(cx).proto_client();\n        // For SSH remote projects, use REMOTE_SERVER_PROJECT_ID instead of remote_id()\n        // because SSH projects have client_state: Local but still need to communicate with remote server\n        let project_id = self.remote_id().unwrap_or(REMOTE_SERVER_PROJECT_ID);\n        let downloading_files = self.downloading_files.clone();\n        let path_str = path.as_unix_str().to_owned();\n\n        static NEXT_FILE_ID: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(1);\n        let file_id = NEXT_FILE_ID.fetch_add(1, std::sync::atomic::Ordering::SeqCst);\n\n        // Register BEFORE sending request to avoid race condition\n        let key = (worktree_id, path_str.clone());","sourceCodeStart":3202,"sourceCodeEnd":3238,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/project.rs#L3202-L3238","documentation":"In Project::download_file: self.remote_client is None, i.e. the project is local (or not connected to a remote server), but a file download was requested — an operation only valid for remote projects. The error is also logged.","triggerScenarios":"Thrown at crates/project/src/project.rs:3207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only call download_file on remote projects","Open the file directly from the local filesystem instead"],"exampleFix":null,"handlingStrategy":"validation","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"}