Composer: Composer file could not be downloaded (404 not found)

Created on 18 Jan 2018  ·  40Comments  ·  Source: composer/composer

I tyring to install Laravel

Output of composer diagnose:

d:\web>composer diag
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 *
723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B *

8C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.6.2
PHP version: 7.2.1
PHP binary path: D:\php-7.2.1-nts-Win32-VC15-x86\php.exe

When I run this command:

composer global require "laravel/installer"

I get the following output:

[Composer\Downloader\TransportException]
The "https://packagist.org/p/symfony/console%2433f24f3dbe55cff57fe06a5fa93b
a0bbe3ae3b259e2c5b7d051da0238769fa0f.json" file could not be downloaded (HT
TP/1.1 404 Not Found)

Support

Most helpful comment

Same problem for me - but this was cleared by:

composer clear-cache

All 40 comments

I'm having the same problem. It hangs for a long time, then displays this error. I tried uninstalling and re-installing Composer, but the result is same.

Same problem for me

No solution yet? Still facing the same problem :(

Same problem for me - but this was cleared by:

composer clear-cache

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

having the same problem.

Also my problem

This issue was never fixed.

Anybody found the solution?

I didn't find any solution. But I found when the problem occurs. It seems the problem only occurs when I'm using my broadband connection IP. If I use mobile data via hotspot everything seems to work fine. But for some reason won't work on my broadbrand IP.

That is weird. I will check that too

Sent from Yahoo Mail for iPhone

On Tuesday, January 29, 2019, 12:57 PM, Miraz Mac notifications@github.com wrote:

I didn't find any solution. But I found when the problem occurs. It seems the problem only occurs when I'm using my broadband connection IP. If I use mobile data via hotspot everything seems to work fine. But for some reason won't work on my broadbrand IP.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

First I try the command "composer clear-cache". It still not working.
Then I try the command "composer dump-autoload".
It works for me.

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

It works for me.

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

it works for me too

we had a ton of vcs repos pointing to different private github repos, I simply removed most of them added a packagist url to those, tried install again, then it asked me for github ssh access token, I entered it, it failed installing some modules, I reverted composer.json back to the original, removed everything in vendor folder and ran install again and then everything worked fine :P

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This worked for me aswell

composer clear-cache rectifies the error

It didn't for me, no reason to keep spamming the same answer as siduke000 @Marks-1 @felipeescorel it's already written here, write something useful if you write something

Probably sometimes you have to add repositories to composer, it solved my problem.

the composer clear-cache Solution Worked For Me , Thanks to @johnabelardom

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This work for me also

Hello, I recently encountered the same following error when trying to composer require seostats/seostats package.
Was first getting this error
[Composer\Downloader\TransportException] The "https://packagist.org/p/provider-2019-04%244380046a2dfa549bfcf196bfc2c1a5cca9d58c63fb9b8e836367bfe2c01f062b.json" file could not be downloaded (HTTP/1.1 404 Not Found)

Then tried a composer clear-cache
Now getting this error
[Composer\Downloader\TransportException] Content-Length mismatch, received 551423 bytes out of the expected 2019004

Can anybody explain why this is happening?

Here is my composer diagnose results
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Checking composer version: OK
Composer version: 1.8.6
PHP version: 7.2.20
PHP binary path: /opt/cpanel/ea-php72/root/usr/bin/php

Hello, I recently encountered the same following error when trying to composer require seostats/seostats package.
Was first getting this error
[Composer\Downloader\TransportException] The "https://packagist.org/p/provider-2019-04%244380046a2dfa549bfcf196bfc2c1a5cca9d58c63fb9b8e836367bfe2c01f062b.json" file could not be downloaded (HTTP/1.1 404 Not Found)

Then tried a composer clear-cache
Now getting this error
[Composer\Downloader\TransportException] Content-Length mismatch, received 551423 bytes out of the expected 2019004

Can anybody explain why this is happening?

Here is my composer diagnose results
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Checking composer version: OK
Composer version: 1.8.6
PHP version: 7.2.20
PHP binary path: /opt/cpanel/ea-php72/root/usr/bin/php

Changed my composer default repos to this and it solved the content-length mismatch errors and I was able to successfully install my package.
composer config -g repo.packagist composer https://packagist.org
composer config -g github-protocols https ssh

@SV-ZeroOne This might be the problem: https://twitter.com/packagist/status/1156148973738110978

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This was a solution for me

composer clear-cache

composer -vvv

if "composer clear-cache" doesnt work, try using "composer self-update" before your composer update command and it should fix any composer related issues itself and should fix your problem.

composer clear-cache didn't work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

composer config -g -- disable-tls false

composer clear-cache no funcionó para mí

parece que hay algunos problemas de red de vez en cuando en el servidor principal https://packagist.org

probé uno de los espejos como una solución temporal:

composer config -g repo.packagist composer https?://packagist.jp

fue bastante lento, pero finalmente funcionó

It worked for me. I installed laravel / ui, I had the same error. Thank you

This is very strange behaviour.
I run Ubuntu 18 in a VM and try to update my Laravel packages.
It gives me this error.

When I try to open the JSON url, it gives the neat 404 error from the Packagist.

When I try to open the JSON url on the Windows host, it show the json data just fine.

I think it is worth investigating this further. Is maybe packagist blocking certain requests?
Edit: When I run the command (inside the Ubuntu machine) in another Laravel project, it works just fine.
Edit 2: When I run the command (inside the Ubuntu machine) after running it in another project (where it worked fine), it also does work fine now. Very strange!

composer clear-cache didn't work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

Worked (I am using cPanel Terminal)

composer clear-cache didn't work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

This worked for me! Thanks so much

I've been having an occurence of this issue. None of the suggestions in this thread have worked, but I've found that the issue only occurs when I attempt to load "npm-asset/pdfmake": "~0.1". When I use "bower-asset/pdfmake": "~0.1" (as I previously had been, I'm migrating some of my dependancies to using npm) there's no error. I've opened an issue here. For now my fix is to stick with using "bower-asset/pdfmake": "~0.1".

composer clear-cache didn't work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

This worked for me.Thanks:)

It seems that this problem is about failing to download required JSON from Packagist mirror site.

And I've suffered this issue from main and my Packagist mirror before.

It usually gets failed when the specific mirror site is upgrading mirror data.

And it doesn't have the current way to resolve this issue at this moment.

Some possible ways I try are as follows:

  • Running failed command again. That is, when using the composer install command is failed, running this command again.
  • Using the composer clear-cache to remove possible cached files and run the failed command again.

Can you try

composer clear-cache

then

composer -vvv

after that try running the install command for laravel, it worked for me though

This helped me, Thank you <3.

composer clear-cache didn't work for me

it seems that there are some network issues from time to time on the main server https://packagist.org

i tried one of the mirrors as a temporary workaround:

composer config -g repo.packagist composer https?://packagist.jp

it was pretty slow, but worked finally

I tried all previous sollution and nothing happened but finally this worked for me

I got this issue when I forgot to use SUDO. So sudo composer update worked for me.

Was this page helpful?
0 / 5 - 0 ratings