chenhg5/cc-connect · error
wps-agentspace: failed to decrypt wps_sid: %w
Error message
wps-agentspace: failed to decrypt wps_sid: %w
What it means
Start could not decrypt the stored wps_sid with decryptWpsSid(wpsSid, appID) — the sid is persisted in encrypted form (auto-saved after auto-login) and decryption failed, meaning the value is not valid ciphertext for the current app_id (wrong app, corrupted entry, or a plaintext sid passed where encrypted was expected).
Source
Thrown at platform/wps-agentspace/wpsagentspace.go:182
}
// Name returns the platform identifier.
func (p *Platform) Name() string {
return "wps-agentspace"
}
// Start initializes the WebSocket connection and begins message processing.
func (p *Platform) Start(handler core.MessageHandler) error {
p.handler = handler
p.writeCh = make(chan any, 64)
if p.wpsSid == "" {
return fmt.Errorf("wps-agentspace: wps_sid is required")
}
decryptedSid, err := decryptWpsSid(p.wpsSid, p.appID)
if err != nil {
return fmt.Errorf("wps-agentspace: failed to decrypt wps_sid: %w", err)
}
p.wpsSid = decryptedSid
slog.Info("wps-agentspace: token loaded", "length", len(p.wpsSid), "has_colons", strings.Contains(p.wpsSid, ":"))
if p.deviceUuid == "" {
p.deviceUuid = generateUUID()
}
ctx, cancel := context.WithCancel(context.Background())
p.cancel = cancel
go p.connectLoop(ctx)
return nil
}
// Reply sends a reply to a specific message.
func (p *Platform) Reply(ctx context.Context, replyCtx any, content string) error {
rc, ok := replyCtx.(*replyContext)View on GitHub (pinned to 4000b2338a)
Solutions
- Ensure the app_id used at decryption matches the one used when the encrypted wps_sid was saved
- Re-run auto-login or paste a fresh encrypted sid to replace a corrupted stored value
- If passing a plaintext sid, use the config path that skips decryption
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at platform/wps-agentspace/wpsagentspace.go:182 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/b6feead86e25a30b.
Report an issue: GitHub.