Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package is not found when trying to install locale package #8265

Closed
gmponos opened this issue Aug 7, 2019 · 9 comments
Closed

Package is not found when trying to install locale package #8265

gmponos opened this issue Aug 7, 2019 · 9 comments
Labels

Comments

@gmponos
Copy link

gmponos commented Aug 7, 2019

My composer.json:

    "repositories": [
        ...
        {
            "type": "package",
            "package": {
                "name": "private-wordpress-plugin/sitepress-multilingual-cms",
                "version": "4.2.1",
                "dist": {
                    "type": "zip",
                    "url": "../www/sitepress-multilingual-cms.4.2.1.zip"
                },
                "type": "wordpress-plugin",
                "require": {
                    "composer/installers": "^1.6.0"
                }
            }
        }

Output of composer diagnose:

Checking composer.json: OK
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: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: You are not running the latest stable version, run `composer self-update` to update (1.8.4 => 1.9.0)
Composer version: 1.8.4
PHP version: 7.2.19
PHP binary path: /usr/bin/php

Note I checked also with latest version.

When I run this command:

composer install

I get the following output:

private-wordpress-plugin/sitepress-multilingual-cms (4.2.1): Reading ../www/sitepress-multilingual-cms.4.2.1.zip
Downloading (100%)         
    Download failed, retrying...
Reading ../www/sitepress-multilingual-cms.4.2.1.zip
Downloading (100%)         
    Download failed, retrying...
Reading ../www/sitepress-multilingual-cms.4.2.1.zip
Downloading (100%)         
Failed: [Composer\Downloader\TransportException] 0: "../www/sitepress-multilingual-cms.4.2.1.zip" appears broken, and returned an empty 200 response

                                                                                                    
  [Composer\Downloader\TransportException]                                                          
  "../www/sitepress-multilingual-cms.4.2.1.zip" appears broken, and returned an empty 200 response  
                                                                                                    

Exception trace:
 () at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Util/RemoteFilesystem.php:490
 Composer\Util\RemoteFilesystem->get() at /vhosts/www.mywebsite.com/sf/vendor/symfony/flex/src/ParallelDownloader.php:141
 Symfony\Flex\ParallelDownloader->copy() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Downloader/FileDownloader.php:153
 Composer\Downloader\FileDownloader->doDownload() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Downloader/FileDownloader.php:97
 Composer\Downloader\FileDownloader->download() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Downloader/ArchiveDownloader.php:38
 Composer\Downloader\ArchiveDownloader->download() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Downloader/ZipDownloader.php:77
 Composer\Downloader\ZipDownloader->download() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Downloader/DownloadManager.php:216
 Composer\Downloader\DownloadManager->download() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Installer/LibraryInstaller.php:197
 Composer\Installer\LibraryInstaller->installCode() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Installer/LibraryInstaller.php:101
 Composer\Installer\LibraryInstaller->install() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Installer/InstallationManager.php:173
 Composer\Installer\InstallationManager->install() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Installer/InstallationManager.php:160
 Composer\Installer\InstallationManager->execute() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Installer.php:597
 Composer\Installer->doInstall() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Installer.php:229
 Composer\Installer->run() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Command/InstallCommand.php:122
 Composer\Command\InstallCommand->execute() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Console/Application.php:267
 Composer\Console\Application->doRun() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Console/Application.php:106
 Composer\Console\Application->run() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/bin/composer:61
 require() at /vhosts/www.mywebsite.com/sf/composer.phar:24

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

And I expected this to happen:

Proceed with composer install

Please note If I use version 1.6.5 the issue does not occur. Every other version greater of 1.6.5 fails

@gmponos
Copy link
Author

gmponos commented Aug 7, 2019

More info...

If I use

NAME=Fedora
VERSION="29 (Twenty Nine)"

with curl

curl --version
curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1c zlib/1.2.11 brotli/1.0.5 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.8.7/openssl/zlib nghttp2/1.34.0
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz brotli TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL Metalink 

I get the error above...

If I load a docker with

NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"

with curl

curl --version
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL

It works.

@alcohol
Copy link
Member

alcohol commented Aug 8, 2019

@Seldaek maybe related to the changes you implemented recently?

@gmponos
Copy link
Author

gmponos commented Aug 8, 2019

implemented recently

Note that as I said.. this happens from 1.6.5 and after... Not sure if you can say this "recent"

@alcohol
Copy link
Member

alcohol commented Aug 8, 2019

I don't see any immediately obvious changes between 1.6.5 and 1.7.0 that would explain this behaviour. Nor do I have the means to reproduce this. There is nothing further I can do.

@gmponos
Copy link
Author

gmponos commented Aug 8, 2019

I did the following...

Create an empty project myproject with a folder sf.

Inside the sf folder initialized a composer.json file and added the following contents:

{
    "name": "gmponos/test",
    "authors": [
        {
            "name": "Georgios Mponos",
            "email": "gmponos@gmail.com"
        }
    ],
    "require": {
        "whatever-plugin/sitepress-multilingual-cms": "^4.2.1"
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "whatever-plugin/sitepress-multilingual-cms",
                "version": "4.2.1",
                "dist": {
                    "type": "zip",
                    "url": "../sitepress-multilingual-cms.4.2.1.zip"
                },
                "type": "wordpress-plugin",
                "require": {
                    "composer/installers": "^1.6.0"
                }
            }
        }
    ]
}

In the main folder of the project I added the plugin zip file.

Then I have run from the sf folder

  • composer clearcache
  • composer update

Everything worked.

Checking the exception stack above again I noticed this:

Symfony\Flex\ParallelDownloader->copy() at phar:///vhosts/www.mywebsite.com/sf/composer.phar/src/Composer/Downloader/FileDownloader.php:153

Could it be that this is the thing affecting? Maybe @nicolas-grekas could help here.. not sure anymore if this is an issue of composer or symfony flex.

PS: all the above steps were reproduced to the failing environment I have mentioned on previous comment.

@nicolas-grekas
Copy link
Contributor

That's quite possible, please open issue on flex.

@Seldaek
Copy link
Member

Seldaek commented Aug 13, 2019

Note you can try composer update --no-plugins to run without flex and see if it works without it.

@kevinpapst
Copy link

Likely fixed with symfony/flex#561

I can only confirm that artifact repository was fixed, but I assume that "type": "package" with a local zip failed for the same reason.

@gmponos
Copy link
Author

gmponos commented Sep 22, 2019

It seems fixed.. thank you all..

@gmponos gmponos closed this as completed Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants