{"record":{"id":"73655bbb613efaa3","repo":"sipeed/picoclaw","slug":"deltachat-deltachat-rpc-server-not-found-on-path","errorCode":null,"errorMessage":"deltachat: deltachat-rpc-server not found on PATH (set rpc_server_path to the binary path if it is installed elsewhere)","messagePattern":"deltachat: deltachat-rpc-server not found on PATH \\(set rpc_server_path to the binary path if it is installed elsewhere\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1282,"sourceCode":"\tchatRaw, err := c.rpc.call(ctx, \"secure_join\", c.accountID, link)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar chatID int64\n\tif err := json.Unmarshal(chatRaw, &chatID); err == nil && chatID > 0 {\n\t\t_, _ = c.rpc.call(ctx, \"accept_chat\", c.accountID, chatID)\n\t\tlogger.InfoCF(\"deltachat\", \"Joined invite chat\", map[string]any{\"chat_id\": chatID})\n\t}\n\treturn nil\n}\n\n// resolveServerPath validates the configured deltachat-rpc-server path, or\n// falls back to deltachat-rpc-server on PATH.\nfunc resolveServerPath(configured string) (string, error) {\n\tif configured == \"\" {\n\t\tp, err := exec.LookPath(\"deltachat-rpc-server\")\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"deltachat: deltachat-rpc-server not found on PATH \" +\n\t\t\t\t\"(set rpc_server_path to the binary path if it is installed elsewhere)\")\n\t\t}\n\t\treturn p, nil\n\t}\n\tp := expandHome(configured)\n\tif !fileExists(p) {\n\t\treturn \"\", fmt.Errorf(\"deltachat: rpc_server_path %q not found\", p)\n\t}\n\treturn p, nil\n}\n\n// resolveDataDir picks where the account database lives.\nfunc resolveDataDir(configured, channelName string) string {\n\tif configured != \"\" {\n\t\treturn expandHome(configured)\n\t}\n\thome, err := os.UserHomeDir()\n\tif err != nil {","sourceCodeStart":1264,"sourceCodeEnd":1300,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1264-L1300","documentation":"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.","triggerScenarios":"Channel start with no rpc_server_path setting and the binary absent from the process PATH (LookPath returns exec.ErrNotFound).","commonSituations":"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.","solutions":["Install deltachat-rpc-server (official release binary, `cargo install deltachat-rpc-server`, or a distro package)","Or set channel_list.deltachat.settings.rpc_server_path to the absolute binary path","For service units, add the install directory to PATH or always use the absolute-path setting","Verify with `command -v deltachat-rpc-server` under the same user/env PicoClaw runs as"],"exampleFix":"# channel_list config\n# before: rpc_server_path unset and binary not on PATH\n\n# after\nrpc_server_path: \"/usr/local/bin/deltachat-rpc-server\"","handlingStrategy":"validation","validationCode":"// Before enabling the deltachat channel\nif _, err := exec.LookPath(\"deltachat-rpc-server\"); err != nil {\n    // either install it, or require rpc_server_path to be set in channel_list.deltachat.settings\n    return fmt.Errorf(\"install deltachat-rpc-server or set rpc_server_path\")\n}","typeGuard":null,"tryCatchPattern":"if err := ch.Start(ctx); err != nil {\n    if strings.Contains(err.Error(), \"deltachat-rpc-server not found on PATH\") {\n        // environment problem: install the binary or set rpc_server_path, not a code bug\n    }\n    return err\n}","preventionTips":["Bake deltachat-rpc-server into the container image / install docs","For systemd services, set rpc_server_path absolutely instead of relying on PATH","Add a startup check `command -v deltachat-rpc-server` in deployment scripts"],"tags":["deltachat","installation","path","config","go"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}