sipeed/picoclaw · critical

deltachat: deltachat-rpc-server not found on PATH (set rpc_s

Error message

deltachat: deltachat-rpc-server not found on PATH (set rpc_server_path to the binary path if it is installed elsewhere)

What it means

resolveServerPath found rpc_server_path empty and exec.LookPath("deltachat-rpc-server") failed: the Delta Chat JSON-RPC server binary is neither installed nor on PATH. The channel cannot start at all, because every account/chat operation is proxied through this child process over stdio JSON-RPC.

Source

Thrown at pkg/channels/deltachat/deltachat.go:1282

	chatRaw, err := c.rpc.call(ctx, "secure_join", c.accountID, link)
	if err != nil {
		return err
	}
	var chatID int64
	if err := json.Unmarshal(chatRaw, &chatID); err == nil && chatID > 0 {
		_, _ = c.rpc.call(ctx, "accept_chat", c.accountID, chatID)
		logger.InfoCF("deltachat", "Joined invite chat", map[string]any{"chat_id": chatID})
	}
	return nil
}

// resolveServerPath validates the configured deltachat-rpc-server path, or
// falls back to deltachat-rpc-server on PATH.
func resolveServerPath(configured string) (string, error) {
	if configured == "" {
		p, err := exec.LookPath("deltachat-rpc-server")
		if err != nil {
			return "", fmt.Errorf("deltachat: deltachat-rpc-server not found on PATH " +
				"(set rpc_server_path to the binary path if it is installed elsewhere)")
		}
		return p, nil
	}
	p := expandHome(configured)
	if !fileExists(p) {
		return "", fmt.Errorf("deltachat: rpc_server_path %q not found", p)
	}
	return p, nil
}

// resolveDataDir picks where the account database lives.
func resolveDataDir(configured, channelName string) string {
	if configured != "" {
		return expandHome(configured)
	}
	home, err := os.UserHomeDir()
	if err != nil {

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Install deltachat-rpc-server (official release binary, `cargo install deltachat-rpc-server`, or a distro package)
  2. Or set channel_list.deltachat.settings.rpc_server_path to the absolute binary path
  3. For service units, add the install directory to PATH or always use the absolute-path setting
  4. Verify with `command -v deltachat-rpc-server` under the same user/env PicoClaw runs as

Example fix

# channel_list config
# before: rpc_server_path unset and binary not on PATH

# after
rpc_server_path: "/usr/local/bin/deltachat-rpc-server"
Defensive patterns

Strategy: validation

Validate before calling

// Before enabling the deltachat channel
if _, err := exec.LookPath("deltachat-rpc-server"); err != nil {
    // either install it, or require rpc_server_path to be set in channel_list.deltachat.settings
    return fmt.Errorf("install deltachat-rpc-server or set rpc_server_path")
}

Try / catch

if err := ch.Start(ctx); err != nil {
    if strings.Contains(err.Error(), "deltachat-rpc-server not found on PATH") {
        // environment problem: install the binary or set rpc_server_path, not a code bug
    }
    return err
}

Prevention

When it happens

Trigger: Channel start with no rpc_server_path setting and the binary absent from the process PATH (LookPath returns exec.ErrNotFound).

Common situations: Fresh host; binary installed via cargo into ~/.cargo/bin which is not on the systemd service's PATH; Docker image built without the package; PATH stripped in a restricted service unit.

Related errors


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/73655bbb613efaa3. Report an issue: GitHub.