sipeed/picoclaw · warning
deltachat get config %s decode: %w
Error message
deltachat get config %s decode: %w
What it means
accountConfigChanged could not decode one managed key (managedAccountConfigKeys: addr, mail_server, mail_port, send_server, send_port, mail_pw) from JSON into *string. The direct caller degrades gracefully: deltachat.go:1002-1009 logs a warning and forces reconfiguration.
Source
Thrown at pkg/channels/deltachat/deltachat.go:1179
})
confCtx, cancel := context.WithTimeout(ctx, configureTimeout)
defer cancel()
if _, err := c.rpc.call(confCtx, "configure", accountID); err != nil {
return fmt.Errorf("deltachat configure (check email/password/server): %w", err)
}
return nil
}
func (c *DeltaChatChannel) accountConfigChanged(ctx context.Context, accountID int64) (bool, error) {
want := accountConfigMap(c.config)
for _, key := range managedAccountConfigKeys {
raw, err := c.rpc.call(ctx, "get_config", accountID, key)
if err != nil {
return false, fmt.Errorf("deltachat get config %s: %w", key, err)
}
var got *string
if err := json.Unmarshal(raw, &got); err != nil {
return false, fmt.Errorf("deltachat get config %s decode: %w", key, err)
}
if !accountConfigValueEqual(got, want[key]) {
logger.InfoCF("deltachat", "Account config changed; reconfiguring", map[string]any{
"email": c.config.Email,
"key": key,
})
return true, nil
}
}
return false, nil
}
func accountConfigValueEqual(got, want *string) bool {
if want == nil {
return got == nil || *got == ""
}
if got == nil {
return *want == ""View on GitHub (pinned to 49183d7e8d)
Solutions
- Pin a deltachat-rpc-server version matching this client's assumptions
- Log the raw response for the offending key to confirm the shape
- Rely on the automatic reconfigure fallback and correct the mismatch in config if it loops
Defensive patterns
Strategy: fallback
Try / catch
changed, err := c.accountConfigChanged(ctx, accountID)
if err != nil {
// mirror deltachat.go:1002-1009: degrade to forced reconfigure instead of failing
logger.WarnCF("deltachat", "config check failed; reconfiguring", map[string]any{"error": err.Error()})
changed = true
}
if changed {
return c.configureAccount(ctx, accountID)
} Prevention
- Pin deltachat-rpc-server versions across the fleet to avoid schema drift
- Treat decode failures in the config-diff path as 'changed' so the account self-heals
When it happens
Trigger: json.Unmarshal(raw, &got) fails because get_config returned a non-string JSON value (number/object) for a managed key.
Common situations: Version skew where a deltachat-core release encodes ports as numbers or changes value shapes.
Related errors
- decode config %s: %w
- deltachat get_all_accounts decode: %w
- deltachat is_configured decode: %w
- decode process hook %q %s result: %w
- deltachat create chatmail account on %s: %w
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/b38d81c92b054db7.
Report an issue: GitHub.