phacility/phabricator · error · PhutilArgumentUsageException
Specify either specific factors with "--provider", or all…
Error message
Specify either specific factors with "--provider", or all factors with "--all-types", but not both.
What it means
Usage guard in the MFA-strip workflow: fires when --provider and --all-types are combined, mirroring the --type/--all-types check. Selecting specific providers while also requesting all types is contradictory, so argument validation aborts the run.
Solutions
- Keep either --provider <phid> or --all-types, not both
- Use bin/auth list-mfa-providers to find provider PHIDs
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:100 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/52b01848ea54639d.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:100
pht(
'No user exists with username "%s".',
$username));
}
}
} else {
$users = null;
}
$types = $args->getArg('type');
$provider_phids = $args->getArg('provider');
$all_types = $args->getArg('all-types');
if ($types && $all_types) {
throw new PhutilArgumentUsageException(
pht(
'Specify either specific factors with "--type", or all factors with '.
'"--all-types", but not both.'));
} else if ($provider_phids && $all_types) {
throw new PhutilArgumentUsageException(
pht(
'Specify either specific factors with "--provider", or all factors '.
'with "--all-types", but not both.'));
} else if (!$types && !$all_types && !$provider_phids) {
throw new PhutilArgumentUsageException(
pht(
'Use "--type <type>" or "--provider <phid>" to specify which '.
'factors to strip, or "--all-types" to strip all factors. '.
'Use `bin/auth list-factors` to show the available factor types '.
'or `bin/auth list-mfa-providers` to show available providers.'));
}
$type_map = PhabricatorAuthFactor::getAllFactors();
if ($types) {
foreach ($types as $type) {
if (!isset($type_map[$type])) {
throw new PhutilArgumentUsageException(View on GitHub (pinned to 5720a38cfe)