{"record":{"id":"622c745a6074293c","repo":"sipeed/picoclaw","slug":"deltachat-rpc-server-path-q-not-found","errorCode":null,"errorMessage":"deltachat: rpc_server_path %q not found","messagePattern":"deltachat: rpc_server_path %q not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1289,"sourceCode":"\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 {\n\t\thome = \".\"\n\t}\n\tname := channelName\n\tif name == \"\" {\n\t\tname = config.ChannelDeltaChat\n\t}\n\treturn filepath.Join(home, \".picoclaw\", \"deltachat\", name)","sourceCodeStart":1271,"sourceCodeEnd":1307,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1271-L1307","documentation":"rpc_server_path was provided but after ~-expansion (expandHome) the file does not exist (fileExists/os.Stat failed). The configured path is treated as authoritative, so no PATH fallback occurs.","triggerScenarios":"resolveServerPath(configured) with a typo'd path, a moved binary, or a '~' that expands to a different home than expected.","commonSituations":"Home-relative path set for user A but PicoClaw runs as user B; binary path changed after an upgrade; leading quote/space in the YAML value.","solutions":["Correct rpc_server_path to the verified absolute path (`readlink -f $(which deltachat-rpc-server)`)","Ensure the file is readable and executable by the service user","Confirm with `ls -l <path>` under the same user"],"exampleFix":"# before\nrpc_server_path: \"~/bin/dc-server\"\n\n# after\nrpc_server_path: \"/home/bot/.cargo/bin/deltachat-rpc-server\"","handlingStrategy":"validation","validationCode":"p := expandHome(cfg.RPCServerPath)\nif _, err := os.Stat(p); errors.Is(err, fs.ErrNotExist) {\n    return fmt.Errorf(\"rpc_server_path %q does not exist; fix the channel config\", p)\n}","typeGuard":null,"tryCatchPattern":"if err := ch.Start(ctx); err != nil {\n    if strings.Contains(err.Error(), \"rpc_server_path\") && strings.Contains(err.Error(), \"not found\") {\n        // config fix: correct the path, then restart\n    }\n    return err\n}","preventionTips":["Use absolute paths in rpc_server_path, especially when running as a service user","Verify the path with ls after every binary upgrade"],"tags":["deltachat","config","path","installation","go"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}