johanwilfer / vagrant-easy-drupal8

A simple way to fire up a Drupal 8 in Vagrant
MIT License
0 stars 10 forks source link

zlib_decode(): data error #7

Closed seetee closed 7 years ago

seetee commented 7 years ago

Okay, so this is a tough one.

Sometimes a new virtual machines fails to install drush. Composer gives the error message below:

==> default: --> Installing drush...
==> default: Do not run Composer as root/super user! See https://getcomposer.org/root for details
==> default: Do not run Composer as root/super user! See https://getcomposer.org/root for details
==> default: Do not run Composer as root/super user! See https://getcomposer.org/root for details
==> default: Loading composer repositories with package information
==> default: Updating dependencies (including require-dev)
==> default: Failed to decode response: zlib_decode(): data error
==> default: Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
==> default:
==> default:   [ErrorException]
==> default:   zlib_decode(): data error
==> default:
==> default: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

This has happened both on Windows and Linux, in Virtualbox 5.1.8 and 5.1.10, both in my fork and in this main project. Not every time though, but more and more often.

Searching the web gives hints of incompatible Virtualbox-versions or IPv6 connectivity problems. But I don't have IPv6 at home, and find the problem occurring sporadically in different versions of Virtualbox. No one seems to have a simple answer.

What kind of data do we need to find and solve this issue?

johanwilfer commented 7 years ago

Well, just guessing here but maybe leftovers from previos installs causes this. We don't delete the drupal-dir if we have one, so that may cause issues.

Maybe we should look if we have one and move it away so we can proceed with the install (to delete it in the script is a bit harsh I think).

I've done two vagrant up now and fixed some other issues, and did not get this error.

seetee commented 7 years ago

Thus bug appears even after a 'vagrant destroy'.

johanwilfer commented 7 years ago

Yeah, but the files under /drupal is not destroy:ed on a "vagrant destroy". But we should probably move them away to "drupal-backup-2016-12-01-10-00-00" or something like that.

seetee commented 7 years ago

After some more testing it seems like this was caused by a somewhat defective wireless network. When I tried it again with an ethernet cable, there was no error. I will test this more extensively, but will close this for now.

Although, if this is a network problem, and the only thing that falters are when composer tries to install drush, perhaps there are some alternative way to do that which is more robust. Might be worth looking into.