Page MenuHomePhabricator

Unhandled Exception when dragging a card on workboards (not affecting all projects, may need help to investigate the cause)
Closed, ResolvedPublic

Assigned To
Authored By
Jul 13 2015, 9:40 PM
Attached Files
F639125: pasted_file
Jul 18 2015, 7:09 PM
F629731: pasted_file
Jul 17 2015, 12:55 AM
F629728: pasted_file
Jul 17 2015, 12:55 AM


When dragging a card from one column to another I get the following error:

Unhandled Exception ("InvalidArgumentException")
Argument 1 passed to array_fuse() must be of the type array, null given, called in /srv/www/phabricator/src/applications/herald/adapter/HeraldAdapter.php on line 441 and defined

Things that may be part of the cause:
Tasks in that project are in a separate "space".
Edit permissions exclude the public, and only cover project members.
Anything else in our installation is unmodified, we use the version directly from the official git sources.

If more information is required, feel free to ask.

Event Timeline

andypuettmann raised the priority of this task from to Needs Triage.
andypuettmann updated the task description. (Show Details)
andypuettmann added a subscriber: andypuettmann.

I can't immediately reproduce this issue. Can you confirm you're at HEAD?

And maybe more specifics on how I can reproduce the issue, thanks!

Yes, just made a fresh git-pull on it before sending this ticket.
Will PM you.

There are also a number of outstanding Herald Diffs awaiting review, so it's likely some of this is fallout from moderinzing Herald.

For easier use:

Argument 1 passed to array_fuse() must be of the type array, null given, called in /srv/www/phabricator/src/applications/herald/adapter/HeraldAdapter.php on line 441 and defined
Stack trace:
PhutilErrorHandler::handleError called at [/srv/www/libphutil/src/utils/utils.php:812]
array_fuse called at [/srv/www/phabricator/src/applications/herald/adapter/HeraldAdapter.php:441]
HeraldAdapter::doesConditionMatch called at [/srv/www/phabricator/src/applications/herald/engine/HeraldEngine.php:346]
HeraldEngine::doesConditionMatch called at [/srv/www/phabricator/src/applications/herald/engine/HeraldEngine.php:286]
HeraldEngine::doesRuleMatch called at [/srv/www/phabricator/src/applications/herald/engine/HeraldEngine.php:91]
HeraldEngine::applyRules called at [/srv/www/phabricator/src/applications/herald/engine/HeraldEngine.php:43]
HeraldEngine::loadAndApplyRules called at [/srv/www/phabricator/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2809]
PhabricatorApplicationTransactionEditor::applyHeraldRules called at [/srv/www/phabricator/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:909]
PhabricatorApplicationTransactionEditor::applyTransactions called at [/srv/www/phabricator/src/applications/project/controller/PhabricatorProjectMoveController.php:149]
PhabricatorProjectMoveController::processRequest called at [/srv/www/phabricator/src/aphront/AphrontController.php:33]
AphrontController::handleRequest called at [/srv/www/phabricator/src/aphront/configuration/AphrontApplicationConfiguration.php:226]
phlog called at [/srv/www/phabricator/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php:230]
AphrontDefaultApplicationConfiguration::handleException called at [/srv/www/phabricator/src/aphront/configuration/AphrontApplicationConfiguration.php:230]
AphrontApplicationConfiguration::processRequest called at [/srv/www/phabricator/src/aphront/configuration/AphrontApplicationConfiguration.php:140]
AphrontApplicationConfiguration::runHTTPRequest called at [/srv/www/phabricator/webroot/index.php:21]

as requested

may be related to a combination of rules.

Example issue in our system

Here are the defined rules:
Herald rules
(Registered users can see them, if needed)

One of the rules would have matched.
However, this error does not create a herald transscript.
(Even got the message on the status change of the issue, and herald did not process that issue.)

This is almost certainly fixed by outstanding changes to Herald which are awaiting review. See also T8822.

Glad to hear this.
Will keep an eye on this then. =)

Do we have any way to avoid this error?
It seems to have started with latest update,
is this any combination of rules/permissions we can avoid or is this a general problem with one of the hooks inside herald?
(Its currently disabling almost any herald function in our installation, however a few of them still seem to work, but cant see a pattern that we have to avoid.)

Finally found the cause in our system.
Looks like there is an error related to the "field-type" users.

"issue:atester": {
  "name": "Assigned Tester",
  "description": "Tester in Charge to provide information",
  "type": "users",
  "search": "true",
  "caption": "Who tested it? (Only tester are valid)"

whenever a field with that configuration gets saved "empty" the issue view is breaking.

Tried two different installations:
On one I had to fill the field, and save, then try to save it empty again.
Once that happens the issue wasnt even accessible anymore (JSON Parse exception)

Unhandled Exception ("PhutilJSONParserException")
Parse error on line 1 at column 0: Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

pasted_file (219×647 px, 21 KB)

However, we had a clever user that wanted to track if he was added to that field, and subscribe to issues that added him as "assigned tester" and he was not subscribing it:

pasted_file (553×829 px, 54 KB)

Whenever this rule is active, and the field of type "users" gets saved empty the "unhandled exception" with "array fuse" gets thrown.
If its NOT active, it seems to destroy the task display completely. (Edit works, but any attempt to display will result in the "PhutilJSONParserException" mentioned above.
Refilling the field with a name, does not fix the JSON parser exception, its a permanent issue, that cannot be recovered with any other field adjustment made.

  • Andy

For reference:
T8866 reported the PhutilJSONParserException

Added D13642 for reference.
However, got to re-evaluate if that fix also prevents the initial problem with "array_fuse" from happening.

Okay, unchanged.

pasted_file (238×585 px, 26 KB)

still occurring when you have a field of type "user"
save anything in it.
Then edit again and clear the field, will result in this error, on ANY action after this.
(Workboard move, comment, status change, in fact anything that triggers herald to evaluate this again.)

epriestley claimed this task.

I think this is a duplicate of T9260, and was likely resolved by D14169.