larksuite/cli · error
bus did not become ready within %v
Error message
bus did not become ready within %v
What it means
forkBus started the detached bus child process, but the polling loop could not dial its transport address within dialTimeout; the child PID is returned together with this error because the daemon may still be booting - or died before binding.
Source
Thrown at internal/event/consume/startup.go:164
cmd.Stdin = nil
cmd.Stdout = nil
cmd.Stderr = nil
applyDetachAttrs(cmd)
if err := cmd.Start(); err != nil {
return 0, err
}
addr := tr.Address(appID)
deadline := time.Now().Add(dialTimeout)
for time.Now().Before(deadline) {
if conn, dialErr := tr.Dial(addr); dialErr == nil {
conn.Close()
return cmd.Process.Pid, nil
}
time.Sleep(dialRetryInterval)
}
return cmd.Process.Pid, fmt.Errorf("bus did not become ready within %v", dialTimeout)
}
func buildForkArgs(profileName, domain string) []string {
args := []string{"event", "_bus", "--profile", profileName}
if domain != "" {
args = append(args, "--domain", domain)
}
return args
}
// announceForkedBus: "auto-exits 30s" must track bus.idleTimeout.
func announceForkedBus(w io.Writer, pid int) {
fmt.Fprintf(w, "[event] started bus daemon pid=%d (auto-exits 30s after last consumer)\n", pid)
}
View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Check bus logs for startup failure and app credentials
- Retry the command once the child has bound, or increase the dial timeout
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/event/consume/startup.go:164 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/517760d7d81b2dfb.
Report an issue: GitHub.