{"record":{"id":"8940182bb3419b06","repo":"larksuite/cli","slug":"bus-probe-expected-statusresponse-got-t","errorCode":null,"errorMessage":"bus probe: expected StatusResponse, got %T","messagePattern":"bus probe: expected StatusResponse, got %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/event/consume/startup.go","lineNumber":120,"sourceCode":"\t\treturn nil, err\n\t}\n\tprobe.SetDeadline(time.Now().Add(2 * time.Second))\n\tif err := protocol.Encode(probe, protocol.NewStatusQuery()); err != nil {\n\t\tprobe.Close()\n\t\treturn nil, fmt.Errorf(\"bus probe: encode: %w\", err)\n\t}\n\tbr := bufio.NewReader(probe)\n\tline, err := protocol.ReadFrame(br)\n\tprobe.Close()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bus probe: read status: %w\", err)\n\t}\n\tmsg, err := protocol.Decode(bytes.TrimRight(line, \"\\n\"))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bus probe: decode status: %w\", err)\n\t}\n\tif _, ok := msg.(*protocol.StatusResponse); !ok {\n\t\treturn nil, fmt.Errorf(\"bus probe: expected StatusResponse, got %T\", msg)\n\t}\n\n\treturn tr.Dial(addr)\n}\n\n// forkBus holds bus.fork.lock until the spawned daemon is dial-able, so concurrent callers can't race past the empty-socket gap and fork independent buses.\nfunc forkBus(tr transport.IPC, appID, profileName, domain string) (int, error) {\n\tlockPath := filepath.Join(core.GetConfigDir(), \"events\", event.SanitizeAppID(appID), \"bus.fork.lock\")\n\tif err := vfs.MkdirAll(filepath.Dir(lockPath), 0700); err != nil {\n\t\treturn 0, err\n\t}\n\n\tlock := lockfile.New(lockPath)\n\tif err := lock.TryLock(); err != nil {\n\t\treturn 0, err\n\t}\n\tdefer lock.Unlock()\n","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/event/consume/startup.go#L102-L138","documentation":"The probe handshake completed and decoded a message, but its concrete type is not *protocol.StatusResponse - something else is speaking on the bus socket, so the listener fails the health check by type, not by content.","triggerScenarios":"Thrown at internal/event/consume/startup.go:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the address belongs to the CLI event bus and no foreign process reused the socket path"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}