{"record":{"id":"3e90b912b773e9a8","repo":"phacility/phabricator","slug":"s-is-not-the-name-of-a-known-object","errorCode":null,"errorMessage":"'%s' is not the name of a known object.","messagePattern":"'(.+?)' is not the name of a known object\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php","lineNumber":307,"sourceCode":"    } else {\n      $this->logOkay(\n        pht('DONE'),\n        pht(\n          'Forced search index updates for %s document(s).',\n          new PhutilNumber(count($phids))));\n    }\n  }\n\n  private function loadPHIDsByNames(array $names) {\n    $query = id(new PhabricatorObjectQuery())\n      ->setViewer($this->getViewer())\n      ->withNames($names);\n    $query->execute();\n    $objects = $query->getNamedResults();\n\n    foreach ($names as $name) {\n      if (empty($objects[$name])) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            \"'%s' is not the name of a known object.\",\n            $name));\n      }\n    }\n\n    return mpull($objects, 'getPHID');\n  }\n\n  private function getIndexableObjectsByTypes(array $types) {\n    $objects = id(new PhutilClassMapQuery())\n      ->setAncestorClass('PhabricatorIndexableInterface')\n      ->execute();\n\n    $type_map = array();\n    $normal_map = array();\n    foreach ($types as $type) {\n      $normalized_type = phutil_utf8_strtolower($type);","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php#L289-L325","documentation":"loadPHIDsByNames() resolves the positional object names (like D123, T45) through PhabricatorObjectQuery->withNames() under the CLI viewer. Any name that yields no result in getNamedResults() raises this usage exception naming the offender. Typical causes: typo, wrong monogram prefix, deleted/unpublished object, or an object the acting viewer cannot see.","triggerScenarios":"`bin/search index D12x` (typo), a monogram of a deleted object, an object name the administrative viewer has no policy visibility on, or a name format the object-name parser does not understand.","commonSituations":"Script-generated lists containing typos or stale monograms (object deleted between list generation and indexing); mixing PHIDs and monograms; wrong application prefix (e.g. M vs T for tasks depending on install).","solutions":["Open the monogram in the web UI to confirm it exists and is visible to your account","Fix the typo or prefix in the command","Regenerate name lists immediately before indexing instead of reusing stale ones","When scripting, pre-resolve names via the phid.lookup Conduit method and drop unknowns"],"exampleFix":"# before (T999999 does not exist)\nbin/search index D123 T999999\n\n# after\nbin/search index D123","handlingStrategy":"validation","validationCode":"$query = id(new PhabricatorObjectQuery())\n  ->setViewer($viewer)\n  ->withNames($names);\n$query->execute();\n$known = $query->getNamedResults();\n$unknown = array_diff($names, array_keys($known));\nif ($unknown) {\n  // skip or fail fast with your own message before running bin/search index\n}","typeGuard":null,"tryCatchPattern":"try {\n  // resolve names / invoke index workflow\n} catch (PhutilArgumentUsageException $ex) {\n  // message names the exact unknown object; drop it and re-run\n}","preventionTips":["Generate object-name lists at indexing time, not ahead of time","Pre-resolve names via phid.lookup and filter unknowns","Run the CLI as a viewer that can see the objects being indexed"],"tags":["cli","bin-search","object-resolution","usage-error"],"backgroundTag":"unknown-object-reference","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}