{"record":{"id":"180f14e1cace7fce","repo":"phacility/phabricator","slug":"unable-to-find-any-object-with-the-specified-name","errorCode":null,"errorMessage":"Unable to find any object with the specified name (\"%s\").","messagePattern":"Unable to find any object with the specified name \\(\"(.+?)\"\\)\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/policy/management/PhabricatorPolicyManagementUnlockWorkflow.php","lineNumber":69,"sourceCode":"    $viewer = $this->getViewer();\n\n    $object_names = $args->getArg('objects');\n    if (!$object_names) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify the name of an object to unlock.'));\n    } else if (count($object_names) > 1) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify the name of exactly one object to unlock.'));\n    }\n\n    $object_name = head($object_names);\n\n    $object = id(new PhabricatorObjectQuery())\n      ->setViewer($viewer)\n      ->withNames(array($object_name))\n      ->executeOne();\n    if (!$object) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Unable to find any object with the specified name (\"%s\").',\n          $object_name));\n    }\n\n    $view_user = $this->loadUser($args->getArg('view'));\n    $edit_user = $this->loadUser($args->getArg('edit'));\n    $owner_user = $this->loadUser($args->getArg('owner'));\n\n    if (!$view_user && !$edit_user && !$owner_user) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Choose which capabilities to unlock with \"--view\", \"--edit\", '.\n          'or \"--owner\".'));\n    }\n\n    $handle = id(new PhabricatorHandleQuery())\n      ->setViewer($viewer)","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/policy/management/PhabricatorPolicyManagementUnlockWorkflow.php#L51-L87","documentation":"The object name passed to bin/policy unlock is resolved with PhabricatorObjectQuery::withNames; a null result throws this usage exception, so there is nothing to unlock. Names resolve under the workflow's viewer, so invisible objects are indistinguishable from nonexistent ones.","triggerScenarios":"./bin/policy unlock D99999 with a misspelled monogram or PHID, or with a name that came from another install.","commonSituations":"Rescuing a task or paste whose monogram was transcribed incorrectly, and stale runbooks referencing deleted objects.","solutions":["Confirm the name resolves with ./bin/phid lookup, then retry with the exact monogram.","If the object truly is gone, nothing needs unlocking; drop it from the runbook."],"exampleFix":"# before\n./bin/policy unlock D9999 --edit alice\n# after\n./bin/phid lookup D1234   # confirm, then\n./bin/policy unlock D1234 --edit alice","handlingStrategy":"validation","validationCode":"name='D1234'\nout=$(./bin/phid lookup \"$name\")\n[ -n \"$out\" ] || { echo \"unknown object: $name\" >&2; exit 1; }\n./bin/policy unlock \"$name\" --edit alice","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify monograms with ./bin/phid lookup before unlocking.","Keep runbooks current; deleted objects fail the same way as typos."],"tags":["phabricator","cli","object-not-found","unlock"],"backgroundTag":"object-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}