Packagist: Cannot run composer update, hangs or returns Content-Length mismatch

Created on 8 Jun 2020  ·  15Comments  ·  Source: composer/packagist

I've been unable to run composer update on several different servers this morning.

It either hangs seemingly indefinitely, or returns the error
Content-Length mismatch, received 415311 bytes out of the expected 1479855 http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

Most helpful comment

Hey sorry we had issues on one of the north american mirrors, should be resolved now.

All 15 comments

I keep getting connection errors:

🚀 ➜ COMPOSER_MEMORY_LIMIT=-1 composer install
    1/2:    https://packages.drupal.org/8/drupal/provider-2019-3$b1d3fe0aa776d29d8f4a335842e84abce134d6ab601e47bdde7b5c0d2e9360ed.json
    2/2:    https://packages.drupal.org/8/drupal/provider-2020-1$0df7dca674b5c3b0223bd3736afcbc6728a328ec49f5d1d0b0bedd5cdafd7cae.json
    Finished: success: 2, skipped: 0, failure: 0, total: 2
    1/10:   http://repo.packagist.org/p/provider-latest$215c4e016b47758764d0e4e08ddfb7f3f1f136c1352c443dacadf64d92eb3ed0.json
    56: Recv failure: Connection reset by peer: http://repo.packagist.org/p/provider-2015$48211197e6da155a409c868a701ab020e1a372036469abb847b6b5fca1f4022d.json
    56: Recv failure: Connection reset by peer: http://repo.packagist.org/p/provider-2019$fd0cee1e25f048cd917ee02e0f2bfb3da739bc26fee4f9ac046c56130ac88e34.json
    56: Recv failure: Connection reset by peer: http://repo.packagist.org/p/provider-2019-07$9b89828a9b62035fd94224c41e081535f9cc97aef097b90546ec1664d62413cd.json
    2/10:   http://repo.packagist.org/p/provider-2020-01$13783d8fe1c09d89da1a398f24cc2818065f3a495f32f70aa951eaa3d8aca0af.json
    3/10:   http://repo.packagist.org/p/provider-2019-10$49709c93a7474e2d17dc5aaff7aab6b1e3551956086ef18ea663023a2f36fc98.json
    56: Recv failure: Connection reset by peer: http://repo.packagist.org/p/provider-2018$1683f11e7f107c2088dd4961953a29333bd15a53f91376ca73dcaccfbd9bc9bb.json
    4/10:   http://repo.packagist.org/p/provider-2020-04$dbce6b20f2bac6ec8f954a4be6c1d769933e235c58357d3dd900ebf3d970909d.json
    5/10:   http://repo.packagist.org/p/provider-2016$053550c94f0a6064084aa6b1ec16e31921d1296f504fe33906bd205a4665429a.json
    56: Recv failure: Connection reset by peer: http://repo.packagist.org/p/provider-2017$4ce975a6ceca73d8cc3913f86d1647b1a20b9f81d9141a1610508b70a0a1c4e3.json
    Finished: success: 5, skipped: 0, failure: 5, total: 10

Screen Shot 2020-06-08 at 9 48 03 AM

I can replicate this too. laravel/framework github actions are all failing.

Loading composer repositories with package information
Updating dependencies (including require-dev)


  [Composer\Downloader\TransportException]                                     
  Content-Length mismatch, received 1793303 bytes out of the expected 2354981  


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

👍

Here's the particular URL after running composer update with -vvv

Downloading https://repo.packagist.org/p/provider-2019%248579c5b26c9cbf50c685823b39b19178dbe76a97d5d235ea43d974fb3d5ce89a.json
Content-Length mismatch, received 1113847 out of 1702304 bytes:

(then a big base64 dump)

Found a post on Twitter where they say their mirror is maxed out on bandwidth

https://twitter.com/packagist/status/1266264865573752833

Found a post on Twitter where they say their mirror is maxed out on bandwidth

https://twitter.com/packagist/status/1266264865573752833

@eesquibel that was from 10 days ago.

I have seen it on MULTIPLE json files. All different.

On Mon, Jun 8, 2020 at 10:27 AM Eric Esquibel notifications@github.com
wrote:

Here's the particular URL after running composer update with -vvv

Downloading
https://repo.packagist.org/p/provider-2019%248579c5b26c9cbf50c685823b39b19178dbe76a97d5d235ea43d974fb3d5ce89a.json
Content-Length mismatch, received 1113847 out of 1702304 bytes:
(then a big base64 dump)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/composer/packagist/issues/1090#issuecomment-640734645,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHWTQKOXA2PLGGFVBBGNT3RVUGNHANCNFSM4NYQ4GZQ
.

Switching mirrors seems to have fixed it for me.

composer config --global repo.packagist composer https://packagist.jp

Not all mirrors seem to be working. Using this

composer config -g repos.packagist composer https://packagist.com.br

I still get similar errors:

The "https://packagist.com.br/p/provider-2015%2448211197e6da155a409c868a701ab020e1a372036469abb847b6b5fca1f4022d.json" file could not be downloaded (HTTP/1.1 404 Not Found)

Hey sorry we had issues on one of the north american mirrors, should be resolved now.

12PM June 9, eastern time.
Still having major issues.

now trying to change mirrors.

changing mirrors didn't help.

While running composer install -vvv or composer update -vvv, I get stuck on this process

Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #190)

Always stops at 190.

How can I debug this?

EDIT : As others have explained this wasn't related to the mirrors - I apologize for crossing the streams, with the problems I had yesterday, I figured i was still having the same problems.

@alphex I think your issue might be unrelated to the mirror being down from yesterday. You may want to delete your composer cache directory just to be sure (in case you have some corrupt data cached locally).

A quick google search for hanging at that steps implies there may be some kind of circular dependency issue. I'd recommend opening a new issue and provide your composer.json's require section.

You can also try composer selfupdate --preview

The v2 alpha is much faster and who knows it might help..

On Tue, 9 Jun 2020, 18:16 Eric Esquibel, notifications@github.com wrote:

@alphex https://github.com/alphex I think your issue might be unrelated
to the mirror being down from yesterday. You may want to delete your
composer cache directory just to be sure (in case you have some corrupt
data cached locally).

A quick google search for hanging at that steps implies there may be some
kind of circular dependency issue. I'd recommend opening a new issue and
provide your composer.json's require section.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/composer/packagist/issues/1090#issuecomment-641409580,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABM27QZVDRFV34YH3EIABTRVZN7TANCNFSM4NYQ4GZQ
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fkooman picture fkooman  ·  6Comments

stayallive picture stayallive  ·  8Comments

jaykepeters picture jaykepeters  ·  11Comments

andrewmclagan picture andrewmclagan  ·  9Comments

alexbowers picture alexbowers  ·  7Comments