sipeed/picoclaw · error

deltachat is_configured: %w

Error message

deltachat is_configured: %w

What it means

isConfigured's JSON-RPC call 'is_configured' failed at transport/server level. This is distinct from the account simply being unconfigured (which returns false, not an error): here the question could not be asked.

Source

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

	return accountConfigString(strconv.Itoa(value))
}

func (c *DeltaChatChannel) listAccounts(ctx context.Context) ([]dcAccount, error) {
	raw, err := c.rpc.call(ctx, "get_all_accounts")
	if err != nil {
		return nil, fmt.Errorf("deltachat get_all_accounts: %w", err)
	}
	var accounts []dcAccount
	if err := json.Unmarshal(raw, &accounts); err != nil {
		return nil, fmt.Errorf("deltachat get_all_accounts decode: %w", err)
	}
	return accounts, nil
}

func (c *DeltaChatChannel) isConfigured(ctx context.Context, accountID int64) (bool, error) {
	raw, err := c.rpc.call(ctx, "is_configured", accountID)
	if err != nil {
		return false, fmt.Errorf("deltachat is_configured: %w", err)
	}
	var ok bool
	if err := json.Unmarshal(raw, &ok); err != nil {
		return false, fmt.Errorf("deltachat is_configured decode: %w", err)
	}
	return ok, nil
}

// joinInviteLink optionally joins a chat via a configured invite/QR link.
func (c *DeltaChatChannel) joinInviteLink(ctx context.Context) error {
	link := strings.TrimSpace(c.config.InviteLink)
	if link == "" {
		return nil
	}
	chatRaw, err := c.rpc.call(ctx, "secure_join", c.accountID, link)
	if err != nil {
		return err
	}

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Re-check the account exists via get_all_accounts
  2. Probe server liveness with get_system_info
  3. Restart the channel/PicoClaw to re-run ensureAccount from scratch
Defensive patterns

Strategy: try-catch

Try / catch

ok, err := c.isConfigured(ctx, accountID)
if err != nil {
    // distinguish 'could not ask' from 'not configured': only the latter should trigger configureAccount
    return false, fmt.Errorf("deltachat is_configured: %w", err)
}

Prevention

When it happens

Trigger: c.rpc.call(ctx, "is_configured", accountID) errors: dead server, closed connection, canceled ctx, or a stale accountID the core rejects.

Common situations: Account removed out-of-band between listAccounts and this call; RPC child crash mid-startup.

Related errors


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