Page MenuHomePhabricator

InvalidArgumentException when re-joining a previously left Conpherence room
Closed, ResolvedPublic

Description

I was playing around with Conpherence rooms a bit, created a room, added some messages, left the room and entered the room again. However, every time when I re-enter the room now I am greeted with the following error message:

Unhandled Exception ("InvalidArgumentException")
Argument 1 passed to array_select_keys() must be of the type array, null given, called in /path/to/phabricator/src/applications/conpherence/query/ConpherenceThreadQuery.php on line 404 and defined

Also my avatar is not added to the member list on the right-hand side and the last message in the chat window is:

ti removed a participant: ti.

This here is hopefully the full stack trace from the PHP error log:

[11-Jun-2015 17:01:02 America/Los_Angeles] [2015-06-11 17:01:02] ERROR 2: Invalid argument supplied for foreach() at [/path/to/phabricator/src/applications/conpherence/query/ConpherenceThreadQuery.php:371]
[11-Jun-2015 17:01:02 America/Los_Angeles] arcanist(head=master, ref.master=7d15b85a1bc0), phabricator(head=master, ref.master=bdef1255e398), phutil(head=master, ref.master=92882eb9404d)
[11-Jun-2015 17:01:02 America/Los_Angeles]   #0 ConpherenceThreadQuery::loadWidgetData(array) called at [<phabricator>/src/applications/conpherence/query/ConpherenceThreadQuery.php:135]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #1 ConpherenceThreadQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:228]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #2 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:168]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #3 PhabricatorPolicyAwareQuery::executeOne() called at [<phabricator>/src/applications/conpherence/controller/ConpherenceWidgetController.php:32]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #4 ConpherenceWidgetController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:226]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #5 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:140]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #6 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:21]
[11-Jun-2015 17:01:02 America/Los_Angeles] [2015-06-11 17:01:02] EXCEPTION: (InvalidArgumentException) Argument 1 passed to array_select_keys() must be of the type array, null given, called in /path/to/phabricator/src/applications/conpherence/query/ConpherenceThreadQuery.php on line 404 and defined at [<phutil>/src/error/PhutilErrorHandler.php:200]
[11-Jun-2015 17:01:02 America/Los_Angeles] arcanist(head=master, ref.master=7d15b85a1bc0), phabricator(head=master, ref.master=bdef1255e398), phutil(head=master, ref.master=92882eb9404d)
[11-Jun-2015 17:01:02 America/Los_Angeles]   #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phutil>/src/utils/utils.php:505]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #1 <#2> array_select_keys(NULL, array) called at [<phabricator>/src/applications/conpherence/query/ConpherenceThreadQuery.php:404]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #2 <#2> ConpherenceThreadQuery::loadWidgetData(array) called at [<phabricator>/src/applications/conpherence/query/ConpherenceThreadQuery.php:135]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #3 <#2> ConpherenceThreadQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:228]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #4 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:168]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #5 <#2> PhabricatorPolicyAwareQuery::executeOne() called at [<phabricator>/src/applications/conpherence/controller/ConpherenceWidgetController.php:32]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #6 <#2> ConpherenceWidgetController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:226]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #7 phlog(InvalidArgumentException) called at [<phabricator>/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php:229]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #8 AphrontDefaultApplicationConfiguration::handleException(InvalidArgumentException) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:230]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #9 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:140]
[11-Jun-2015 17:01:02 America/Los_Angeles]   #10 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:21]

Let me know if you need more information.

Event Timeline

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

I just noticed that once I added a new message to that room I automatically join it, and then the error does not occur anymore. However, the stated problem is 100% reproducible once I leave the room and try to enter it again.

Hey @tiguchi - thanks for the report. I think it should be fixed if you update to HEAD. If things still don't work for you please let me know and I'll take another look. Thanks again for the report!

@btrahan: works like a charm now. Thank you!