{"record":{"id":"8f1b73218c3aa281","repo":"sipeed/picoclaw","slug":"deltachat-created-account-on-s-but-generated-ema","errorCode":null,"errorMessage":"deltachat created account on %s, but generated email is empty","messagePattern":"deltachat created account on (.+?), but generated email is empty","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1078,"sourceCode":"\t\treturn fmt.Errorf(\"deltachat create chatmail account on %s: %w\", server, callErr)\n\t}\n\tcreated = true\n\n\tif profileErr := c.applyProfileConfig(ctx, accountID); profileErr != nil {\n\t\tlogger.WarnCF(\n\t\t\t\"deltachat\",\n\t\t\t\"Could not apply profile config to new account\",\n\t\t\tmap[string]any{\"error\": profileErr.Error()},\n\t\t)\n\t}\n\n\taddr, err := c.getAccountConfigString(ctx, accountID, \"addr\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"deltachat created account on %s, but could not read generated email: %w\", server, err)\n\t}\n\taddr = strings.TrimSpace(addr)\n\tif addr == \"\" {\n\t\treturn fmt.Errorf(\"deltachat created account on %s, but generated email is empty\", server)\n\t}\n\n\treturn fmt.Errorf(\n\t\t\"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\",\n\t\taddr,\n\t\tserver,\n\t\tc.config.Email,\n\t\taddr,\n\t)\n}\n\nfunc (c *DeltaChatChannel) cleanupPendingAccount(ctx context.Context, accountID int64) {\n\tif accountID <= 0 || c.rpc == nil {\n\t\treturn\n\t}\n\tstopCtx, cancel := context.WithTimeout(ctx, 10*time.Second)\n\t_, _ = c.rpc.call(stopCtx, \"stop_ongoing_process\", accountID)\n\tcancel()","sourceCodeStart":1060,"sourceCodeEnd":1096,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1060-L1096","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Upgrade deltachat-rpc-server to a version whose add_transport_from_qr synchronously persists addr","Check the account db under data_dir: if addr is actually there, pin it in config and drop the '@server' marker","Otherwise remove the dangling account (get_all_accounts + remove_account) and re-run the bootstrap"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := ch.ensureAccount(ctx); err != nil {\n    if strings.Contains(err.Error(), \"generated email is empty\") {\n        // inspect the account db / re-run bootstrap after removing the dangling account\n    }\n    return err\n}","preventionTips":["Pin a deltachat-rpc-server version where addr is set synchronously after add_transport_from_qr","Ensure data_dir permissions let the core persist config writes"],"tags":["deltachat","chatmail","account","rpc","go"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}