{"record":{"id":"be9999d0580d3339","repo":"sipeed/picoclaw","slug":"deltachat-account-s-is-not-configured-in-data-di","errorCode":null,"errorMessage":"deltachat: account %s is not configured in data_dir %s (%s)","messagePattern":"deltachat: account (.+?) is not configured in data_dir (.+?) \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1119,"sourceCode":"}\n\nfunc (c *DeltaChatChannel) getAccountConfigString(ctx context.Context, accountID int64, key string) (string, error) {\n\traw, err := c.rpc.call(ctx, \"get_config\", accountID, key)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"get config %s: %w\", key, err)\n\t}\n\tvar value *string\n\tif err := json.Unmarshal(raw, &value); err != nil {\n\t\treturn \"\", fmt.Errorf(\"decode config %s: %w\", key, err)\n\t}\n\tif value == nil {\n\t\treturn \"\", nil\n\t}\n\treturn *value, nil\n}\n\nfunc (c *DeltaChatChannel) passwordRequiredError(reason string) error {\n\treturn fmt.Errorf(\"deltachat: account %s is not configured in data_dir %s (%s)\",\n\t\tc.config.Email, c.dataDir, reason)\n}\n\nfunc (c *DeltaChatChannel) applyProfileConfig(ctx context.Context, accountID int64) error {\n\tcfgMap := map[string]*string{}\n\tif name := strings.TrimSpace(c.config.DisplayName); name != \"\" {\n\t\tcfgMap[\"displayname\"] = accountConfigString(name)\n\t}\n\tif avatar := strings.TrimSpace(c.config.AvatarImage); avatar != \"\" {\n\t\tavatar = expandHome(avatar)\n\t\tif !fileExists(avatar) {\n\t\t\tlogger.WarnCF(\"deltachat\", \"avatar_image not found; leaving current avatar unchanged\", map[string]any{\n\t\t\t\t\"avatar_image\": avatar,\n\t\t\t})\n\t\t} else {\n\t\t\tcfgMap[\"selfavatar\"] = accountConfigString(avatar)\n\t\t}\n\t}","sourceCodeStart":1101,"sourceCodeEnd":1137,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1101-L1137","documentation":"passwordRequiredError: the email setting is a normal address (no '@server' marker), no already-Configured account with that addr exists in data_dir, and no password is set to create one (reason 'account not found'); or configureAccount ran against an unconfigured account with an empty password ('account is not configured'). Delta Chat accounts need IMAP credentials, and PicoClaw will not invent them.","triggerScenarios":"ensureAccount with c.config.Password empty and get_all_accounts showing no Configured account matching the email; or configureAccount reached with an empty Password.","commonSituations":"First run on a fresh data_dir with a plain email and no password in config; password removed/emptied later; data_dir pointing somewhere that does not contain the existing account database.","solutions":["Set channel_list.deltachat.settings.password (or the secret/env it references)","For chatmail providers, switch email to '@server' once, complete the bootstrap, then pin the generated address","Verify data_dir actually holds your account db so the existing account is found"],"exampleFix":"# before (channel_list config)\nemail: \"bot@example.org\"\n# no password\n\n# after\nemail: \"bot@example.org\"\npassword: \"app-specific-password\"","handlingStrategy":"validation","validationCode":"// Before enabling the channel\nif cfg.Password == \"\" && !strings.HasPrefix(strings.TrimSpace(cfg.Email), \"@\") {\n    return fmt.Errorf(\"deltachat: set a password or use the @server chatmail bootstrap for %s\", cfg.Email)\n}","typeGuard":null,"tryCatchPattern":"if err := ch.ensureAccount(ctx); err != nil {\n    if strings.Contains(err.Error(), \"is not configured in data_dir\") {\n        // config problem: add password or fix data_dir, not a code problem\n    }\n    return err\n}","preventionTips":["Always set password (or use '@server' bootstrap) before first start","Point data_dir at the same location across restarts so existing accounts are found"],"tags":["deltachat","config","credentials","account","go"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}