{"record":{"id":"b43a59fb4ccc06f0","repo":"phacility/phabricator","slug":"no-conduit-method-provided","errorCode":null,"errorMessage":"No Conduit method provided.","messagePattern":"No Conduit method provided\\.","errorType":"console","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"src/applications/conduit/ssh/ConduitSSHWorkflow.php","lineNumber":21,"sourceCode":"final class ConduitSSHWorkflow extends PhabricatorSSHWorkflow {\n\n  protected function didConstruct() {\n    $this->setName('conduit');\n    $this->setArguments(\n      array(\n        array(\n          'name'      => 'method',\n          'wildcard'  => true,\n        ),\n      ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $time_start = microtime(true);\n\n    $methodv = $args->getArg('method');\n    if (!$methodv) {\n      throw new Exception(pht('No Conduit method provided.'));\n    } else if (count($methodv) > 1) {\n      throw new Exception(pht('Too many Conduit methods provided.'));\n    }\n\n    $method = head($methodv);\n\n    $json = $this->readAllInput();\n    $raw_params = null;\n    try {\n      $raw_params = phutil_json_decode($json);\n    } catch (PhutilJSONParserException $ex) {\n      throw new PhutilProxyException(\n        pht('Invalid JSON input.'),\n        $ex);\n    }\n\n    $params = idx($raw_params, 'params', '[]');\n    $params = phutil_json_decode($params);","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/conduit/ssh/ConduitSSHWorkflow.php#L3-L39","documentation":"The SSH conduit workflow (ssh ... conduit <method>) parses the method from a wildcard argument. If the argument list is empty, no method name was supplied on the SSH command line and the command aborts with this exception before reading stdin.","triggerScenarios":"Running `echo '{\"params\":\"{}\"}' | ssh -p 2222 vcs@host conduit` while forgetting to append the method name; quoting mistakes that swallow the trailing argument.","commonSituations":"First experiments with the SSH conduit interface; copy-pasting examples where the trailing method token was dropped in translation.","solutions":["Append exactly one Conduit method name after 'conduit', e.g. ssh -p 2222 vcs@host conduit user.whoami.","Double-check shell quoting so the method is a separate argument, not swallowed into the JSON string."],"exampleFix":"# before\n$ echo '{\"params\":\"{}\"}' | ssh -p 2222 vcs@phab.example.com conduit\n# after\n$ echo '{\"params\":\"{}\"}' | ssh -p 2222 vcs@phab.example.com conduit user.whoami","handlingStrategy":"validation","validationCode":"# Compose the SSH command with an explicit method argument.\nMETHOD=\"${METHOD:?conduit method required}\"\necho \"$PAYLOAD\" | ssh -p 2222 vcs@phab.example.com conduit \"$METHOD\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build the ssh command in a wrapper that requires the method variable.","Keep the payload generation and ssh invocation in one script so the method token is never forgotten."],"tags":["conduit","ssh","cli","phabricator","php"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}