We have just moved our Phabricator installation to a new domain and setup 301 redirects from the old domain to the new domain. It seems, however, that arc commands are now failing with the following error:
> arc patch --nobranch --skip-dependencies --trace D67921 ARGV '/home/josh/workspace/github.com/phacility/arcanist/bin/../scripts/arcanist.php' 'patch' '--nobranch' '--skip-dependencies' '--trace' 'D67921' LOAD Loaded "phutil" from "/home/josh/workspace/github.com/phacility/libphutil/src". LOAD Loaded "arcanist" from "/home/josh/workspace/github.com/phacility/arcanist/src". Config: Reading user configuration file "/home/josh/.arcrc"... Config: Did not find system configuration at "/etc/arcconfig". Working Copy: Reading .arcconfig from "REDACTED/.arcconfig". Working Copy: Path "REDACTED" is part of `git` working copy "REDACTED". Working Copy: Project root is at "REDACTED". Config: Did not find local configuration at "REDACTED/.git/arc/config". Loading phutil library from 'REDACTED/src'... Loading phutil library from '/home/josh/workspace/github.com/phacility/phabricator/src'... >>> [0] <conduit> differential.querydiffs() <bytes = 76> >>> [1] <http> https://phabricator.REDACTED/api/differential.querydiffs <<< [1] <http> 3,206,007 us <<< [0] <conduit> 3,206,916 us >>> [2] <conduit> user.whoami() <bytes = 117> >>> [3] <http> https://phabricator.REDACTED/api/user.whoami <<< [3] <http> 832,867 us <<< [2] <conduit> 834,450 us [2017-05-28 22:49:50] EXCEPTION: (ConduitClientException) ERR-INVALID-SESSION: Session key is not present. at [<phutil>/src/conduit/ConduitFuture.php:58] arcanist(head=master, ref.master=3c4735795a29), phabricator(head=master, ref.master=b164d2d04bcb, custom=1), phlab(head=master, ref.master=0ea38bb44fef), phutil(head=stable, ref.master=310a831f97ab, ref.stable=8326890bd2b9) #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:64] #3 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:332] #4 ArcanistWorkflow::authenticateConduit() called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:396] #5 ArcanistPatchWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
The issue here is that, by default, curl will change GET requests to POST requests when following redirects.