chenhg5/cc-connect · error
cloud_web: register rejected
Error message
cloud_web: register rejected
What it means
Same rejection path as 1012 but the server sent ok=false with an empty Error field, so no remote reason is available. parseRegisterAck returns this generic 'register rejected' error and closes the connection. It means the cloud-web hub refused registration without explaining why.
Source
Thrown at platform/cloud-web/protocol.go:206
Metadata: map[string]any{
"protocol_version": protocolVersion,
},
}
}
func parseRegisterAck(raw []byte) (map[string]bool, error) {
var ack wireRegisterAck
if err := json.Unmarshal(raw, &ack); err != nil {
return nil, fmt.Errorf("cloud_web: parse register_ack: %w", err)
}
if ack.Type != "register_ack" {
return nil, fmt.Errorf("cloud_web: expected register_ack, got %q", ack.Type)
}
if !ack.OK {
if ack.Error != "" {
return nil, fmt.Errorf("cloud_web: register rejected: %s", ack.Error)
}
return nil, fmt.Errorf("cloud_web: register rejected")
}
if len(ack.Capabilities) == 0 {
return defaultCapabilities(), nil
}
return capabilitySet(ack.Capabilities), nil
}
func decodeImages(items []wireImage) []core.ImageAttachment {
var out []core.ImageAttachment
for _, img := range items {
data, err := base64.StdEncoding.DecodeString(img.Data)
if err != nil {
slog.Debug("cloud_web: invalid image base64", "error", err)
continue
}
out = append(out, core.ImageAttachment{
MimeType: img.MimeType,
Data: data,View on GitHub (pinned to 4000b2338a)
Solutions
- Check the cloud-web server logs for the rejection reason at the time of connection
- Regenerate/refresh the auth token in config
- Confirm the client's agent id is registered/allowed on the hub
- Upgrade server so register_ack rejections include an error message for diagnosability
Example fix
// before (server)
ack{Type:"register_ack", OK:false}
// after (server, include reason)
ack{Type:"register_ack", OK:false, Error:"invalid token for agent " + agentID} Defensive patterns
Strategy: fallback
Try / catch
// No reason available: fall back to server logs and capped retries
if err := register(ctx); err != nil {
if strings.Contains(err.Error(), "cloud_web: register rejected") {
slog.Error("cloud-web rejected registration without reason; check server logs")
return backoff.AndRetry(ctx, register, maxAttempts)
}
} Prevention
- Upgrade the server so rejections always include an error message
- Cross-check server logs whenever you see the reason-less variant
- Validate tokens and client ids against the hub before deployment
- Monitor registration failure rates to catch policy changes
When it happens
Trigger: Server responds {"type":"register_ack","ok":false} with no error text — rejection with no diagnostic detail.
Common situations: Older server versions that don't populate the error field; server policy refusal (banned client, invalid token) that doesn't disclose reasons; auth middleware rejecting at hub level without a message.
Related errors
- cloud_web: register rejected: %s
- cloud_web: register HTTP %d: %s
- cloud_web: register HTTP %d: %s
- cloud_web: token is required
- cloud_web: ws_url or base_url is required for websocket tran
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/9d1092a759ee9eae.
Report an issue: GitHub.