sipeed/picoclaw · error

deltachat created account on %s, but could not read generate

Error message

deltachat created account on %s, but could not read generated email: %w

What it means

The chatmail account WAS created (add_transport_from_qr succeeded, created=true so the cleanup defer does not fire), but the follow-up get_config("addr") call to read the generated address failed. This is a secondary transport failure between two successful-state RPC calls, wrapped from getAccountConfigString.

Source

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

		"add_transport_from_qr",
		accountID,
		buildChatmailAccountQR(server),
	); callErr != nil {
		return fmt.Errorf("deltachat create chatmail account on %s: %w", server, callErr)
	}
	created = true

	if profileErr := c.applyProfileConfig(ctx, accountID); profileErr != nil {
		logger.WarnCF(
			"deltachat",
			"Could not apply profile config to new account",
			map[string]any{"error": profileErr.Error()},
		)
	}

	addr, err := c.getAccountConfigString(ctx, accountID, "addr")
	if err != nil {
		return fmt.Errorf("deltachat created account on %s, but could not read generated email: %w", server, err)
	}
	addr = strings.TrimSpace(addr)
	if addr == "" {
		return fmt.Errorf("deltachat created account on %s, but generated email is empty", server)
	}

	return fmt.Errorf(
		"deltachat: created chatmail account %q on %s. Update channel_list.deltachat.settings.email from %q to %q, remove the @server bootstrap marker, then run PicoClaw again to use the account",
		addr,
		server,
		c.config.Email,
		addr,
	)
}

func (c *DeltaChatChannel) cleanupPendingAccount(ctx context.Context, accountID int64) {
	if accountID <= 0 || c.rpc == nil {
		return

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Check server stderr logs and disk space on the data_dir
  2. Run get_all_accounts against the same data_dir: the created account persists and its addr can be read manually
  3. Pin that addr in config (email setting) and drop the '@server' marker to skip bootstrap on the next run
  4. If no account survived, re-run the bootstrap from scratch
Defensive patterns

Strategy: try-catch

Try / catch

if err := ch.ensureAccount(ctx); err != nil {
    if strings.Contains(err.Error(), "could not read generated email") {
        // account exists: list accounts on the same data_dir to recover the addr
    }
    return err
}

Prevention

When it happens

Trigger: getAccountConfigString(ctx, accountID, "addr") errors right after successful registration: the RPC connection closed ('rpc closed: EOF' from failAll), the parent ctx was canceled during shutdown, or the server returned a JSON-RPC error for get_config.

Common situations: deltachat-rpc-server crashing immediately after registration (OOM, corrupted fresh database), PicoClaw shutting down mid-bootstrap, or disk full under DC_ACCOUNTS_PATH.

Related errors


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