Arc branches throws ConduitClientException

[2020-07-15 06:24:10] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Failed to load symbol “ArcanistRepositoryURINormalizer” (of type “class or interface”).

The class or interface “ArcanistRepositoryURINormalizer” is not defined in the library map of any loaded library.


Reproduction Instructions

  1. update arcanist the latest version with arc upgrade on local computer
  2. update phabricator to the latest version on the server
  3. cd to local repository directory
  4. run arc branches

Expected: should show branch information as before update
Actual:

Phabricator/Arcanist Version

Phabricator Version Information

Library Version Date Branchpoint
phabricator f88dd1378076 Tue, Jul 14 1d4d860cb5a0
arcanist 38d7a07d3722 May 25 2020

Other Version Information

Binary Version Path
php 7.2.20-1+0~20190710.23+debian9~1.gbp2428c5 fpm-fcgi
diff 3.5 /usr/bin/diff
git 2.11.0 /usr/bin/git
hg Not Available
pygmentize 2.2.0 /usr/bin/pygmentize
svn Not Available

arc version

arcanist 65cda1596f25bb9daea1d78c46402ab61df073d5 (9 Jul 2020)

Trace

 ARGV  /usr/local/bin/arc branches --trace
>>> [1] (+0) <exec> $ git for-each-ref --format '%(refname)%01%(objectname)%01%(committerdate:raw)%01%(tree)%01%(*objectname)%01%(subject)%01%(subject)%0a%0a%(body)%01%02' -- refs/
<<< [1] (+6) <exec> 6,160 us
>>> [2] (+8) <exec> $ git symbolic-ref --quiet HEAD --
<<< [2] (+9) <exec> 295 us
>>> [3] (+11) <exec> $ git remote --verbose
<<< [3] (+16) <exec> 5,184 us
>>> [4] (+19) <exec> $ git for-each-ref --format '%(refname)%01%(objectname)%01%(committerdate:raw)%01%(tree)%01%(*objectname)%01%(subject)%01%(subject)%0a%0a%(body)%01%02' -- refs/
<<< [4] (+25) <exec> 5,264 us
>>> [5] (+26) <exec> $ git symbolic-ref --quiet HEAD --
<<< [5] (+26) <exec> 363 us
[2020-07-15 06:40:28] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Failed to load symbol "ArcanistRepositoryURINormalizer" (of type "class or interface").

The class or interface "ArcanistRepositoryURINormalizer" is not defined in the library map of any loaded library.

If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded "phabricator/" without upgrading "arcanist/", or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.

If you are a developer and this symbol was recently added or moved, your library map may need to be rebuilt. You can rebuild the map by running "arc liberate".

For more information, see: https://phurl.io/newclasses at [<arcanist>/src/conduit/ConduitFuture.php:65]
arcanist(head=master, ref.master=65cda1596f25)
  #0 ConduitFuture::didReceiveResult(array) called at [<arcanist>/src/future/FutureProxy.php:40]
  #1 Future::updateFuture() called at [<arcanist>/src/future/FutureProxy.php:35]
  #2 FutureProxy::isReady() called at [<arcanist>/src/conduit/ConduitSearchFuture.php:62]
  #3 ConduitSearchFuture::isReady() called at [<arcanist>/src/future/Future.php:79]
  #4 Future::updateFuture() called at [<arcanist>/src/future/FutureIterator.php:217]
  #5 FutureIterator::next() called at [<arcanist>/src/future/FutureIterator.php:190]
  #6 FutureIterator::rewind() called at [<arcanist>/src/hardpoint/ArcanistHardpointEngine.php:213]
  #7 ArcanistHardpointEngine::updateFutures() called at [<arcanist>/src/hardpoint/ArcanistHardpointEngine.php:176]
  #8 ArcanistHardpointEngine::waitForRequests(array) called at [<arcanist>/src/runtime/ArcanistRuntime.php:857]
  #9 ArcanistRuntime::loadHardpoints(array, ArcanistHardpointRequestList) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:2324]
  #10 ArcanistWorkflow::loadHardpoints(array, string) called at [<arcanist>/src/repository/api/ArcanistGitAPI.php:1796]
  #11 ArcanistGitAPI::newPublishedCommitHashes() called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:821]
  #12 ArcanistRepositoryAPI::getPublishedCommitHashes() called at [<arcanist>/src/workflow/ArcanistMarkersWorkflow.php:19]
  #13 ArcanistMarkersWorkflow::runWorkflow(PhutilArgumentParser) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:227]
  #14 ArcanistWorkflow::executeWorkflow(PhutilArgumentParser) called at [<arcanist>/src/toolset/ArcanistPhutilWorkflow.php:21]
  #15 ArcanistPhutilWorkflow::execute(PhutilArgumentParser) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:492]
  #16 PhutilArgumentParser::parseWorkflowsFull(array) called at [<arcanist>/src/runtime/ArcanistRuntime.php:171]
  #17 ArcanistRuntime::executeCore(array) called at [<arcanist>/src/runtime/ArcanistRuntime.php:37]
  #18 ArcanistRuntime::execute(array) called at [<arcanist>/support/init/init-arcanist.php:6]
  #19 require_once(string) called at [<arcanist>/bin/arc:10]

