Can't create Sage project through Composer: Content-Length mismatch

Hey there!
So, I’m experiencing quite an annoying problem here. For some reason running composer create-project roots/sage sandbox-theme does not work.

Here’s what I have tried:

  • Modified composer’s config file to force secure connection
  • Clearing composer’s cache
  • Updating composer (already using composer version 1.6.3 (stable channel))

And here’s the output (running with the verbose argument):

Loading config file C:/Users/Tom/AppData/Roaming/Composer/config.json
Loading config file C:/Users/Tom/AppData/Roaming/Composer/auth.json
Reading C:/Users/Tom/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/Tom/AppData/Roaming/Composer/config.json
Loading config file C:/Users/Tom/AppData/Roaming/Composer/auth.json
Loading config file C:/Users/Tom/AppData/Roaming/Composer/composer.json
Loading config file C:\Users\Tom\AppData\Roaming\Composer/auth.json
Reading C:\Users\Tom\AppData\Roaming\Composer/auth.json
Checked CA file C:\Users\Tom\AppData\Local\Temp\opeD909.tmp: valid
Executing command (C:/Users/Tom/AppData/Roaming/Composer): git branch --no-color --no-abbrev -v
Executing command (C:/Users/Tom/AppData/Roaming/Composer): git describe --exact-match --tags
Executing command (C:/Users/Tom/AppData/Roaming/Composer): git log --pretty="%H" -n1 HEAD
Executing command (C:/Users/Tom/AppData/Roaming/Composer): hg branch
Executing command (C:/Users/Tom/AppData/Roaming/Composer): fossil branch list
Executing command (C:/Users/Tom/AppData/Roaming/Composer): fossil tag list
Executing command (C:/Users/Tom/AppData/Roaming/Composer): svn info --xml
Reading C:/Users/Tom/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/Tom/AppData/Roaming/Composer/config.json
Loading config file C:/Users/Tom/AppData/Roaming/Composer/auth.json
Loading config file C:/Users/Tom/AppData/Roaming/Composer/composer.json
Loading config file C:\Users\Tom\AppData\Roaming\Composer/auth.json
Reading C:\Users\Tom\AppData\Roaming\Composer/auth.json
Reading C:/Users/Tom/AppData/Roaming/Composer/vendor/composer/installed.json
Reading C:/Users/Tom/AppData/Roaming/Composer/vendor/composer/installed.json
Loading plugin WP_CLI\AutoloadSplitter\ComposerPlugin
Running 1.6.3 (2018-01-31 16:28:17) with PHP 7.1.9 on Windows NT / 10.0
Downloading https://packagist.org/packages.json
Writing C:/Users/Tom/AppData/Local/Composer/repo/https---packagist.org/packages.json into cache
Downloading http://packagist.org/p/provider-2013%242e6252b1110639bd27b7a15ca1188f5d2676d9276261957545614f88de598189.json
Content-Length mismatch, received 1189 out of 355794 bytes: [hash]

I’ll keep browsing for a solution but one of you guys might have better chances solving it than me, so… :no_mouth:

I’m not super good with composer but have you tried clearing your composer cache with composer clear-cache ?

Yup, tried that but didn’t help

Any proxy in front of internet? Have you tried to download over a different internet connection or VPN (e.g. Betternet)?

It’s working! I’m not connecting through any proxy or VPN but the problem was indeed my connection. It’s been quite slow and unreliable the last few days but that’s not the kind of error I would expect from a slow connection :confused: Oh well, as I said it’s working now and that’s all I needed :sweat_smile:
Thanks guys!