Page MenuHomePhabricator

EXCEPTION: (Exception) Policy identifier is an object PHID (''), but no object handle was provided. A handle must be provided for object policies.
Open, LowPublicBUG REPORT

Description

Starting 2024-03-28 23:31:20, we have a regularly repeating issue in our logs:

[2024-03-31 20:26:24] EXCEPTION: (Exception) Policy identifier is an object PHID (''), but no object handle was provided. A handle must be provided for object policies. at [<phorge>/src/applications/policy/storage/PhabricatorPolicy.php:63]
arcanist(), ava(), phorge(), translations(), wmf-ext-misc()
  #0 <#2> PhabricatorPolicy::newFromPolicyAndHandle(NULL, NULL) called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:460]
  #1 <#2> PhabricatorApplicationTransaction::renderPolicyName(NULL, string) called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:981]
  #2 <#2> PhabricatorApplicationTransaction::getTitle() called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransaction.php:132]
  #3 <#2> PhabricatorModularTransaction::getTitle() called at [<phorge>/src/applications/maniphest/storage/ManiphestTransaction.php:136]
  #4 <#2> ManiphestTransaction::getTitle() called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:845]
  #5 <#2> PhabricatorApplicationTransaction::getTitleForMail() called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:835]
  #6 <#2> PhabricatorApplicationTransaction::getTitleForMailWithRenderingTarget(string) called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:849]
  #7 <#2> PhabricatorApplicationTransaction::getTitleForTextMail() called at [<phorge>/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php:72]
  #8 <#2> ManiphestGetTaskTransactionsConduitAPIMethod::execute(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/method/ConduitAPIMethod.php:156]
  #9 <#2> ConduitAPIMethod::executeMethod(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/call/ConduitCall.php:131]
  #10 <#2> ConduitCall::executeMethod() called at [<phorge>/src/applications/conduit/call/ConduitCall.php:81]
  #11 <#2> ConduitCall::execute() called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:83]
  #12 phlog(Exception) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:111]
  #13 PhabricatorConduitAPIController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #14 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #15 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Details

TitleReferenceAuthorSource BranchDest Branch
Revert "Add temporary debug output for T361459"repos/phabricator/phabricator!41aklapperdebugT361459revertwmf/stable
Add temporary debug output for T361459repos/phabricator/phabricator!38aklapperdebugT361459wmf/stable
Customize query in GitLab

Event Timeline

Aklapper created this task.

This got triggered today for T353904. Random timestamp, still not sure how to trigger it, but might be sufficient info now.

Initial Edit Policy was: "obj.subscriptions.subscribers". The ticket got created via a script using Conduit (see T256285) so there either might be an issue in https://gitlab.wikimedia.org/repos/releng/release/-/blob/main/make-security-tasks/makesecuritytasks.py#L119-121 or in upstream code.

[2024-05-06 20:38:15] PHLOG: 'WMF DEBUG T361459: Phid: PHID-XACT-TASK-odoy4jvm7ajqxru' at [/srv/deployment/phabricator/deployment-cache/revs/dd5376175ba42df3433d6128268103d913bfa111/phabricator/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:980]
[2024-05-06 20:38:15] PHLOG: 'WMF DEBUG T361459: objectPhid: PHID-TASK-ers6fmiprjvogbxnniik' at [/srv/deployment/phabricator/deployment-cache/revs/dd5376175ba42df3433d6128268103d913bfa111/phabricator/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:981]
[2024-05-06 20:38:15] PHLOG: 'WMF DEBUG T361459: transactionType: core:edit-policy' at [/srv/deployment/phabricator/deployment-cache/revs/dd5376175ba42df3433d6128268103d913bfa111/phabricator/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:982]
[2024-05-06 20:38:15] EXCEPTION: (Exception) Policy identifier is an object PHID (''), but no object handle was provided. A handle must be provided for object policies. at [<phorge>/src/applications/policy/storage/PhabricatorPolicy.php:63]

PHID-XACT-TASK-odoy4jvm7ajqxru is a transaction at task creation. In my understanding the issue is only about not being able to render the policy change description.

Upstream code does Hide creation transactions if the old value is empty. in https://we.phorge.it/source/phorge/browse/master/src/applications/transactions/storage/PhabricatorApplicationTransaction.php$608-611 but I assume for some reason in https://we.phorge.it/source/phorge/browse/master/src/applications/transactions/storage/PhabricatorApplicationTransaction.php$972 getIsCreateTransaction should return true but doesn't.

In any case, low priority as this is about rendering an edit policy change notification sentence in an email notification.