NB: Any other commands do not produce this error.

More info about the local arcanist:

lrwxrwxrwx 1 andrius andrius 49 liep.  15 09:19 arc -> /home/www/dev/.local/phabricator/arcanist/bin/arc

andrius > buster > …/arcanist > master > $ git status

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

andrius > buster > …/arcanist > master > $ git log --oneline

65cda159 (HEAD -> master, origin/master, origin/HEAD) Preserve bookmarks across "hg rebase --keep --collapse", and destroy them before "hg strip/prune"
354da1dd When saving and restoring local state in Mercurial, also save and restore bookmarks
3633364b Clean up push failure messaging in "arc land" slightly
710bceab When "arc land" fails a Mercurial push, actually raise it as an exception
41774ba9 Fix additional Mercurial/Python compatibility issues in "arc land"
a28e76b7 Allow "hg arc-ls-markers" to run under Python 2 or Python 3
79a6dfd7 Fix a MarkerRef call to get the active bookmark in Mercurial
...

andrius > buster > …/libphutil > master > $ git status

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

andrius > buster > …/libphutil > master > $ git log --oneline

ce63d5b Move additional classes out of libphutil, to Phabricator
893fe11 Move lingering "Aphront" classes out of libphutil
cc2a3db Move search query compiler / stemmer classes out of libphutil
39ed96c Fix "implode()" argument order in query string construction
...

I have also noticed this in another repository and arc diff. Here is the trace:

 ARGV  /usr/local/bin/arc diff --trace
 ARGV  /home/www/dev/.local/phabricator/arcanist/scripts/arcanist.php diff --trace
 LOAD  Loaded "arcanist" from "/home/www/dev/.local/phabricator/arcanist/src".
Config: Reading user configuration file "/home/andrius/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Unable to find .arcconfig in any of these locations: /home/www/dev/.arcconfig.
Working Copy: Path "/home/www/dev" is part of `git` working copy "/home/www/dev".
Working Copy: Project root is at "/home/www/dev".
Config: Did not find local configuration at "/home/www/dev/.git/arc/config".
>>> [1] (+0) <conduit> user.whoami() <bytes = 117>
<<< [1] (+92) <conduit> 92,664 us
>>> [2] (+95) <exec> $ git --version
<<< [2] (+98) <exec> 3,070 us
>>> [3] (+99) <exec> $ git status --porcelain=2 -z
<<< [3] (+102) <exec> 3,758 us
>>> [4] (+103) <event> diff.didCollectChanges <listeners = 0>
<<< [4] (+104) <event> 131 us
>>> [5] (+104) <exec> $ git rev-parse --verify HEAD^
<<< [5] (+107) <exec> 2,987 us
>>> [6] (+107) <exec> $ git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'
<<< [6] (+111) <exec> 3,023 us
>>> [7] (+111) <exec> $ git cat-file -t master
<<< [7] (+114) <exec> 3,400 us
>>> [8] (+115) <exec> $ git merge-base master HEAD
<<< [8] (+118) <exec> 3,458 us
>>> [9] (+119) <exec> $ git rev-parse HEAD
<<< [9] (+121) <exec> 2,794 us
>>> [10] (+122) <exec> $ git log --first-parent --format=medium ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb..36a5fd7c893100d8bfb0ecb4bde5b9e503d7263c
<<< [10] (+124) <exec> 2,672 us
>>> [11] (+128) <exec> $ git log 36a5fd7c893100d8bfb0ecb4bde5b9e503d7263c --not ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb --format='%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02' --
<<< [11] (+132) <exec> 3,946 us
>>> [12] (+132) <conduit> differential.query() <bytes = 263>
<<< [12] (+185) <conduit> 52,721 us
>>> [13] (+185) <exec> $ git rev-parse --git-dir
<<< [13] (+188) <exec> 2,903 us
>>> [14] (+189) <exec> $ git log 36a5fd7c893100d8bfb0ecb4bde5b9e503d7263c --not ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb --format='%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02' --
<<< [14] (+192) <exec> 3,200 us
>>> [15] (+192) <conduit> differential.parsecommitmessage() <bytes = 313>
<<< [15] (+252) <conduit> 59,744 us
>>> [16] (+252) <event> diff.willBuildMessage <listeners = 0>
<<< [16] (+252) <event> 72 us
>>> [17] (+253) <conduit> differential.getcommitmessage() <bytes = 362>
<<< [17] (+314) <conduit> 60,872 us
>>> [18] (+314) <exec> $ git symbolic-ref --quiet HEAD
<<< [18] (+317) <exec> 3,213 us
>>> [19] (+318) <exec> $ which editor
<<< [19] (+320) <exec> 2,007 us
>>> [20] (+1,779) <conduit> differential.parsecommitmessage() <bytes = 317>
<<< [20] (+1,871) <conduit> 92,722 us
>>> [21] (+1,872) <conduit> user.query() <bytes = 196>
<<< [21] (+1,989) <conduit> 117,520 us
>>> [22] (+1,989) <event> diff.didBuildMessage <listeners = 0>
<<< [22] (+1,989) <event> 108 us
Linting...
No lint engine configured for this project.
Running unit tests...
>>> [23] (+1,992) <exec> $ git rev-parse HEAD
<<< [23] (+1,995) <exec> 2,855 us
>>> [24] (+1,995) <exec> $ git merge-base ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb 36a5fd7c893100d8bfb0ecb4bde5b9e503d7263c
<<< [24] (+1,998) <exec> 2,906 us
>>> [25] (+1,999) <exec> $ git diff --no-ext-diff --no-textconv --submodule=short --raw ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb HEAD --
<<< [25] (+2,002) <exec> 3,557 us
No unit test engine is configured for this project.
>>> [26] (+2,003) <exec> $ git -c 'diff.suppressBlankEmpty=false' diff --no-ext-diff --no-textconv --submodule=short --no-color --src-prefix=a/ --dst-prefix=b/ -U32767 -M -C ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb 36a5fd7c893100d8bfb0ecb4bde5b9e503d7263c --
<<< [26] (+2,008) <exec> 4,266 us
>>> [27] (+2,010) <exec> $ git rev-parse ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb
<<< [27] (+2,013) <exec> 3,530 us
>>> [28] (+2,014) <exec> $ git symbolic-ref --quiet HEAD
<<< [28] (+2,018) <exec> 3,792 us
>>> [29] (+2,018) <exec> $ git log --format=medium -n16 ed1c5cdba87fb39f8bfdbea04c8398d95a55d6eb
<<< [29] (+2,022) <exec> 4,019 us
>>> [30] (+2,025) <exec> $ git symbolic-ref --quiet HEAD
<<< [30] (+2,029) <exec> 4,487 us
>>> [31] (+2,031) <exec> $ git rev-parse --symbolic-full-name improvements@{upstream}
<<< [31] (+2,035) <exec> 4,642 us
>>> [32] (+2,036) <exec> $ git rev-parse --symbolic-full-name master@{upstream}
<<< [32] (+2,040) <exec> 4,061 us
>>> [33] (+2,040) <exec> $ git remote get-url -- origin
<<< [33] (+2,044) <exec> 3,306 us
>>> [34] (+2,045) <conduit> repository.query() <bytes = 221>
<<< [34] (+2,152) <conduit> 107,657 us

