phacility/phabricator · warning · PhutilArgumentUsageException
Specify a file to read parameters from with "--input".
Error message
Specify a file to read parameters from with "--input".
What it means
Usage exception from bin/conduit call: the --input argument is empty. The workflow reads method parameters from a file (typically JSON) and requires that path even for parameterless methods.
Source
Thrown at src/applications/conduit/management/PhabricatorConduitCallManagementWorkflow.php:51
'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(
'No such user "%s" exists.',
$as));
}
// Allow inline generation of user caches for the user we're acting
// as, since some calls may read user preferences.View on GitHub (pinned to 5720a38cfe)
Solutions
- Create a JSON file for the parameters (an empty object file for parameterless methods) and pass it with --input.
- For quick tests: printf '{}' > /tmp/params.json && ./bin/conduit call --method user.whoami --input /tmp/params.json.
Example fix
# before
$ ./bin/conduit call --method user.whoami
# after
$ echo '{}' > /tmp/params.json
$ ./bin/conduit call --method user.whoami --input /tmp/params.json Defensive patterns
Strategy: validation
Validate before calling
#!/bin/bash
INPUT="${INPUT:-/tmp/conduit-params.json}"
[ -f "$INPUT" ] || printf '{}' > "$INPUT" # parameterless methods still need a file
./bin/conduit call --method "$METHOD" --input "$INPUT" Prevention
- Always create the params file first, even when it is just '{}'.
- Treat --method and --input as a pair; validate both in wrappers before executing.
When it happens
Trigger: Running ./bin/conduit call --method user.whoami with no --input; guessing a different flag name like --params or --data.
Common situations: Assuming parameterless methods need no input file; migrating from arc call-conduit where stdin echo '{}' is the idiom.
Related errors
- Specify a method to call with "--method".
- 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/2ac911ef5c6955cc.
Report an issue: GitHub.