sipeed/picoclaw · error
deltachat get_all_accounts: %w
Error message
deltachat get_all_accounts: %w
What it means
listAccounts' get_all_accounts JSON-RPC call failed at the transport level: server error, closed stdio ('deltachat rpc: connection closed' / 'rpc closed: ...'), or canceled context. It runs at the top of ensureAccount, so this usually means the RPC child is unhealthy.
Source
Thrown at pkg/channels/deltachat/deltachat.go:1237
func accountConfigOptionalString(value string) *string {
if value == "" {
return nil
}
return accountConfigString(value)
}
func accountConfigOptionalInt(value int) *string {
if value <= 0 {
return nil
}
return accountConfigString(strconv.Itoa(value))
}
func (c *DeltaChatChannel) listAccounts(ctx context.Context) ([]dcAccount, error) {
raw, err := c.rpc.call(ctx, "get_all_accounts")
if err != nil {
return nil, fmt.Errorf("deltachat get_all_accounts: %w", err)
}
var accounts []dcAccount
if err := json.Unmarshal(raw, &accounts); err != nil {
return nil, fmt.Errorf("deltachat get_all_accounts decode: %w", err)
}
return accounts, nil
}
func (c *DeltaChatChannel) isConfigured(ctx context.Context, accountID int64) (bool, error) {
raw, err := c.rpc.call(ctx, "is_configured", accountID)
if err != nil {
return false, fmt.Errorf("deltachat is_configured: %w", err)
}
var ok bool
if err := json.Unmarshal(raw, &ok); err != nil {
return false, fmt.Errorf("deltachat is_configured decode: %w", err)
}
return ok, nilView on GitHub (pinned to 49183d7e8d)
Solutions
- Check the server's stderr in PicoClaw debug logs for its exit reason
- Verify data_dir exists and is writable by the service user
- Restart PicoClaw so startRPC respawns the child
Defensive patterns
Strategy: try-catch
Try / catch
accounts, err := c.listAccounts(ctx)
if err != nil {
if strings.Contains(err.Error(), "rpc closed") || strings.Contains(err.Error(), "connection closed") {
// child is dead: restart channel to respawn deltachat-rpc-server
}
return nil, err
} Prevention
- Ensure DC_ACCOUNTS_PATH/data_dir is writable before channel start
- Check server stderr (debug logs) whenever get_all_accounts fails at startup
When it happens
Trigger: c.rpc.call(ctx, "get_all_accounts") errors because the child died at startup or the ctx is already canceled.
Common situations: deltachat-rpc-server exiting immediately (unreadable DC_ACCOUNTS_PATH, bad arch binary starting then crashing), PicoClaw shutting down.
Related errors
- deltachat created account on %s, but could not read generate
- deltachat created account on %s, but generated email is empt
- deltachat set account config: %w
- deltachat is_configured: %w
- deltachat create chatmail account on %s: %w
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/9d33630bd591f47d.
Report an issue: GitHub.