{"record":{"id":"d10a066031168626","repo":"sipeed/picoclaw","slug":"deltachat-set-profile-config-w","errorCode":null,"errorMessage":"deltachat set profile config: %w","messagePattern":"deltachat set profile config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1142,"sourceCode":"\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}\n\tif len(cfgMap) == 0 {\n\t\treturn nil\n\t}\n\tif _, err := c.rpc.call(ctx, \"batch_set_config\", accountID, cfgMap); err != nil {\n\t\treturn fmt.Errorf(\"deltachat set profile config: %w\", err)\n\t}\n\treturn nil\n}\n\n// configureAccount writes the managed account settings and runs the (network-bound)\n// provider auto-configuration.\nfunc (c *DeltaChatChannel) configureAccount(ctx context.Context, accountID int64) error {\n\tif c.config.Password.String() == \"\" {\n\t\treturn c.passwordRequiredError(\"account is not configured\")\n\t}\n\n\tcfgMap := accountConfigMap(c.config)\n\tif _, err := c.rpc.call(ctx, \"batch_set_config\", accountID, cfgMap); err != nil {\n\t\treturn fmt.Errorf(\"deltachat set account config: %w\", err)\n\t}\n\n\tlogger.InfoCF(\"deltachat\", \"Configuring account (validating credentials)\", map[string]any{\n\t\t\"email\": c.config.Email,","sourceCodeStart":1124,"sourceCodeEnd":1160,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1124-L1160","documentation":"applyProfileConfig's batch_set_config carrying displayname and/or selfavatar failed at the RPC level. This is optional cosmetic configuration: the bootstrap path already degrades it to a warning (deltachat.go:1064-1070), but the ensureAccount path (deltachat.go:1020) propagates it and stops the channel.","triggerScenarios":"c.rpc.call(ctx, \"batch_set_config\", accountID, cfgMap) errors while setting displayname or a selfavatar path that passed the fileExists check.","commonSituations":"Avatar file not readable by the server process (ownership/permissions), server mid-shutdown, avatar rejected by core (oversized/unsupported format).","solutions":["Unset or fix display_name / avatar_image settings and retry channel start","Ensure the avatar path is readable by the user running deltachat-rpc-server","Check server stderr logs for the core's rejection reason"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Skip profile keys whose files are not readable by the server user\nif cfg.AvatarImage != \"\" && !fileReadableByServiceUser(cfg.AvatarImage) {\n    cfg.AvatarImage = \"\" // leave avatar unchanged instead of failing\n}","typeGuard":null,"tryCatchPattern":"if profileErr := c.applyProfileConfig(ctx, accountID); profileErr != nil {\n    // cosmetic only: log and continue, as the bootstrap path already does\n    logger.WarnCF(\"deltachat\", \"profile config skipped\", map[string]any{\"error\": profileErr.Error()})\n}","preventionTips":["Verify avatar_image paths are readable by the deltachat-rpc-server user","Treat display name/avatar failures as non-fatal in channel start logic"],"tags":["deltachat","profile","rpc","config","go"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}