[2020-07-15 14:03:10] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Failed to load symbol "ArcanistRepositoryURINormalizer" (of type "class or interface").

The class or interface "ArcanistRepositoryURINormalizer" is not defined in the library map of any loaded library.

If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded "phabricator/" without upgrading "arcanist/", or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.

If you are a developer and this symbol was recently added or moved, your library map may need to be rebuilt. You can rebuild the map by running "arc liberate".

For more information, see: https://phurl.io/newclasses at [<arcanist>/src/conduit/ConduitFuture.php:65]
arcanist(head=master, ref.master=65cda1596f25)
  #0 ConduitFuture::didReceiveResult(array) called at [<arcanist>/src/future/FutureProxy.php:40]
  #1 Future::updateFuture() called at [<arcanist>/src/future/FutureProxy.php:35]
  #2 FutureProxy::isReady() called at [<arcanist>/src/future/Future.php:79]
  #3 Future::updateFuture() called at [<arcanist>/src/future/FutureIterator.php:217]
  #4 FutureIterator::next() called at [<arcanist>/src/future/FutureIterator.php:190]
  #5 FutureIterator::rewind()
  #6 iterator_to_array(FutureIterator) called at [<arcanist>/src/future/FutureIterator.php:84]
  #7 FutureIterator::resolveAll() called at [<arcanist>/src/future/Future.php:46]
  #8 Future::resolve() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1953]
  #9 ArcanistWorkflow::loadRepositoryInformation() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1931]
  #10 ArcanistWorkflow::getRepositoryInformation() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1874]
  #11 ArcanistWorkflow::getRepositoryPHID() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2266]
  #12 ArcanistDiffWorkflow::buildDiffSpecification() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:382]
  #13 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:419]

It seems that the problems started appearing after the latest Phabricator upgrade and not arcanist… What can be done to solve this mystery?

Running arc liberate everywhere did not help.

This does not look like an upstream version of Arcanist.

$ git show 38d7a07d3722 --
fatal: bad revision '38d7a07d3722'

Make sure arcanist/ is up to date on the server (next to phabricator/) and try reverting any local changes.

When you upgrade phabricator/, you must also update arcanist/ on the server alongside it. See:

https://secure.phabricator.com/book/phabricator/article/upgrading/

IMPORTANT: You MUST upgrade libphutil, arcanist and phabricator at the same time.

(This is slightly out of date: libphutil no longer needs to be updated.)

Indeed that was the issue. Something somewhere went south and caused the weird issue. After removing and cloning again the server-side arcanist which is in the same directory where phabricator is, has solved the issue.

So a statement that arcanist is a client to phabricator is not entirely correct as phabricator does not work without arcanist side by side on the server…

So this is not really an issue then. Can be closed. :slight_smile: