{"record":{"id":"0097927087534c14","repo":"helix-editor/helix","slug":"incorrect-transport","errorCode":null,"errorMessage":"Incorrect transport {}","messagePattern":"Incorrect transport (.+?)","errorType":"validation","errorClass":"helix_dap::Error","httpStatus":null,"severity":"error","filePath":"helix-dap/src/client.rs","lineNumber":68,"sourceCode":"}\n\nimpl Client {\n    // Spawn a process and communicate with it by either TCP or stdio\n    // The returned stream includes the Client ID so consumers can differentiate between multiple clients\n    pub async fn process(\n        transport: &str,\n        command: &str,\n        args: Vec<&str>,\n        port_arg: Option<&str>,\n        id: DebugAdapterId,\n    ) -> Result<(Self, UnboundedReceiver<(DebugAdapterId, Payload)>)> {\n        if command.is_empty() {\n            return Result::Err(Error::Other(anyhow!(\"Command not provided\")));\n        }\n        match (transport, port_arg) {\n            (\"tcp\", Some(port_arg)) => Self::tcp_process(command, args, port_arg, id).await,\n            (\"stdio\", _) => Self::stdio(command, args, id),\n            _ => Result::Err(Error::Other(anyhow!(\"Incorrect transport {}\", transport))),\n        }\n    }\n\n    pub fn streams(\n        rx: Box<dyn AsyncBufRead + Unpin + Send>,\n        tx: Box<dyn AsyncWrite + Unpin + Send>,\n        err: Option<Box<dyn AsyncBufRead + Unpin + Send>>,\n        id: DebugAdapterId,\n        process: Option<Child>,\n    ) -> Result<(Self, UnboundedReceiver<(DebugAdapterId, Payload)>)> {\n        let (server_rx, server_tx) = Transport::start(rx, tx, err, id);\n        let (client_tx, client_rx) = unbounded_channel();\n\n        let client = Self {\n            id,\n            _process: process,\n            server_tx,\n            request_counter: AtomicU64::new(0),","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/helix-editor/helix/blob/079a789e8cb08ead67f19e1971a1b7438b37354b/helix-dap/src/client.rs#L50-L86","documentation":"Returned by helix_dap::Client::process when the (transport, port_arg) pair is unusable: transport must be \"stdio\" (port_arg ignored) or \"tcp\" with a port_arg. The match falls through to this error for any unknown transport string and also for \"tcp\" without a port_arg, since the arm requires (\"tcp\", Some(_)).","triggerScenarios":"Debug config with transport = \"ws\", \"pipe\", or any string other than \"tcp\"/\"stdio\"; or transport = \"tcp\" but no port-arg field supplied, which fails the (\"tcp\", Some(port_arg)) arm and lands in the catch-all. Also a typo like \"Stdio\" (case-sensitive match).","commonSituations":"Adapter docs mention connecting over TCP and the user sets transport = \"tcp\" but forgets port-arg (e.g. port-arg = \"--port=\"); copied a config written for a different client whose transport names differ; capitalization/whitespace typos in the transport value.","solutions":["Use transport = \"stdio\" for adapters Helix spawns and talks to over stdin/stdout (most common) - no port-arg needed","For TCP adapters, keep transport = \"tcp\" AND provide port-arg (the argument template used to pass the chosen port, e.g. \"--port=\"); if port-arg is missing you get this same error","Check spelling and case: the match is exact (\"tcp\"/\"stdio\", lowercase)","Confirm the value is not inherited empty from a template variable"],"exampleFix":"# before\ntransport = \"tcp\"\n# no port-arg -> Incorrect transport tcp\n\n# after\ntransport = \"tcp\"\nport-arg = \"--port=\"","handlingStrategy":"validation","validationCode":"fn transport_is_valid(transport: &str, port_arg: Option<&str>) -> bool {\n    match transport {\n        \"stdio\" => true,\n        \"tcp\" => port_arg.is_some(),\n        _ => false,\n    }\n}","typeGuard":null,"tryCatchPattern":"// Client::process is async and returns Result; treat Error::Other with\n// 'Incorrect transport' as a config bug, not a transient failure - do not retry:\nif let Err(e) = dap::Client::process(...).await {\n    if e.to_string().contains(\"Incorrect transport\") { fix_debug_config(); }\n}","preventionTips":["Use exactly 'stdio' or 'tcp' (lowercase, no whitespace)","Pair 'tcp' with a port-arg template like '--port='","Lint debugger entries in languages.toml when adding them"],"tags":["rust","helix","dap","debugging","config"],"backgroundTag":null,"analyzedSha":"079a789e8cb08ead67f19e1971a1b7438b37354b","analyzedAt":"2026-08-16T09:09:59.668Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}