Page MenuHomePhabricator

Cannot change a fulfiled promise to rejected
Closed, ResolvedPublic

Description

I'm hitting this exception when trying to patch a diff with arc patch:

> arc patch --nobranch --trace D21974
...
>>> [0] <conduit> differential.querydiffs() <bytes = 76>
>>> [1] <http> https://phabricator.mydomain.com/api/differential.querydiffs
<<< [1] <http> 1,069,561 us
<<< [0] <conduit> 1,070,107 us
>>> [2] <conduit> user.whoami() <bytes = 117>
>>> [3] <http> https://phabricator.mydomain.com/api/user.whoami
<<< [3] <http> 327,420 us
<<< [2] <conduit> 327,868 us
>>> [4] <conduit> differential.querydiffs() <bytes = 157>
>>> [5] <http> https://phabricator.mydomain.com/api/differential.querydiffs
<<< [5] <http> 4,547,488 us
<<< [4] <conduit> 4,548,173 us
>>> [6] <exec> $ git symbolic-ref --quiet HEAD
<<< [6] <exec> 3,299 us
>>> [7] <exec> $ git rev-parse --symbolic-full-name 'arcpatch-D21974_1'@{upstream}
<<< [7] <exec> 3,304 us
>>> [8] <exec> $ git --version
<<< [8] <exec> 3,108 us
>>> [9] <exec> $ git ls-remote --get-url 'origin'
<<< [9] <exec> 5,374 us
>>> [10] <conduit> repository.query() <bytes = 201>
>>> [11] <http> https://phabricator.mydomain.com/api/repository.query
<<< [11] <http> 362,311 us
<<< [10] <conduit> 362,905 us
>>> [12] <exec> $ git diff --no-ext-diff --no-textconv --raw 'HEAD' --
>>> [13] <exec> $ git ls-files --others --exclude-standard
<<< [13] <exec> 101,006 us
<<< [12] <exec> 110,651 us
>>> [14] <exec> $ git diff-files --name-only
<<< [14] <exec> 47,732 us
>>> [15] <exec> $ git show -s --format='%H' '6d443cae8300ee97c640c8374ea19d36b3ea6cc8' --
<<< [15] <exec> 8,831 us
>>> [16] <exec> $ git symbolic-ref --quiet HEAD
<<< [16] <exec> 3,520 us
>>> [17] <exec> $ git rev-parse --verify 'arcpatch-D21974'
<<< [17] <exec> 4,048 us
Branch name arcpatch-D21974 already exists; trying a new name.
>>> [18] <exec> $ git rev-parse --verify 'arcpatch-D21974_1'
<<< [18] <exec> 3,908 us
Branch name arcpatch-D21974_1 already exists; trying a new name.
>>> [19] <exec> $ git rev-parse --verify 'arcpatch-D21974_2'
<<< [19] <exec> 4,539 us
>>> [20] <exec> $ git show -s --format='%H' '6d443cae8300ee97c640c8374ea19d36b3ea6cc8' --
<<< [20] <exec> 8,100 us
>>> [21] <exec> $ git checkout -b 'arcpatch-D21974_2' '6d443cae8300ee97c640c8374ea19d36b3ea6cc8'
<<< [21] <exec> 288,473 us
Created and checked out branch arcpatch-D21974_2.
>>> [22] <exec> $ git show -s --format='%H' '6d443cae8300ee97c640c8374ea19d36b3ea6cc8' --
<<< [22] <exec> 4,877 us
Downloading binary data for 'phpmailer.lang-br.php'...
>>> [23] <conduit> file.download() <bytes = 169>
>>> [24] <http> https://phabricator.mydomain.com/api/file.download
<<< [24] <http> 337,732 us
<<< [23] <conduit> 338,115 us

[2015-12-10 21:50:05] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Cannot change a fulfilled promise to rejected at [<phutil>/src/conduit/ConduitFuture.php:58]
arcanist(), flarc(), phutil()
  #0 ConduitFuture::didReceiveResult(array) called at [<phutil>/src/future/FutureProxy.php:58]
  #1 FutureProxy::getResult() called at [<phutil>/src/future/FutureProxy.php:35]
  #2 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:58]
  #3 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/parser/ArcanistBundle.php:688]
  #4 ArcanistBundle::getBlob(string, string) called at [<arcanist>/src/parser/ArcanistBundle.php:717]
  #5 ArcanistBundle::buildBinaryChange(ArcanistDiffChange, NULL) called at [<arcanist>/src/parser/ArcanistBundle.php:395]
  #6 ArcanistBundle::toGitPatch() called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:691]
  #7 ArcanistPatchWorkflow::run() called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:397]
  #8 ArcanistPatchWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382]

Event Timeline

joshuaspence closed this task as Invalid.
joshuaspence claimed this task.
joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence changed the edit policy from "All Users" to "Community (Project)".
joshuaspence added a subscriber: joshuaspence.

Hmm, actually... I think this is the fault of a custom extension I am using to upload files to S3.

