Page MenuHomePhabricator

RuntimeException: Array to string conversion at [<arcanist>/src/error/PhutilErrorHandler.php:261]
Closed, ResolvedPublicBUG REPORT

Description

Seeing these for the Phabricator phd daemon log at phab1004:/var/log/phd/daemons.log

Looks like a meta error handling an error that has to do with email for PholioMocks?

[25-Sep-2023 21:20:54 UTC] [2023-09-25 21:20:54] EXCEPTION: (PhutilProxyException) Error while executing Task ID 172445230. {>} (RuntimeException) Array to string conversion at [<arcanist>/src/error/PhutilErrorHandler.php:261]
[25-Sep-2023 21:20:54 UTC] arcanist(), ava(), phorge(), translations(), wmf-ext-misc()
[25-Sep-2023 21:20:54 UTC]   #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
[25-Sep-2023 21:20:54 UTC]   #1 <#2> sprintf(string, array) called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:244]
[25-Sep-2023 21:20:54 UTC]   #2 <#2> PhabricatorModularTransactionType::renderValue(array) called at [<phorge>/src/applications/pholio/xaction/PholioImageNameTransaction.php:34]
[25-Sep-2023 21:20:54 UTC]   #3 <#2> PholioImageNameTransaction::getTitle() called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransaction.php:127]
[25-Sep-2023 21:20:54 UTC]   #4 <#2> PhabricatorModularTransaction::getTitle() called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:845]
[25-Sep-2023 21:20:54 UTC]   #5 <#2> PhabricatorApplicationTransaction::getTitleForMail() called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:835]
[25-Sep-2023 21:20:54 UTC]   #6 <#2> PhabricatorApplicationTransaction::getTitleForMailWithRenderingTarget(string) called at [<phorge>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:849]
[25-Sep-2023 21:20:54 UTC]   #7 <#2> PhabricatorApplicationTransaction::getTitleForTextMail() called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:5600]
[25-Sep-2023 21:20:54 UTC]   #8 <#2> PhabricatorApplicationTransactionEditor::getTitleForTextMail(PholioTransaction) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3901]
[25-Sep-2023 21:20:54 UTC]   #9 <#2> PhabricatorApplicationTransactionEditor::addHeadersAndCommentsToMailBody(PhabricatorMetaMTAMailBody, array, string, string) called at [<phorge>/src/applications/pholio/editor/PholioMockEditor.php:73]
[25-Sep-2023 21:20:54 UTC]   #10 <#2> PholioMockEditor::buildMailBody(PholioMock, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3538]
[25-Sep-2023 21:20:54 UTC]   #11 <#2> PhabricatorApplicationTransactionEditor::buildMailForTarget(PholioMock, array, PhabricatorMailTarget) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3481]
[25-Sep-2023 21:20:54 UTC]   #12 <#2> PhabricatorApplicationTransactionEditor::buildMailWithRecipients(PholioMock, array, array, array, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3420]
[25-Sep-2023 21:20:54 UTC]   #13 <#2> PhabricatorApplicationTransactionEditor::buildMail(PholioMock, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1677]
[25-Sep-2023 21:20:54 UTC]   #14 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(PholioMock, array) called at [<phorge>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21]
[25-Sep-2023 21:20:54 UTC]   #15 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phorge>/src/infrastructure/daemon/workers/PhabricatorWorker.php:124]
[25-Sep-2023 21:20:54 UTC]   #16 <#2> PhabricatorWorker::executeTask() called at [<phorge>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:160]
[25-Sep-2023 21:20:54 UTC]   #17 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phorge>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
[25-Sep-2023 21:20:54 UTC]   #18 PhabricatorTaskmasterDaemon::run() called at [<phorge>/src/infrastructure/daemon/PhutilDaemon.php:219]
[25-Sep-2023 21:20:54 UTC]   #19 PhutilDaemon::execute() called at [<phorge>/scripts/daemon/exec/exec_daemon.php:131]

Event Timeline

Uhm, it loops forever... https://phabricator.wikimedia.org/daemon/task/172445230/ shows a Failure Count of > 200000 about changes in M321 two years ago.

renderValue() expects a string; $old passed in https://we.phorge.it/source/phorge/browse/master/src/applications/pholio/xaction/PholioImageNameTransaction.php$34 seems to be an array.

Replacing $old = $this->getOldValue(); with $old = (string)head($this->getOldValue()); won't work as $this->renderHandle(key($new)) will bark a few lines later the other way round (though that's only when doing the head trick also for $new).

Aklapper changed the task status from Open to Stalled.Sep 26 2023, 1:18 PM
Aklapper claimed this task.
Aklapper triaged this task as Low priority.
Aklapper edited projects, added Phabricator (Upstream), Upstream; removed Phabricator.
Aklapper changed the subtype of this task from "Task" to "Bug Report".Nov 14 2023, 11:21 AM

This issue should be resolved in phabricator.wikimedia.org since 2024-03-19 thanks to brennen's deployment in T358610. Please reopen if you still experience this issue.