{"record":{"id":"9d18d0d3e7ec6b72","repo":"phacility/phabricator","slug":"no-such-object-s","errorCode":null,"errorMessage":"No such object '%s'!","messagePattern":"No such object '(.+?)'!","errorType":"console","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php","lineNumber":162,"sourceCode":"\n      if (!$receiver) {\n        throw new Exception(\n          pht(\"No configured mail receiver can accept mail to '%s'.\", $to));\n      }\n\n      if (!($receiver instanceof PhabricatorObjectMailReceiver)) {\n        $class = get_class($receiver);\n        throw new Exception(\n          pht(\n            \"Receiver '%s' accepts mail to '%s', but is not a \".\n            \"subclass of PhabricatorObjectMailReceiver.\",\n            $class,\n            $to));\n      }\n\n      $object = $receiver->loadMailReceiverObject($to, $user);\n      if (!$object) {\n        throw new Exception(pht(\"No such object '%s'!\", $to));\n      }\n\n      $mail_key = PhabricatorMetaMTAMailProperties::loadMailKey($object);\n\n      $hash = PhabricatorObjectMailReceiver::computeMailHash(\n        $mail_key,\n        $user->getPHID());\n\n      $header_content['to'] = $to.'+'.$user->getID().'+'.$hash.'@test.com';\n    }\n\n    $received->setHeaders($header_content);\n    $received->setBodies(\n      array(\n        'text' => $body,\n      ));\n\n    $received->save();","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php#L144-L180","documentation":"The receiver accepted the address and loadMailReceiverObject($to, $user) tried to resolve the monogram to a concrete object; it returned null. Either the object does not exist (bad/typo'd monogram, stale ID) or it is not visible to the acting user, because the load runs with the --as user and Phabricator policy filtering applies.","triggerScenarios":"Passing --to T9999 when no such task exists; a typo'd monogram; the object exists but the --as user cannot see it (private project, restricted policy); monograms from another install.","commonSituations":"Testing inbound mail against a private object as a non-member actor; copy-pasted monograms across environments; objects deleted between composing and running the command.","solutions":["Open the object in the web UI while logged in as the --as user to confirm it exists and is visible to them.","Fix the monogram (correct type letter and ID, e.g. T123, D456).","Choose an object the acting user can see, or pass --as a project member."],"exampleFix":"# before: object invisible to the acting user (or nonexistent)\n./bin/mail receive-test --to T9999 --as outsider\n\n# after: existing, visible object\n./bin/mail receive-test --to T123 --as alincoln","handlingStrategy":"validation","validationCode":"// Resolve the object as the acting user before simulating delivery.\n$object = id(new PhabricatorObjectQuery())\n  ->setViewer($user)\n  ->withNames(array($to)) // e.g. 'T123'\n  ->executeOne();\nif (!$object) {\n  // nonexistent or invisible to $user: fix the monogram or the actor\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pick a public test object for mail-path testing.","Remember policy filtering applies to simulated mail exactly as to real mail."],"tags":["phabricator","cli","mail","object-not-found","policy"],"backgroundTag":"object-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}