[11-Dec-2015 08:50:05 Australia/Sydney] [2015-12-11 08:50:05] EXCEPTION: (LogicException) Cannot change a fulfilled promise to rejected at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:126]
[11-Dec-2015 08:50:05 Australia/Sydney] arcanist(head=master, ref.master=0c8124a2729d), phabricator(head=master, ref.master=6985643f5809, custom=1), phlab(head=master, ref.master=8ad7511eb350), phutil(head=master, ref.master=230c3e161c9a)
[11-Dec-2015 08:50:05 Australia/Sydney]   #0 <#2> GuzzleHttp\Promise\Promise::settle(string, PhutilMissingSymbolException) called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:114]
[11-Dec-2015 08:50:05 Australia/Sydney]   #1 <#2> GuzzleHttp\Promise\Promise::reject(PhutilMissingSymbolException) called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:208]
[11-Dec-2015 08:50:05 Australia/Sydney]   #2 <#2> GuzzleHttp\Promise\Promise::callHandler(integer, GuzzleHttp\Psr7\Response, array) called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:152]
[11-Dec-2015 08:50:05 Australia/Sydney]   #3 <#2> GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/TaskQueue.php:60]
[11-Dec-2015 08:50:05 Australia/Sydney]   #4 <#2> GuzzleHttp\Promise\TaskQueue::run() called at [/usr/src/phlab/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php:96]
[11-Dec-2015 08:50:05 Australia/Sydney]   #5 <#2> GuzzleHttp\Handler\CurlMultiHandler::tick() called at [/usr/src/phlab/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php:123]
[11-Dec-2015 08:50:05 Australia/Sydney]   #6 <#2> GuzzleHttp\Handler\CurlMultiHandler::execute(boolean) called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:240]
[11-Dec-2015 08:50:05 Australia/Sydney]   #7 <#2> GuzzleHttp\Promise\Promise::invokeWaitFn() called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:217]
[11-Dec-2015 08:50:05 Australia/Sydney]   #8 <#2> GuzzleHttp\Promise\Promise::waitIfPending() called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:261]
[11-Dec-2015 08:50:05 Australia/Sydney]   #9 <#2> GuzzleHttp\Promise\Promise::invokeWaitList() called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:219]
[11-Dec-2015 08:50:05 Australia/Sydney]   #10 <#2> GuzzleHttp\Promise\Promise::waitIfPending() called at [/usr/src/phlab/vendor/guzzlehttp/promises/src/Promise.php:62]
[11-Dec-2015 08:50:05 Australia/Sydney]   #11 <#2> GuzzleHttp\Promise\Promise::wait() called at [/usr/src/phlab/vendor/aws/aws-sdk-php/src/AwsClient.php:202]
[11-Dec-2015 08:50:05 Australia/Sydney]   #12 <#2> Aws\AwsClient::execute(Aws\Command) called at [/usr/src/phlab/vendor/aws/aws-sdk-php/src/AwsClient.php:167]
[11-Dec-2015 08:50:05 Australia/Sydney]   #13 <#2> Aws\S3\S3Client::getObject(array) called at [<phlab>/applications/files/engine/PhlabAWSFileStorageEngine.php:127]
[11-Dec-2015 08:50:05 Australia/Sydney]   #14 <#2> PhlabAWSFileStorageEngine::readFile(string) called at [<phabricator>/src/applications/files/storage/PhabricatorFile.php:664]
[11-Dec-2015 08:50:05 Australia/Sydney]   #15 <#2> PhabricatorFile::loadFileData() called at [<phabricator>/src/applications/files/conduit/FileDownloadConduitAPIMethod.php:40]
[11-Dec-2015 08:50:05 Australia/Sydney]   #16 <#2> FileDownloadConduitAPIMethod::execute(ConduitAPIRequest) called at [<phabricator>/src/applications/conduit/method/ConduitAPIMethod.php:113]
[11-Dec-2015 08:50:05 Australia/Sydney]   #17 <#2> ConduitAPIMethod::executeMethod(ConduitAPIRequest) called at [<phabricator>/src/applications/conduit/call/ConduitCall.php:135]
[11-Dec-2015 08:50:05 Australia/Sydney]   #18 <#2> ConduitCall::executeMethod() called at [<phabricator>/src/applications/conduit/call/ConduitCall.php:85]
[11-Dec-2015 08:50:05 Australia/Sydney]   #19 <#2> ConduitCall::execute() called at [<phabricator>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:82]
[11-Dec-2015 08:50:05 Australia/Sydney]   #20 phlog(LogicException) called at [<phabricator>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:102]
[11-Dec-2015 08:50:05 Australia/Sydney]   #21 PhabricatorConduitAPIController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:237]
[11-Dec-2015 08:50:05 Australia/Sydney]   #22 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:149]
[11-Dec-2015 08:50:05 Australia/Sydney]   #23 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]

I don't think that string is one of ours. Does it appear in flarc?

epriestley@orbital ~/dev/libphutil $ git grep -i 'fulfilled' .
epriestley@orbital ~/dev/arcanist $ git grep -i 'fulfilled' .
epriestley@orbital ~/dev/phabricator $ git grep -i 'fulfilled' .
src/applications/harbormaster/step/HarbormasterLeaseHostBuildStepImplementation.php:    // Wait until the lease is fulfilled.
src/applications/harbormaster/step/HarbormasterLeaseHostBuildStepImplementation.php:    // TODO: This will throw an exception if the lease can't be fulfilled;
epriestley@orbital ~/dev/phabricator $

I don't know how exactly, but this error is related to T1116. Basically, adding this code fixes the described issue:

spl_autoload_register(function() {});

I'm going to see if I can make libphutil compatible with this library which might involve some hackery such as in D14523.