{"record":{"id":"d720121bd1daedcb","repo":"sipeed/picoclaw","slug":"deltachat-created-account-on-s-but-could-not-rea","errorCode":null,"errorMessage":"deltachat created account on %s, but could not read generated email: %w","messagePattern":"deltachat created account on (.+?), but could not read generated email: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1074,"sourceCode":"\t\t\"add_transport_from_qr\",\n\t\taccountID,\n\t\tbuildChatmailAccountQR(server),\n\t); callErr != nil {\n\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","sourceCodeStart":1056,"sourceCodeEnd":1092,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1056-L1092","documentation":"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.","triggerScenarios":"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.","commonSituations":"deltachat-rpc-server crashing immediately after registration (OOM, corrupted fresh database), PicoClaw shutting down mid-bootstrap, or disk full under DC_ACCOUNTS_PATH.","solutions":["Check server stderr logs and disk space on the data_dir","Run get_all_accounts against the same data_dir: the created account persists and its addr can be read manually","Pin that addr in config (email setting) and drop the '@server' marker to skip bootstrap on the next run","If no account survived, re-run the bootstrap from scratch"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := ch.ensureAccount(ctx); err != nil {\n    if strings.Contains(err.Error(), \"could not read generated email\") {\n        // account exists: list accounts on the same data_dir to recover the addr\n    }\n    return err\n}","preventionTips":["Keep the RPC child healthy: writable, non-full data_dir and enough memory","Avoid canceling the parent context while a bootstrap registration is in flight"],"tags":["deltachat","chatmail","rpc","account","go"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}