hiqdev / asset-packagist

Asset Packagist
https://asset-packagist.org
BSD 3-Clause "New" or "Revised" License
247 stars 24 forks source link

Random 404 Errors from cdn.asset-packagist.org #166

Closed jmbeee closed 2 months ago

jmbeee commented 2 months ago

We are seeing random 404 errors from cdn.asset-packagist.org during composer install process. It is not always but it happens 80% of the time whenever a new instance is created with composer install command.

The composer.json has these repos included

   {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
    },
    {
        "type": "composer",
        "url": "https://asset-packagist.org"
    }
Generating autoload files
114 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Running composer update to apply merge settings
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information

In CurlDownloader.php line 641:

  The "https://cdn.asset-packagist.org/p/provider-latest/8799ec77a377378f0d0e6f2671a922763cf91959dda43f6df69c6b11b025d75d.json" file could not be downloaded (HTTP/1.1 404 Not Found)  

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
fiasco commented 2 months ago

I'm seeing this too and reported by others in the Drupal community https://drupal.slack.com/archives/C45SW3FLM/p1718769240759859

I suspect there are same stale caches in the CDN affecting only some nodes. Can the CDN be flushed?

AlexSkrypnyk commented 2 months ago

I can confirm that we had several reports of this and I myself experienced this many times in the last several days.

I have not seen these fails appear in CI builds on servers located in US, but I did see many of these locally in Australia (Melbourne). So maybe this depends on the geographical location.

Downloading https://packages.drupal.org/8/packages.json
[200] https://packages.drupal.org/8/packages.json
Downloading https://packages.drupal.org/files/packages/8/p2/drupal/ckeditor.json
[200] https://packages.drupal.org/files/packages/8/p2/drupal/ckeditor.json
Downloading https://packages.drupal.org/files/packages/8/p2/drupal/ckeditor.json
Downloading https://packages.drupal.org/files/packages/8/p2/drupal/ckeditor~dev.json
[200] https://packages.drupal.org/files/packages/8/p2/drupal/ckeditor.json
[200] https://packages.drupal.org/files/packages/8/p2/drupal/ckeditor~dev.json
Downloading https://asset-packagist.org/packages.json
[302] https://asset-packagist.org/packages.json
Following redirect (1) https://cdn.asset-packagist.org/packages.json
[200] https://cdn.asset-packagist.org/packages.json
Downloading https://asset-packagist.org/p/provider-latest/8799ec77a377378f0d0e6f2671a922763cf91959dda43f6df69c6b11b025d75d.json
[302] https://asset-packagist.org/p/provider-latest/8799ec77a377378f0d0e6f2671a922763cf91959dda43f6df69c6b11b025d75d.json
Following redirect (1) https://cdn.asset-packagist.org/p/provider-latest/8799ec77a377378f0d0e6f2671a922763cf91959dda43f6df69c6b11b025d75d.json
[404] https://cdn.asset-packagist.org/p/provider-latest/8799ec77a377378f0d0e6f2671a922763cf91959dda43f6df69c6b11b025d75d.json

In CurlDownloader.php line 630:

  [Composer\Downloader\TransportException (404)]                                                                                                                            
  The "https://cdn.asset-packagist.org/p/provider-latest/8799ec77a377378f0d0e6f2671a922763cf91959dda43f6df69c6b11b025d75d.json" file could not be downloaded (HTTP/2 404 )  
acie commented 2 months ago

Our servers hosted in AWS region Singapore, experienced this error. How do we mitigate or minimize this? Are there mirrors or other sources we can use?

SilverFire commented 2 months ago

Hi. I do confrim a problem with CDN in the Asia region. We work tightly with our CDN provider and will let you know once we have a solution.

SilverFire commented 2 months ago

The Singapore CDN node cache had a stuck https://cdn.asset-packagist.org/packages.json file. Ths CDN service provider reset the cache and will investigate further.

Please confirm the problem is solved for you now.