Page MenuHomePhabricator

diffusion.rawdiffquery can not encode/transport all diffs (e.g. to non-utf8 files)
Closed, ResolvedPublic

Description

I'm hitting this exception when trying to run a daemon task:

[2016-01-14 18:41:38] EXCEPTION: (PhutilProxyException) Host returned HTTP/200, but invalid JSON data in response to a Conduit method call. {>} (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=aeb374b33348), phabricator(head=master, ref.master=8e1b2f986151), phlab(head=master, ref.master=450c7c100a72), phutil(head=master, ref.master=0fa7efbf09d7)
  #0 <#2> PhutilJSONParser::parse(string) called at [<phutil>/src/utils/utils.php:1047]
  #1 <#2> phutil_json_decode(string) called at [<phutil>/src/conduit/ConduitFuture.php:48]
  #2 ConduitFuture::didReceiveResult(array) called at [<phutil>/src/future/FutureProxy.php:58]
  #3 FutureProxy::getResult() called at [<phutil>/src/future/FutureProxy.php:35]
  #4 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:58]
  #5 ConduitClient::callMethodSynchronous(string, array) called at [<phabricator>/src/applications/diffusion/query/DiffusionQuery.php:83]
  #6 DiffusionQuery::callConduitWithDiffusionRequest(PhabricatorUser, DiffusionGitRequest, string, array) called at [<phabricator>/src/applications/differential/engine/DifferentialDiffExtractionEngine.php:45]
  #7 DifferentialDiffExtractionEngine::newDiffFromCommit(PhabricatorRepositoryCommit) called at [<phabricator>/src/applications/differential/engine/DifferentialDiffExtractionEngine.php:212]
  #8 DifferentialDiffExtractionEngine::updateRevisionWithCommit(DifferentialRevision, PhabricatorRepositoryCommit, array, PhabricatorContentSource) called at [<phabricator>/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:234]
  #9 PhabricatorRepositoryCommitMessageParserWorker::updateCommitData(DiffusionCommitRef) called at [<phabricator>/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryGitCommitMessageParserWorker.php:11]
  #10 PhabricatorRepositoryGitCommitMessageParserWorker::parseCommitWithRef(PhabricatorRepository, PhabricatorRepositoryCommit, DiffusionCommitRef) called at [<phabricator>/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:40]
  #11 PhabricatorRepositoryCommitMessageParserWorker::parseCommit(PhabricatorRepository, PhabricatorRepositoryCommit) called at [<phabricator>/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php:40]
  #12 PhabricatorRepositoryCommitParserWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:122]
  #13 PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
  #14 PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementExecuteWorkflow.php:52]
  #15 PhabricatorWorkerManagementExecuteWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:408]
  #16 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:301]
  #17 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_worker.php:21]

Event Timeline

You likely have a diff which isn't JSON-encodable (for example, it affects non-utf8 files). T5955 is probably the pathway forward here.

epriestley renamed this task from Host returned HTTP/200, but invalid JSON data in response to a Conduit method call to diffusion.rawdiffquery can not encode/transport all diffs (e.g. to non-utf8 files).Jan 14 2016, 1:30 PM
epriestley claimed this task.

I believe this was likely resolved by D16460. This (binary transport over Conduit) is still a problem in general, and T5955 is the general remedy, but diffusion.rawdiffquery specifically now returns data via Files.