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

  1. Add --method <conduit.method.name> to the command line.
  2. If it still fails, run ./bin/conduit help call to confirm expected flags for your version.
  3. 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

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


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/254bc758d99339d1. Report an issue: GitHub.