{"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/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/client/src/client.rs#L1177-L1213","documentation":"When establishing an RPC connection, the first message from the server must be a proto::Hello envelope. This error means the first message had a different payload type, so the connection is speaking to something that is not a matching Zed collab server (or an incompatible version).","triggerScenarios":"incoming.next() returns a message whose payload_type_name() is not Hello: pointing the client at the wrong URL (an HTTP server, a different gRPC service), a man-in-the-middle proxy rewriting the stream, or a client/server protocol version mismatch.","commonSituations":"Custom ZED_SERVER_URL / self-hosted collab deployments with mismatched versions; local development against a stub server; SSL-intercepting proxies corrupting the framing.","solutions":["Verify the server URL actually points to a Zed collab RPC endpoint","Upgrade client and server to matching versions (custom deployments must rebuild collab from the same commit)","Disable SSL inspection for the zed.dev/collab host or add proper bypass rules"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"let peer_id = peer_id.await.map_err(|err| {\n    if err.to_string().starts_with(\"invalid hello message\") {\n        // wrong endpoint or version mismatch; do not retry the same URL\n        anyhow!(\"server did not speak the Zed RPC protocol; check server URL and versions\")\n    } else {\n        err\n    }\n})?;","preventionTips":["Pin client and collab server to the same release when self-hosting","Smoke-test custom endpoints with a single connection after deploys","Exclude collab hosts from TLS-intercepting proxies"],"tags":["protocol","rpc","version-mismatch","client"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}