sipeed/picoclaw · error

deltachat set bot config

Error message

deltachat set bot config: %w

What it means

Fired when the batch_set_config RPC that sets the 'bot' flag to 1 fails. This flag tells Delta Chat core to deliver all messages to the bot; if setting it fails, the account would run unconfigured as a bot, so startup is aborted with this wrapped error.

Solutions

  1. Retry the config call; transient RPC failures can occur right after start
  2. Confirm the account was selected successfully before configuring
  3. Inspect the core logs for config-write permission problems
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at pkg/channels/deltachat/deltachat.go:1025 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/f8d05f04cae0a974. Report an issue: GitHub.

Appendix: source

Thrown at pkg/channels/deltachat/deltachat.go:1025

			})
			changed = true
		}
		if changed {
			if err := c.configureAccount(ctx, accountID); err != nil {
				return err
			}
		}
	}

	if _, err := c.rpc.call(ctx, "select_account", accountID); err != nil {
		return fmt.Errorf("deltachat select_account: %w", err)
	}
	if err := c.applyProfileConfig(ctx, accountID); err != nil {
		return err
	}
	// Mark this account as a bot so the core delivers all messages to us.
	if _, err := c.rpc.call(ctx, "batch_set_config", accountID, map[string]string{"bot": "1"}); err != nil {
		return fmt.Errorf("deltachat set bot config: %w", err)
	}
	if _, err := c.rpc.call(ctx, "start_io", accountID); err != nil {
		return fmt.Errorf("deltachat start_io: %w", err)
	}

	c.accountID = accountID
	return nil
}

func (c *DeltaChatChannel) createChatmailBootstrapAccount(ctx context.Context, server string) error {
	raw, err := c.rpc.call(ctx, "add_account")
	if err != nil {
		return fmt.Errorf("deltachat add_account: %w", err)
	}
	var accountID int64
	if decodeErr := json.Unmarshal(raw, &accountID); decodeErr != nil {
		return fmt.Errorf("deltachat add_account decode: %w", decodeErr)
	}

View on GitHub (pinned to 49183d7e8d)