sipeed/picoclaw · error
deltachat set account config: %w
Error message
deltachat set account config: %w
What it means
configureAccount's batch_set_config writing the managed settings (addr, mail_server/mail_port, send_server/send_port, mail_pw from accountConfigMap) failed at the transport level, before any credential validation happened.
Source
Thrown at pkg/channels/deltachat/deltachat.go:1156
if len(cfgMap) == 0 {
return nil
}
if _, err := c.rpc.call(ctx, "batch_set_config", accountID, cfgMap); err != nil {
return fmt.Errorf("deltachat set profile config: %w", err)
}
return nil
}
// configureAccount writes the managed account settings and runs the (network-bound)
// provider auto-configuration.
func (c *DeltaChatChannel) configureAccount(ctx context.Context, accountID int64) error {
if c.config.Password.String() == "" {
return c.passwordRequiredError("account is not configured")
}
cfgMap := accountConfigMap(c.config)
if _, err := c.rpc.call(ctx, "batch_set_config", accountID, cfgMap); err != nil {
return fmt.Errorf("deltachat set account config: %w", err)
}
logger.InfoCF("deltachat", "Configuring account (validating credentials)", map[string]any{
"email": c.config.Email,
})
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 {View on GitHub (pinned to 49183d7e8d)
Solutions
- Check RPC server liveness (get_system_info) and its stderr logs
- Verify data_dir is writable and not full
- Restart PicoClaw to respawn the server and retry configuration
Defensive patterns
Strategy: try-catch
Try / catch
if _, err := c.rpc.call(ctx, "batch_set_config", accountID, cfgMap); err != nil {
if strings.Contains(err.Error(), "rpc closed") {
// respawn server, then restart ensureAccount from listAccounts
}
return fmt.Errorf("deltachat set account config: %w", err)
} Prevention
- Keep data_dir writable and monitored for space
- Restart the whole channel on transport-level batch_set_config failures rather than retrying one key
When it happens
Trigger: c.rpc.call(ctx, "batch_set_config", accountID, cfgMap) returns an error: dead/closed RPC connection, canceled context, or a server-side JSON-RPC error.
Common situations: deltachat-rpc-server crashed between account discovery and configuration; data_dir became unwritable; shutdown race.
Related errors
- deltachat created account on %s, but could not read generate
- deltachat created account on %s, but generated email is empt
- get config %s: %w
- deltachat: account %s is not configured in data_dir %s (%s)
- deltachat set profile config: %w
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/2d487e92db60066d.
Report an issue: GitHub.