{"record":{"id":"91689f5bc98af586","repo":"sipeed/picoclaw","slug":"deltachat-select-account-w","errorCode":null,"errorMessage":"deltachat select_account: %w","messagePattern":"deltachat select_account: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1018,"sourceCode":"\t\t}\n\t} else if c.config.Password.String() != \"\" {\n\t\tchanged, err := c.accountConfigChanged(ctx, accountID)\n\t\tif err != nil {\n\t\t\tlogger.WarnCF(\"deltachat\", \"Could not read account config; reconfiguring\", map[string]any{\n\t\t\t\t\"email\": c.config.Email,\n\t\t\t\t\"error\": err.Error(),\n\t\t\t})\n\t\t\tchanged = true\n\t\t}\n\t\tif changed {\n\t\t\tif err := c.configureAccount(ctx, accountID); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif _, err := c.rpc.call(ctx, \"select_account\", accountID); err != nil {\n\t\treturn fmt.Errorf(\"deltachat select_account: %w\", err)\n\t}\n\tif err := c.applyProfileConfig(ctx, accountID); err != nil {\n\t\treturn err\n\t}\n\t// Mark this account as a bot so the core delivers all messages to us.\n\tif _, err := c.rpc.call(ctx, \"batch_set_config\", accountID, map[string]string{\"bot\": \"1\"}); err != nil {\n\t\treturn fmt.Errorf(\"deltachat set bot config: %w\", err)\n\t}\n\tif _, err := c.rpc.call(ctx, \"start_io\", accountID); err != nil {\n\t\treturn fmt.Errorf(\"deltachat start_io: %w\", err)\n\t}\n\n\tc.accountID = accountID\n\treturn nil\n}\n\nfunc (c *DeltaChatChannel) createChatmailBootstrapAccount(ctx context.Context, server string) error {\n\traw, err := c.rpc.call(ctx, \"add_account\")","sourceCodeStart":1000,"sourceCodeEnd":1036,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1000-L1036","documentation":"Fired after account selection setup when the select_account RPC call fails. Means the Delta Chat core refused or could not switch the active account to accountID (invalid ID, core error, or transport failure), so the channel cannot operate on that account and startup aborts.","triggerScenarios":"Thrown at pkg/channels/deltachat/deltachat.go:1018 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the account ID exists via get_all_accounts before selecting","Check RPC server health and retry on transient failures","Ensure earlier add/configure steps succeeded so the ID is valid"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}