{"record":{"id":"2fdfb279f6c08d29","repo":"exo-explore/exo","slug":"cannot-listen-on-port-0-yet","errorCode":null,"errorMessage":"cannot listen on port 0 yet","messagePattern":"cannot listen on port 0 yet","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/exo_rs/src/networking.rs","lineNumber":75,"sourceCode":"#[gen_stub_pymethods]\n#[pymethods]\nimpl PyNetworkingHandle {\n    // NOTE: `async fn`s here that use `.await` will wrap the future in `.allow_threads_py()`\n    //       immediately beforehand to release the interpreter.\n    //       SEE: https://pyo3.rs/v0.26.0/async-await.html#detaching-from-the-interpreter-across-await\n\n    // ---- Lifecycle management methods ----\n\n    #[staticmethod]\n    pub fn new(\n        identity: &str,\n        namespace: &str,\n        listen_port: u16,\n        discovery_service_port: u16,\n    ) -> PyResult<PyNetworkingHandle> {\n        // todo: zenoh self assigned peers\n        if listen_port == 0 {\n            todo!(\"cannot listen on port 0 yet\");\n        }\n        // create communication channels\n        let (to_swarm, from_client) = mpsc::channel(1024);\n\n        // get identity\n        if !is_valid_zid(identity) {\n            return Err(PyValueError::new_err(format!(\n                \"{identity} is not a valid zenoh identity\"\n            )));\n        }\n\n        // create networking swarm (within tokio context!! or it crashes)\n        let swarm = pyo3_async_runtimes::tokio::get_runtime()\n            .block_on(create_swarm(\n                identity,\n                namespace,\n                from_client,\n                listen_port,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/rust/exo_rs/src/networking.rs#L57-L93","documentation":"Error \"cannot listen on port 0 yet\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at rust/exo_rs/src/networking.rs:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}