Page MenuHomePhabricator

arc patch D1234 crashes with exception when D1234 does not exist
Closed, DuplicatePublic

Description

I just started using arc (before I only used the web interface) and arc patch does not seem to work for me.

arc version:

mna@mnanb:~/jcb/code/toolbox255$ arc version   
arcanist 9e82ef979e8148c43b9b8439025d505b1219e213 (25 Aug 2016)
libphutil e94f6e738e2dd6e2a1921b9fc6665d6b9ae85c61 (7 Sep 2016)

Steps to reproduce: run arc patch D229 as in:

mna@mnanb:~/jcb/code/toolbox$ arc patch D229
[2016-09-07 12:18:50] ERROR 2: Invalid argument supplied for foreach() at [/home/mna/jcb/code/arcanist/src/workflow/ArcanistWorkflow.php:1200]
arcanist(head=master, ref.master=9e82ef979e81), phutil(head=master, ref.master=e94f6e738e2d)
  #0 ArcanistWorkflow::loadBundleFromConduit(ConduitClient, array) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1188]
  #1 ArcanistWorkflow::loadRevisionBundleFromConduit(ConduitClient, string) called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:383]
  #2 ArcanistPatchWorkflow::run() called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:397]
  #3 ArcanistPatchWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
[2016-09-07 12:18:50] EXCEPTION: (TypeError) Argument 1 passed to idx() must be of the type array, boolean given, called in /home/mna/jcb/code/arcanist/src/workflow/ArcanistWorkflow.php on line 1207 at [<phutil>/src/utils/utils.php:36]
arcanist(head=master, ref.master=9e82ef979e81), phutil(head=master, ref.master=e94f6e738e2d)
  #0 idx(boolean, string) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1207]
  #1 ArcanistWorkflow::loadBundleFromConduit(ConduitClient, array) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1188]
  #2 ArcanistWorkflow::loadRevisionBundleFromConduit(ConduitClient, string) called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:383]
  #3 ArcanistPatchWorkflow::run() called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:397]
  #4 ArcanistPatchWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394

Please let me know if you need additional information.
Do you require information about the server side?

Event Timeline

I just noticed that D229 is not actually a valid Differential Id.
It is the number of the associated Diff.

So there was an input error on my side.
However, arc should probably not crash but report something like "D229 does not exist on the Phabricator server. Please see the list of Differentials for valid Ids."

mna renamed this task from arc patch D1234 crashes with exception to arc patch D1234 crashes with exception when D1234 does not exist.Sep 7 2016, 1:14 PM