phacility/phabricator · warning · PhutilArgumentUsageException
No such object '%s'!
Error message
No such object '%s'!
What it means
After the single object name is resolved with PhabricatorObjectQuery::withNames, a null result throws this usage exception naming the input. Resolution happens under the workflow's viewer, so an object that exists but is invisible to that viewer behaves exactly like one that does not exist.
Source
Thrown at src/applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php:42
$obj_names = $args->getArg('objects');
if (!$obj_names) {
throw new PhutilArgumentUsageException(
pht('Specify the name of an object to show policy information for.'));
} else if (count($obj_names) > 1) {
throw new PhutilArgumentUsageException(
pht(
'Specify the name of exactly one object to show policy information '.
'for.'));
}
$object = id(new PhabricatorObjectQuery())
->setViewer($viewer)
->withNames($obj_names)
->executeOne();
if (!$object) {
$name = head($obj_names);
throw new PhutilArgumentUsageException(
pht(
"No such object '%s'!",
$name));
}
$handle = id(new PhabricatorHandleQuery())
->setViewer($viewer)
->withPHIDs(array($object->getPHID()))
->executeOne();
$policies = PhabricatorPolicyQuery::loadPolicies(
$viewer,
$object);
$console->writeOut("__%s__\n\n", pht('OBJECT'));
$console->writeOut(" %s\n", $handle->getFullName());
$console->writeOut("\n");
View on GitHub (pinned to 5720a38cfe)
Solutions
- Verify the name resolves first: ./bin/phid lookup T123
- Re-check the monogram for typos and re-run with the exact name.
- If the object exists but is hidden, run the command with a viewer that can see the object.
Example fix
# before ./bin/policy show T9999 # after ./bin/phid lookup T123 # confirm it resolves, then ./bin/policy show T123
Defensive patterns
Strategy: validation
Validate before calling
name='T123'
out=$(./bin/phid lookup "$name")
[ -n "$out" ] || { echo "unknown object: $name" >&2; exit 1; }
./bin/policy show "$name" Prevention
- Resolve monograms with ./bin/phid lookup before passing them to policy workflows.
- Copy names from the UI instead of retyping them.
- Remember resolution runs under the workflow's viewer; hidden objects look identical to missing ones.
When it happens
Trigger: Running ./bin/policy show T99999 with a misspelled or nonexistent monogram or PHID, or naming an object the executing viewer cannot see.
Common situations: Typos in monograms, objects deleted between copy and paste, and PHIDs copied from another install.
Related errors
- No such object '%s'!
- Unable to load specified object ("%s").
- Specify the name of an object to show policy information for
- Specify the name of an object to unlock.
- Unable to find any object with the specified name ("%s").
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/0bfe3a7ce9999457.
Report an issue: GitHub.