richdynamix / magestead

The Vagrant Solution for Magento Developers
81 stars 29 forks source link

"String could not be parsed as XML" on magestead new #104

Open tylers-username opened 7 years ago

tylers-username commented 7 years ago

After running magestead new m1-base with the options:

I get the error shown below. The source of the problem appears to be that composer install is running on my host machine which has PHP 7 installed. If this is the case, my expectations are that the guest machine should be executing composer install.

Bringing machine 'local' up with 'virtualbox' provider...
==> local: Importing base box 'richdynamix/magestead-ubuntu14-apache-php56'...
==> local: Matching MAC address for NAT networking...
==> local: Checking if box 'richdynamix/magestead-ubuntu14-apache-php56' is up to date...
==> local: Setting the name of the VM: m1base_local_1494249646557_91359
It appears your machine doesn't support NFS, or there is not an
adapter to enable NFS on this machine for Vagrant. Please verify
that `nfsd` is installed on your machine, and try again. If you're
on Windows, NFS isn't supported. If the problem persists, please
contact Vagrant support.
Installing Magento with Composer
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Loading composer repositories with package information
Updating dependencies (including require-dev)         
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for magetest/magento-behat-extension dev-feature/Behat3 -> satisfiable by magetest/magento-behat-extension[dev-feature/Behat3].
    - magetest/magento-behat-extension dev-feature/Behat3 requires php ~5.3 -> your PHP version (7.0.15) does not satisfy that requirement.

Installing Magento Software
VM must be running to open SSH connection. Run `vagrant up`
to start the virtual machine.
PHP Warning:  file_get_contents(/home/tyler/PhpStorm/Projects/Tyler/m1base/public/app/etc/local.xml): failed to open stream: No such file or directory in /home/tyler/.config/composer/vendor/richdynamix/magestead/src/Magestead/Installers/MagentoProject.php on line 214
PHP Stack trace:
PHP   1. {main}() /home/tyler/.config/composer/vendor/richdynamix/magestead/magestead:0
PHP   2. Symfony\Component\Console\Application->run() /home/tyler/.config/composer/vendor/richdynamix/magestead/magestead:66
PHP   3. Symfony\Component\Console\Application->doRun() /home/tyler/.config/composer/vendor/symfony/console/Application.php:124
PHP   4. Symfony\Component\Console\Application->doRunCommand() /home/tyler/.config/composer/vendor/symfony/console/Application.php:200
PHP   5. Symfony\Component\Console\Command\Command->run() /home/tyler/.config/composer/vendor/symfony/console/Application.php:835
PHP   6. Magestead\Command\NewCommand->execute() /home/tyler/.config/composer/vendor/symfony/console/Command/Command.php:264
PHP   7. Magestead\Installers\Project::create() /home/tyler/.config/composer/vendor/richdynamix/magestead/src/Magestead/Command/NewCommand.php:54
PHP   8. Magestead\Installers\MagentoProject->__construct() /home/tyler/.config/composer/vendor/richdynamix/magestead/src/Magestead/Installers/Project.php:20
PHP   9. Magestead\Installers\MagentoProject->installMagento() /home/tyler/.config/composer/vendor/richdynamix/magestead/src/Magestead/Installers/MagentoProject.php:33
PHP  10. Magestead\Installers\MagentoProject->configureRedis() /home/tyler/.config/composer/vendor/richdynamix/magestead/src/Magestead/Installers/MagentoProject.php:80
PHP  11. Magestead\Installers\MagentoProject->updateConfigXml() /home/tyler/.config/composer/vendor/richdynamix/magestead/src/Magestead/Installers/MagentoProject.php:204
PHP  12. file_get_contents() /home/tyler/.config/composer/vendor/richdynamix/magestead/src/Magestead/Installers/MagentoProject.php:214

  [Exception]                        
  String could not be parsed as XML  
tylers-username commented 7 years ago

Actually, the first fail is at NFS detection. Installing with sudo apt-get install nfs-common nfs-kernel-server and testing to see if the error continues to occur.

Edit: Because I assume that the error originally reported is a result of the box failing to launch, I am closing this ticket.

However, I continue to encounter the following error with NFS:

==> local: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 192.168.47.1:/home/tyler/PhpStorm/Projects/Tyler/mage1box /var/www
result=$?
if test $result -eq 0; then
if test -x /sbin/initctl && command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/var/www
fi
else
exit $result
fi

Stdout from the command:

Stderr from the command:

mount.nfs: access denied by server while mounting 192.168.47.1:/home/tyler/PhpStorm/Projects/Tyler/mage1box
tylers-username commented 7 years ago

Fixing the NFS issue did not resolve the [Exception] String could not be parsed as XML error. I assumed that Vagrant failing at NFS prevented the access to the Vagrant box causing the composer install to be executed on the host machine (I know, a stretch). But, of course, that was not the case.

My host is Ubuntu 17, but am experiencing the same on 16.10 and 16.04. My home directory is encrypted, but I am now deploying to an unencrypted directory.

Not sure what else I can provide from here.

Note: For anyone curious, the NFS issue was resolved by (1) deploying magestead in a non-encrypted directory and (2) by disabling NFS in the firewall.