You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to do composer install while on a train, and it produced this output with multiple packages, which I assume are the ones which were not in my local cache:
- Installing symfony/phpunit-bridge (v5.3.4): Extracting archive
10/110 [==>-------------------------] 9% Failed to extract fabpot/goutte: (9) '/usr/bin/unzip' -qq '/Users/joachim/Sites/drupal-plain-clone/vendor/composer/tmp-58e741e64aa2c99bf8057ecca317a1c0' -d '/Users/joachim/Sites/drupal-plain-clone/vendor/composer/3536e130'
[/Users/joachim/Sites/drupal-plain-clone/vendor/composer/tmp-58e741e64aa2c99bf8057ecca317a1c0]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /Users/joachim/Sites/drupal-plain-clone/vendor/composer/tmp-58e741e64aa2c99bf8057ecca317a1c0 or
/Users/joachim/Sites/drupal-plain-clone/vendor/composer/tmp-58e741e64aa2c99bf8057ecca317a1c0.zip, and cannot find /Users/joachim/Sites/drupal-plain-clone/vendor/composer/tmp-58e741e64aa2c99bf8057ecca317a1c0.ZIP, period.
The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class
It eventually failed with this:
[UnexpectedValueException]
'/Users/joachim/Sites/drupal-plain-clone/vendor/composer/tmp-d9bf75a5773a2fda5888ae90e27c8cc8' is not a zip
archive.
When I was back home, I removed the /vendor folder from my project, and tried to do composer install from scratch.
This produced the same errors.
The problem was only fixed once I did composer clear-cache.
My theory is that because I was on the train's wifi, Composer either wasn't able to reach the package servers at all, or hit a 'log in to wifi' type thing instead.
I would expect Composer to fail, but not put bad data into its cache.
The text was updated successfully, but these errors were encountered:
Hmm.. I can't reproduce this even if I cut the file in half here just before it gets written to cache after assuming a successful download
I don't think there was even a successful download. I suspect the HTTP requests got intercepted by the train wifi's login system and so the downloader got some sort of HTML back instead of a zip file.
Yeah but that would probably pass for a 200, making composer it got a valid archive, that's why I truncated the file there, to simulate a 200-yet-corrupt download
Anyway I can reproduce by corrupting the cache on purpose, so I'll try to fix things so it doesn't get stuck with a bad cache, but it's weird that you got into this state in the first place.
Composer version: 2.0.3
I was trying to do
composer install
while on a train, and it produced this output with multiple packages, which I assume are the ones which were not in my local cache:It eventually failed with this:
When I was back home, I removed the /vendor folder from my project, and tried to do
composer install
from scratch.This produced the same errors.
The problem was only fixed once I did
composer clear-cache
.My theory is that because I was on the train's wifi, Composer either wasn't able to reach the package servers at all, or hit a 'log in to wifi' type thing instead.
I would expect Composer to fail, but not put bad data into its cache.
The text was updated successfully, but these errors were encountered: