composer: Invalid ZIP error for a few weeks now
Hi,
We haven’t been able to download from dist for several weeks (maybe months) now. We are forced to use source, which takes quite long because composer doesn’t clone with depth=1. Can someone help debug?
$ composer update -vvv
Reading ./composer.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /home/oracle/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /home/oracle/.composer/cache/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /home/oracle/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/p-provider-2014-10.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/p-provider-2015-01.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/p-provider-2015-04.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/p-provider-2015-07.json from cache
Downloading http://packagist.org/p/provider-latest$3b07827820eaa10695f2f89e76cc76d61d41a1f1a79232a70b5065890f07bd34.json
Writing /home/oracle/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-phpmailer$phpmailer.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-easybook$geshi.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-erusev$parsedown.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-filp$whoops.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-guzzlehttp$guzzle.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-guzzlehttp$psr7.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-guzzlehttp$promises.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-psr$http-message.json from cache
Reading /home/oracle/.composer/cache/repo/https---packagist.org/provider-symfony$process.json from cache
Analyzed 564 packages to resolve dependencies
Analyzed 67 rules to resolve dependencies
- Installing phpmailer/phpmailer (v5.2.10)
Downloading https://api.github.com/repos/PHPMailer/PHPMailer/zipball/07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7
Downloading: 100%
Writing /home/oracle/.composer/cache/files/phpmailer/phpmailer/07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7.zip into cache
Extracting archive
Executing command (CWD): unzip '/app/myapp/vendor/phpmailer/phpmailer/1ae2dec0ddd65b714d123948d48c89f6' -d '/app/myapp/vendor/composer/c4aeedaf' && chmod -R u+w '/app/myapp/vendor/composer/c4aeedaf'
Invalid zip file, retrying...
- Installing phpmailer/phpmailer (v5.2.10)
Downloading https://api.github.com/repos/PHPMailer/PHPMailer/zipball/07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7
Downloading: 100%
Writing /home/oracle/.composer/cache/files/phpmailer/phpmailer/07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7.zip into cache
Extracting archive
Executing command (CWD): unzip '/app/myapp/vendor/phpmailer/phpmailer/1ae2dec0ddd65b714d123948d48c89f6' -d '/app/myapp/vendor/composer/c4aeedaf' && chmod -R u+w '/app/myapp/vendor/composer/c4aeedaf'
Invalid zip file, retrying...
- Installing phpmailer/phpmailer (v5.2.10)
Downloading https://api.github.com/repos/PHPMailer/PHPMailer/zipball/07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7
Downloading: 100%
Writing /home/oracle/.composer/cache/files/phpmailer/phpmailer/07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7.zip into cache
Extracting archive
Executing command (CWD): unzip '/app/myapp/vendor/phpmailer/phpmailer/1ae2dec0ddd65b714d123948d48c89f6' -d '/app/myapp/vendor/composer/c4aeedaf' && chmod -R u+w '/app/myapp/vendor/composer/c4aeedaf'
Failed to download phpmailer/phpmailer from dist: '/app/myapp/vendor/phpmailer/phpmailer/1ae2dec0ddd65b714d123948d48c89f6' is not a zip archive.
Now trying to download from source
- Installing phpmailer/phpmailer (v5.2.10)
Cloning 07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7
Executing command (CWD): git clone --no-checkout 'git://github.com/PHPMailer/PHPMailer.git' '/app/myapp/vendor/phpmailer/phpmailer' && cd '/app/myapp/vendor/phpmailer/phpmailer' && git remote add composer 'git://github.com/PHPMailer/PHPMailer.git' && git fetch composer
Executing command (/app/myapp/vendor/phpmailer/phpmailer): git remote set-url --push origin 'git@github.com:PHPMailer/PHPMailer.git'
Executing command (/app/myapp/vendor/phpmailer/phpmailer): git branch -r
Executing command (/app/myapp/vendor/phpmailer/phpmailer): git checkout 'v5.2.10' --
Executing command (/app/myapp/vendor/phpmailer/phpmailer): git reset --hard '07005ecbb80d11ec8c0f067bb37e8909cc7fcbb7' --
REASON: Required by root: Install command rule (install phpmailer/phpmailer v5.2.10)
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 25 (9 by maintainers)
Commits related to this issue
- Add debugging info about proxy usage, refs #4332 — committed to composer/composer by Seldaek 8 years ago
Well I also can’t see how, but I don’t see why it would work for everyone else but not you two behind proxies. Proxies have led to many weird issues in the past. Unfortunately unless you do a lot of debugging on your own to figure out what is going on it is quite hard for us to help.
All the relevant code for proxy handling is in https://github.com/composer/composer/blob/master/src/Composer/Util/StreamContextFactory.php - then we use that for doing a file_get_content with context.