Page MenuHomePhabricator

[Diffusion] Issue with checking out SVN repository while clone is successful for a Git repository
Closed, InvalidPublic

Description

Short description: Issue with daemons checking out SVN repository while daemon clone is successful for a Git repository

Environment: Ubuntu 16.04 LTS
Components versions modified on:
phabricator (Sun, Oct 2)
arcanist (Wed, Sep 21)
phutil (Fri, Sep 30)

On a fresh Phabricator install, I have started setting up remote repositories to be observed.

I was successful in setting up a remote repository to be observed with Git, however when attempting to do the same for an SVN repository I encounter the following issue (listing steps to reproduce the issue below):

Reproduction steps:

  • Add a new SVN repository in Diffusion tracking a remote repository in Observed mode
  • Activate the repository in Diffusion

Expected result:

  • The repository should be checked out via daemon activity (this works well for me for a Git remote repository which I have tested in Observe mode)

Actual result:

  • The daemon log displays an error, i.e.:

EXCEPTION: (PhutilProxyException) Error while updating the "R<repository_id>" repository. {>} (CommandException) Command failed with error #255!
'<path_to_phabricator>/phabricator/bin/repository' update -- 'R<repository_id>'

  • Running

./phabricator/bin/repository update --trace R<repository_id>

provided the following information:

EXCEPTION: (PhutilMissingSymbolException) Failed to load class or interface 'SimpleXMLElement': the class or interface 'SimpleXMLElement' is not defined in the library map for any loaded phutil 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 libphutil, 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: [...]

I would like to mention the fact that I had not performed any upgrade on phabricator or libphutil or arcanist prior to attempting to perform the check out as per the above comment suggestion. After viewing the above message I decided to try performing updates on all components and restarting apache, but the error was still present (see also note below)

Note: Prior to creating this issue I have upgraded phabricator, libphutil and arcanist to the latest versions.

Event Timeline

This is a PHP error, what PHP are you running, XML is likely missing from it.

chad claimed this task.

There isn't enough information here for the upstream to move forward on this ticket. It appears to be a local PHP issue, but without further information we don't know how to detect or warn you about this set up. If you're using PHP7 for example, it's not currently supported. If you're using PHP5.6, make sure XML is enabled.

If more information comes to light, let us know and we can re-visit.

For anyone who discovers this task, the issue appears to be related to the SimpleXML PHP library. This must be installed and enabled for the system PHP. Ubuntu 16.04LTS includes PHP7.0, so if you do any magic to run PHP7.1 or PHP5.6, your system php will not match what is running on phabricator.

This is what I did to fix it (Substitute 5.6 for 7.1 if you want to downgrade):

sudo add-apt-repository ppa:ondrej/php

sudo apt-get update

sudo apt-get install php7.1

a2enmod php7.1

a2dismod php7.0

sudo apt remove php7.0

sudo apt-get install php7.1-xml

phpenmod simplexml

apache2ctl restart

bin/phd restart

This will simlink your system PHP to the version you installed. Also, it'll enable the simplexml library that libphutil needs in this instance.

Just ran into this issue on a freshly installed Ubuntu 16.04 docker container.
Actually it's just the package phpX.Y-xml what is missing.
In my case it was php7.2 so all I needed to do was:

sudo apt install php7.2-xml

(No extra repositories needed...)