{"record":{"id":"8c1d0cf2c1de3a31","repo":"nautechsystems/nautilus_trader","slug":"failed-to-start-binance-spot-task-generation-e","errorCode":null,"errorMessage":"Failed to start Binance Spot task generation: {e}","messagePattern":"Failed to start Binance Spot task generation: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/spot/execution.rs","lineNumber":863,"sourceCode":"\n    fn get_account(&self) -> Option<AccountAny> {\n        self.core.cache().account_owned(&self.core.account_id)\n    }\n\n    async fn connect(&mut self) -> anyhow::Result<()> {\n        if self.core.is_connected() && self.session_tasks.is_open() && self.pending_tasks.is_open()\n        {\n            return Ok(());\n        }\n\n        if !self.pending_tasks.is_open() || !self.session_tasks.is_open() {\n            self.teardown_partial_connect().await?;\n        }\n\n        if !self.pending_tasks.is_open() {\n            self.await_pending_tasks().await?;\n            self.pending_tasks.start_generation().map_err(|e| {\n                anyhow::anyhow!(\"Failed to start Binance Spot task generation: {e}\")\n            })?;\n        }\n\n        if !self.session_tasks.is_open() {\n            self.await_session_tasks().await?;\n            self.session_tasks.start_generation().map_err(|e| {\n                anyhow::anyhow!(\"Failed to start Binance Spot session generation: {e}\")\n            })?;\n        }\n        let ws_trading_client = self.ws_trading_client.clone();\n        let ws_user_data_client = Arc::clone(&self.ws_user_data_client);\n        let setup_guard =\n            TaskGroupGuard::new(&[&self.session_tasks, &self.pending_tasks], move || {\n                if let Some(client) = ws_trading_client {\n                    client.begin_shutdown();\n                }\n\n                if let Some(client) = ws_user_data_client.lock().as_ref() {","sourceCodeStart":845,"sourceCodeEnd":881,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/spot/execution.rs#L845-L881","documentation":"Connect-time error in the Binance Spot execution client: spawning the pending-task generator (the async task that submits queued work) failed, so the client cannot complete its connection sequence and the error propagates from connect().","triggerScenarios":"Thrown at crates/adapters/binance/src/spot/execution.rs:863 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reset or recreate the execution client after the failed state","Inspect preceding errors that closed the task group before retrying connect"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}