{"record":{"id":"19f96a16572e5f1a","repo":"sipeed/picoclaw","slug":"onebot-websocket-not-connected","errorCode":null,"errorMessage":"OneBot WebSocket not connected","messagePattern":"OneBot WebSocket not connected","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/onebot/onebot.go","lineNumber":416,"sourceCode":"\nfunc (c *OneBotChannel) Send(ctx context.Context, msg bus.OutboundMessage) ([]string, error) {\n\tif !c.IsRunning() {\n\t\treturn nil, channels.ErrNotRunning\n\t}\n\n\t// Check ctx before entering write path\n\tselect {\n\tcase <-ctx.Done():\n\t\treturn nil, ctx.Err()\n\tdefault:\n\t}\n\n\tc.mu.Lock()\n\tconn := c.conn\n\tc.mu.Unlock()\n\n\tif conn == nil {\n\t\treturn nil, fmt.Errorf(\"OneBot WebSocket not connected\")\n\t}\n\n\taction, params, err := c.buildSendRequest(msg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\techo := fmt.Sprintf(\"send_%d\", atomic.AddInt64(&c.echoCounter, 1))\n\n\treq := oneBotAPIRequest{\n\t\tAction: action,\n\t\tParams: params,\n\t\tEcho:   echo,\n\t}\n\n\tdata, err := json.Marshal(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to marshal OneBot request: %w\", err)","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/onebot/onebot.go#L398-L434","documentation":"Error \"OneBot WebSocket not connected\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/onebot/onebot.go:416 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":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}