{"record":{"id":"5c45042a14a91f2b","repo":"phacility/phabricator","slug":"unable-to-load-specified-object-s","errorCode":null,"errorMessage":"Unable to load specified object (\"%s\").","messagePattern":"Unable to load specified object \\(\"(.+?)\"\\)\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/herald/management/HeraldTestManagementWorkflow.php","lineNumber":43,"sourceCode":"          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $object_name = $args->getArg('object');\n    if (!strlen($object_name)) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify an object to test rules for with \"--object\".'));\n    }\n\n    $objects = id(new PhabricatorObjectQuery())\n      ->setViewer($viewer)\n      ->withNames(array($object_name))\n      ->execute();\n    if (!$objects) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Unable to load specified object (\"%s\").',\n          $object_name));\n    }\n    $object = head($objects);\n\n    $adapters = HeraldAdapter::getAllAdapters();\n\n    $can_select = array();\n    $display_adapters = array();\n    foreach ($adapters as $key => $adapter) {\n      if (!$adapter->isTestAdapterForObject($object)) {\n        continue;\n      }\n\n      if (!$adapter->isAvailableToUser($viewer)) {\n        continue;\n      }","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/herald/management/HeraldTestManagementWorkflow.php#L25-L61","documentation":"PhutilArgumentUsageException thrown by HeraldTestManagementWorkflow when the --object value does not resolve through PhabricatorObjectQuery::withNames() — i.e. no object with that monogram/name is loadable. The workflow then has nothing to build test adapters against, so it aborts. withNames() accepts monograms (T123, D456, P78...) and other object names, but the object must exist and be visible to the script's viewer.","triggerScenarios":"Running 'bin/herald test --object T99999' for a nonexistent task; passing a plain word ('--object mytask') that matches no object name; typo in the monogram; object deleted between copy and paste; running against the wrong database/environment.","commonSituations":"Monograms copied from stale emails or search results after the object was deleted; scripts parameterized by object name where the name is a title rather than a monogram; testing on a dev checkout pointed at an empty database.","solutions":["Use a valid, existing monogram (T123, D456, P1, M9 ...); copy it fresh from the UI URL.","If you only know a title, resolve the monogram in the UI or via Conduit (maniphest.query.search etc.) first.","Confirm the script runs against the right environment/database.","Check the object is not deleted/Archived beyond the viewer's visibility."],"exampleFix":"# before\nbin/herald test --object mytask --type maniphest.task\n\n# after\nbin/herald test --object T123 --type maniphest.task","handlingStrategy":"validation","validationCode":"// Verify the name resolves before running the workflow\n$objects = id(new PhabricatorObjectQuery())\n  ->setViewer($viewer)\n  ->withNames(array($object_name))\n  ->execute();\nif (!$objects) {\n  // suggest: use a monogram from the object's URL (T123, D456, ...)\n}","typeGuard":"function isPhabricatorMonogram($s) {\n  return is_string($s) && preg_match('/^[A-Z]\\d+$/', $s) === 1;\n}","tryCatchPattern":"try {\n  (new HeraldTestManagementWorkflow())->execute($args);\n} catch (PhutilArgumentUsageException $ex) {\n  if (strpos($ex->getMessage(), 'Unable to load specified object') !== false) {\n    // re-check the monogram against the UI, confirm environment, retry\n  }\n}","preventionTips":["Copy monograms directly from the object URL, never from prose/emails that may reference deleted objects.","In automation, resolve names via Conduit search endpoints and fail fast on zero results."],"tags":["herald","phabricator","cli","object-not-found","monogram","dry-run"],"backgroundTag":"object-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}