sipeed/picoclaw · error

deltachat created account on %s, but generated email is empt

Error message

deltachat created account on %s, but generated email is empty

What it means

get_config("addr") succeeded but returned null or a whitespace-only string although add_transport_from_qr reported success: getAccountConfigString maps a nil *string to "" and the TrimSpace check at deltachat.go:1077 rejects it. The core never assigned an address, so bootstrap cannot report which email was allocated.

Source

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

		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
	}
	stopCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
	_, _ = c.rpc.call(stopCtx, "stop_ongoing_process", accountID)
	cancel()

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Upgrade deltachat-rpc-server to a version whose add_transport_from_qr synchronously persists addr
  2. Check the account db under data_dir: if addr is actually there, pin it in config and drop the '@server' marker
  3. Otherwise remove the dangling account (get_all_accounts + remove_account) and re-run the bootstrap
Defensive patterns

Strategy: try-catch

Try / catch

if err := ch.ensureAccount(ctx); err != nil {
    if strings.Contains(err.Error(), "generated email is empty") {
        // inspect the account db / re-run bootstrap after removing the dangling account
    }
    return err
}

Prevention

When it happens

Trigger: The fresh account's addr config is nil or empty: registration did not fully stick, or the core version sets addr asynchronously after add_transport_from_qr returns.

Common situations: Version skew in deltachat-rpc-server/deltachat-core where addr is committed later than this client assumes; data_dir permission problems silently dropping the config write.

Related errors


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