{"record":{"id":"ce548bb74f15289c","repo":"zed-industries/zed","slug":"invalid-hello-message-received","errorCode":null,"errorMessage":"invalid hello message received: {:?}","messagePattern":"invalid hello message received: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/client/src/client.rs","lineNumber":1195,"sourceCode":"    async fn set_connection(self: &Arc<Self>, conn: Connection, cx: &AsyncApp) -> Result<()> {\n        let executor = cx.background_executor();\n        log::debug!(\"add connection to peer\");\n        let (connection_id, handle_io, mut incoming) = self.peer.add_connection(conn, {\n            let executor = executor.clone();\n            move |duration| executor.timer(duration)\n        });\n        let handle_io = executor.spawn(handle_io);\n\n        let peer_id = async {\n            log::debug!(\"waiting for server hello\");\n            let message = incoming.next().await.context(\"no hello message received\")?;\n            log::debug!(\"got server hello\");\n            let hello_message_type_name = message.payload_type_name().to_string();\n            let hello = message\n                .into_any()\n                .downcast::<TypedEnvelope<proto::Hello>>()\n                .map_err(|_| {\n                    anyhow!(\n                        \"invalid hello message received: {:?}\",\n                        hello_message_type_name\n                    )\n                })?;\n            let peer_id = hello.payload.peer_id.context(\"invalid peer id\")?;\n            Ok(peer_id)\n        };\n\n        let peer_id = match peer_id.await {\n            Ok(peer_id) => peer_id,\n            Err(error) => {\n                self.peer.disconnect(connection_id);\n                return Err(error);\n            }\n        };\n\n        log::debug!(\n            \"set status to connected (connection id: {:?}, peer id: {:?})\",","sourceCodeStart":1177,"sourceCodeEnd":1213,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/client/src/client.rs#L1177-L1213","documentation":"In set_connection, after adding the websocket the client awaits the server's hello handshake message; when a hello arrives but does not deserialize/validate into the expected handshake shape, its debug form is embedded in this error, meaning the remote spoke the protocol incorrectly (version mismatch or a non-Zed endpoint answered).","triggerScenarios":"Thrown at crates/client/src/client.rs:1195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the server URL points at a genuine Zed collaboration endpoint","Update client and server to matching protocol versions","Retry after confirming no HTTP proxy intercepted and rewrote the websocket handshake"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}