phacility/phabricator · warning · PhutilArgumentUsageException
Specify a method to call with "--method".
Error message
Specify a method to call with "--method".
What it means
Usage exception from the bin/conduit call management workflow: the --method argument is empty (absent or given an empty value). The command requires a method name plus an input file, and refuses to run without them.
Source
Thrown at src/applications/conduit/management/PhabricatorConduitCallManagementWorkflow.php:45
'Force the request to execute in this process, rather than '.
'proxying to another host in the cluster.'),
),
array(
'name' => 'as',
'param' => 'username',
'help' => pht(
'Execute the call as the given user. (If omitted, the call will '.
'be executed as an omnipotent user.)'),
),
));
}
public function execute(PhutilArgumentParser $args) {
$viewer = $this->getViewer();
$method = $args->getArg('method');
if (!strlen($method)) {
throw new PhutilArgumentUsageException(
pht('Specify a method to call with "--method".'));
}
$input = $args->getArg('input');
if (!strlen($input)) {
throw new PhutilArgumentUsageException(
pht('Specify a file to read parameters from with "--input".'));
}
$as = $args->getArg('as');
if (strlen($as)) {
$actor = id(new PhabricatorPeopleQuery())
->setViewer($viewer)
->withUsernames(array($as))
->executeOne();
if (!$actor) {
throw new PhutilArgumentUsageException(
pht(View on GitHub (pinned to 5720a38cfe)
Solutions
- Add --method <conduit.method.name> to the command line.
- If it still fails, run ./bin/conduit help call to confirm expected flags for your version.
- Guard wrapper scripts so they abort early when the method variable is empty.
Example fix
# before $ ./bin/conduit call --input params.json # after $ ./bin/conduit call --method user.whoami --input params.json
Defensive patterns
Strategy: validation
Validate before calling
#!/bin/bash
# Fail fast in wrappers before invoking bin/conduit.
METHOD="${METHOD:?Set METHOD to a Conduit method name}"
INPUT="${INPUT:?Set INPUT to a params file path}"
./bin/conduit call --method "$METHOD" --input "$INPUT" Prevention
- Require and default both flags in wrapper scripts with parameter expansion guards.
- Keep a working command line in the project docs and copy from it rather than retyping.
When it happens
Trigger: Running ./bin/conduit call --input params.json while forgetting --method; misspelling the flag (e.g. --methods); a wrapper script passing an empty $METHOD shell variable.
Common situations: Shell wrappers and cron jobs where the method variable is unset for some records; copy-pasting the command from docs that omit the flag.
Related errors
- Specify a file to read parameters from with "--input".
- No such user "%s" exists.
- No Conduit method provided.
- Too many Conduit methods provided.
- Service "%s" is unrecognized, restricted, or you do not have
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/254bc758d99339d1.
Report an issue: GitHub.