Page MenuHomePhabricator

PhutilJSONParserException error when access phabricator/T2050 page.
Closed, ResolvedPublic

Description

Hello there!

When access maniphest task page, a specific task always got a error message like this.

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

And apache2 log is

[2015-07-17 09:54:44] EXCEPTION: (PhutilJSONParserException) Parse error on line 1 at column 0: Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[' at [<phutil>/src/parser/PhutilJSONParser.php:32]
arcanist(head=master, ref.master=3793998df43b), phabricator(head=master, ref.master=0306eb70edfc), phutil(head=master, ref.master=aa6cd8f7e5e5)
  #0 <#2> PhutilJSONParser::parse(NULL) called at [<phutil>/src/utils/utils.php:1047]
  #1 <#2> phutil_json_decode(NULL) called at [<phabricator>/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php:121]
  #2 <#2> PhabricatorStandardCustomFieldPHIDs::getApplicationTransactionTitle(ManiphestTransaction) called at [<phabricator>/src/infrastructure/customfield/field/PhabricatorCustomField.php:993]
  #3 <#2> PhabricatorCustomField::getApplicationTransactionTitle(ManiphestTransaction) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:726]
  #4 <#2> PhabricatorApplicationTransaction::getTitle() called at [<phabricator>/src/applications/maniphest/storage/ManiphestTransaction.php:597]
  #5 <#2> ManiphestTransaction::getTitle() called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:412]
  #6 <#2> PhabricatorApplicationTransactionView::renderEvent(ManiphestTransaction, array) called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:173]
  #7 <#2> PhabricatorApplicationTransactionView::buildEvents(boolean) called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:218]
  #8 <#2> PhabricatorApplicationTransactionView::buildPHUITimelineView() called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:200]
  #9 <#2> phutil_escape_html(array) called at [<phutil>/src/markup/render.php:157]
  #10 <#2> phutil_escape_html(array) called at [<phutil>/src/markup/render.php:119]
  #11 <#2> phutil_tag(string, array, array) called at [<phabricator>/src/view/layout/AphrontSideNavFilterView.php:312]
  #12 <#2> AphrontSideNavFilterView::renderFlexNav() called at [<phabricator>/src/view/layout/AphrontSideNavFilterView.php:206]
  #13 <#2> AphrontSideNavFilterView::render() called at [<phabricator>/src/view/AphrontView.php:176]
  #14 <#2> AphrontView::producePhutilSafeHTML() called at [<phutil>/src/markup/render.php:133]
  #15 <#2> phutil_escape_html(AphrontSideNavFilterView) called at [<phutil>/src/markup/render.php:189]
  #16 <#2> phutil_implode_html(string, array) called at [<phabricator>/src/view/page/PhabricatorBarePageView.php:58]
  #17 <#2> PhabricatorBarePageView::willRenderPage() called at [<phabricator>/src/view/page/PhabricatorStandardPageView.php:157]
  #18 <#2> PhabricatorStandardPageView::willRenderPage() called at [<phabricator>/src/view/page/AphrontPageView.php:46]
  #19 <#2> AphrontPageView::render() called at [<phabricator>/src/applications/base/controller/PhabricatorController.php:308]
  #20 <#2> PhabricatorController::buildPageResponse(PhabricatorStandardPageView) called at [<phabricator>/src/applications/base/controller/PhabricatorController.php:370]
  #21 <#2> PhabricatorController::buildApplicationPage(array, array) called at [<phabricator>/src/applications/maniphest/controller/ManiphestTaskDetailController.php:369]
  #22 <#2> ManiphestTaskDetailController::processRequest() called at [<phabricator>/src/aphront/AphrontController.php:33]
  #23 <#2> AphrontController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:226]
  #24 phlog(PhutilJSONParserException) called at [<phabricator>/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php:230]
  #25 AphrontDefaultApplicationConfiguration::handleException(PhutilJSONParserException) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:230]
  #26 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:140]
  #27 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:21]

Because there is a function related custom field in error call-stack, it's good to show my team's custom fields setting, which is

  "saladbowl:estimated-hours": {
    "name": "Estimated Hours",
    "type": "int",
    "caption": "Estimated number of hours this will take.",
    "required": true
  },
  "saladbowl:auditors": {
    "name": "Auditors",
    "type": "users",
    "caption": "Auditors who will review this task and commits.",
    "required": false
  }
}

Thanks!

Event Timeline

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

I'm not able to reproduce this with the steps you've provided. Can you be more specific on how we can reproduce the error?

pasted_file (96×216 px, 7 KB)

Ah, ok. An error does trigger once you add, then remove an auditor.

Wow! It works nicely with your hotfix.
Thank you :)

Okay, so part of T8863
is fixed now. =)
Great.

epriestley claimed this task.