craftcms / plugin-installer

Composer installer for Craft CMS plugins.
MIT License
28 stars 3 forks source link

Unable to install plugins with Composer 2.0.2 #5

Closed ostark closed 4 years ago

ostark commented 4 years ago

Description

After updating my composer locally (.phar) I wasn't able to install/update/require any Craft plugin. I removed all plugins, cleared composer cache, vendor dir and tried to require again:

composer require craftcms/redactor -v

Using version ^2.8 for craftcms/redactor
./composer.json has been updated
Running composer update craftcms/redactor
Loading composer repositories with package information
Updating dependencies
Dependency resolution completed in 0.001 seconds
Analyzed 197 packages to resolve dependencies
Analyzed 354 rules to resolve dependencies
Lock file operations: 1 install, 0 updates, 0 removals
Installs: craftcms/redactor:2.8.3
  - Locking craftcms/redactor (2.8.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Installs: craftcms/redactor:2.8.3
  - Installing craftcms/redactor (2.8.3): Extracting archive
    Install of craftcms/redactor failed

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

  [InvalidArgumentException]
  Package is not installed: craftcms/redactor-2.8.3.0

Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:184
 Composer\Installer\LibraryInstaller->uninstall() at /Users/os/Projects/Craft/demo/vendor/craftcms/plugin-installer/src/Installer.php:37
 craft\composer\Installer->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:458
 Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:412
 Composer\Installer\InstallationManager->Composer\Installer\{closure}() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20
 React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:413
 Composer\Installer\InstallationManager->executeBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:362
 Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:261
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:711
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:546
 Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:251
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:321
 Composer\Command\RequireCommand->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:240
 Composer\Command\RequireCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:309
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:121
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:63
 require() at /usr/local/bin/composer:24

Additional info

ostark commented 4 years ago

With another project I ran into this issue

  - Upgrading nystudio107/craft-seomatic (3.1.46 cc66f24 => 3.1.46 ): Extracting archive
    Update of nystudio107/craft-seomatic failed
    Failed to extract nystudio107/craft-seomatic: (9) unzip -qq  '/Users/os/Projects/Craft/demo_legacy/vendor/composer/tmp-df3aaf67884cdb8fbb43be0e825e535a' -d '/Users/os/Projects/Craft/demo_legacy/vendor/composer/44efac75'

unzip:  cannot find or open /Users/os/Projects/Craft/demo_legacy/vendor/composer/tmp-df3aaf67884cdb8fbb43be0e825e535a.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix

After adding ^ to all fixed versions, I was able to run composer update without issues.

khalwat commented 4 years ago

re: Composer 2.0, one thing they mention is that plugins need to be upgraded to work with it -- and Craft's Plugin Installer is a Composer plugin. I'm not sure what the status of it is.

ref: https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors

The Craft Plugin Installer Composer plugin is run whenever a composer package of the type craft-plugin is installed. I'm guessing that P&T will need to update the Craft Plugin Installer to work with it

ostark commented 4 years ago

@khalwat This was my initial thought. But the installer supports the 2.0 API already for a while, ...

khalwat commented 4 years ago

Yeah not sure @ostark -- but I have noticed there being issues with a wide variety of packages that are Craft plugins, which makes me think that it might be something with the plugin installer. ¯_(ツ)_/¯

ostark commented 4 years ago

This part looks a bit odd to me: https://github.com/craftcms/plugin-installer/blob/master/src/Installer.php#L83-L96

Not sure why it worked before. Who sets ['extra']['class'] in the composer.json for the plugin? I thought this is just a way to change the default.

Anyways - I'll wait until @brandonkelly wakes up ⏰.

bzin commented 4 years ago

Having a problem with I believe it should be related to this.

The error output is

  - Upgrading craftcms/element-api (2.6.0 33da444 => 2.6.0 ): Extracting archive
    Update of craftcms/element-api failed
Failed to extract craftcms/element-api: (9) unzip -qq  '/data/projects/<project>/vendor/composer/tmp-5a77fb2e0c9645eb9f66e2e0bd883fce' -d '/data/projects/<project>/vendor/composer/dcb9d0dd'

unzip:  cannot find or open /data/projects/<project>/vendor/composer/tmp-5a77fb2e0c9645eb9f66e2e0bd883fce.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix

Having the same issue with the plugins: craftcms/element-api, craftcms/redactor, monachilada/craft-matrixtoolbar, verbb/expanded-singles, verbb/super-table, sebastianlenz/linkfield

peimansh commented 4 years ago

Same here. All of the builds are failing due to this

khalwat commented 4 years ago

@peimansh until this is fixed on P&T's end, you can do something like this:

    curl -sS https://getcomposer.org/installer | php -- --version=1.10.16 --install-dir=/usr/local/bin/ --filename=composer \

...to install a specific version of Composer

ref: https://github.com/nystudio107/craft/blob/craft-webpack/docker-config/php-prod-craft/Dockerfile

ostark commented 4 years ago

Or composer selfupdate --1 @khalwat

brandonkelly commented 4 years ago

After updating to Composer 2, can you make sure you are running craftcms/plugin-installer 1.5.5, which is where we added Composer 2 compatibility?

You won’t get it by running composer require x; you’ll need to run composer update.

piotrpog commented 4 years ago

Thank god I ignored the notification to update! :)

khalwat commented 4 years ago

@brandonkelly FWIW, I've nuked the composer.lock and all of vendor/ and started from scratch, and have the aforementioned issue.

ostark commented 4 years ago

I'm on the latest craftcms/plugin-installer @brandonkelly

brandonkelly commented 4 years ago

Looks like there was an additional breaking change since when we added Composer 2 support. Just released 1.5.6 with a fix.

khalwat commented 4 years ago

Confirmed the fix works here @brandonkelly -- thank you!

And holy smokes, is Composer 2.0 fast.

php_1         | Dependency resolution completed in 0.055 seconds
php_1         | Analyzed 3698 packages to resolve dependencies
php_1         | Analyzed 75068 rules to resolve dependencies
php_1         | Dependency resolution completed in 0.000 seconds
php_1         | Lock file operations: 115 installs, 0 updates, 0 removals
php_1         | Writing lock file
php_1         | Installing dependencies from lock file (including require-dev)
php_1         | Package operations: 115 installs, 0 updates, 0 removals
php_1         | 47 package suggestions were added by new dependencies, use `composer suggest` to see details.
php_1         | Generating optimized autoload files
php_1         | 29 packages you are using are looking for funding.
php_1         | Use the `composer fund` command to find out more!
php_1         | [26-Oct-2020 23:45:50] NOTICE: fpm is running, pid 743
php_1         | [26-Oct-2020 23:45:50] NOTICE: ready to handle connections
khalwat commented 4 years ago

So fast: https://twitter.com/nystudio107/status/1320882317565566976?s=20

jan10 commented 4 years ago

I have done a composer update but my CircleCi builds still do not work. Do you have an idea @brandonkelly?

#!/bin/bash -eo pipefail
composer install -n
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 104 updates, 0 removals
  - Downloading yiisoft/yii2-composer (2.0.10)
  - Downloading craftcms/plugin-installer (1.5.6)
  - Downloading ezyang/htmlpurifier (v4.13.0)
  - Downloading cebe/markdown (1.2.1)
  - Downloading craftcms/cms (3.5.14)
  - Downloading symfony/polyfill-mbstring (v1.19.0)
  - Downloading symfony/polyfill-php72 (v1.19.0)
  - Downloading symfony/polyfill-php70 (v1.19.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.19.0)
  - Downloading symfony/polyfill-intl-idn (v1.19.0)
  - Downloading symfony/polyfill-iconv (v1.19.0)
  - Downloading doctrine/lexer (1.0.2)
  - Downloading egulias/email-validator (2.1.22)
  - Downloading swiftmailer/swiftmailer (v6.2.3)
  - Downloading yiisoft/yii2-swiftmailer (2.1.2)
  - Downloading symfony/process (v3.3.6)
  - Downloading yiisoft/yii2-queue (2.3.0)
  - Downloading yiisoft/yii2-debug (2.1.13)
  - Downloading yii2tech/ar-softdelete (1.0.4)
  - Downloading webonyx/graphql-php (v0.12.6)
  - Downloading voku/stop-words (2.0.1)
  - Downloading voku/portable-ascii (1.5.3)
  - Downloading symfony/polyfill-intl-grapheme (v1.19.0)
  - Downloading voku/portable-utf8 (5.4.47)
  - Downloading voku/urlify (5.0.5)
  - Downloading voku/email-check (3.0.2)
  - Downloading symfony/polyfill-ctype (v1.19.0)
  - Downloading webmozart/assert (1.9.1)
  - Downloading phpdocumentor/reflection-common (1.0.1)
  - Downloading phpdocumentor/type-resolver (0.5.1)
  - Downloading phpdocumentor/reflection-docblock (4.3.4)
  - Downloading voku/arrayy (7.8.4)
  - Downloading voku/anti-xss (4.1.28)
  - Downloading defuse/php-encryption (v2.2.1)
  - Downloading voku/stringy (6.4.0)
  - Downloading twig/twig (v2.12.5)
  - Downloading true/punycode (v2.1.1)
  - Downloading symfony/yaml (v3.3.6)
  - Downloading seld/cli-prompt (1.0.3)
  - Downloading sebastian/diff (2.0.1)
  - Downloading pixelandtonic/imagine (1.2.2.1)
  - Downloading tubalmartin/cssmin (v4.1.1)
  - Downloading psr/container (1.0.0)
  - Downloading pimple/pimple (v3.2.3)
  - Downloading mrclay/props-dic (3.0.0)
  - Downloading mrclay/jsmin-php (2.4.0)
  - Downloading psr/log (1.1.3)
  - Downloading monolog/monolog (1.25.5)
  - Downloading marcusschwarz/lesserphp (v0.5.4)
  - Downloading intervention/httpauth (2.1.0)
  - Downloading mrclay/minify (3.0.10)
  - Downloading mikehaertl/php-shellcommand (1.6.2)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-message (1.0.1)
  - Downloading guzzlehttp/psr7 (1.7.0)
  - Downloading guzzlehttp/promises (1.4.0)
  - Downloading guzzlehttp/guzzle (6.5.5)
  - Downloading league/oauth2-client (2.5.0)
  - Downloading league/flysystem (1.0.70)
  - Downloading laminas/laminas-stdlib (3.2.1)
  - Downloading laminas/laminas-escaper (2.6.1)
  - Downloading laminas/laminas-feed (2.12.3)
  - Downloading enshrined/svg-sanitize (0.13.3)
  - Downloading elvanto/litemoji (1.4.4)
  - Downloading creocoder/yii2-nested-sets (0.9.0)
  - Downloading craftcms/server-check (1.1.9)
  - Downloading craftcms/oauth2-craftid (1.0.0.1)
  - Downloading symfony/finder (v3.3.6)
  - Downloading symfony/filesystem (v3.3.6)
  - Downloading symfony/debug (v3.3.6)
  - Downloading symfony/console (v3.3.6)
  - Downloading seld/phar-utils (1.1.1)
  - Downloading seld/jsonlint (1.8.2)
  - Downloading justinrainbow/json-schema (5.2.10)
  - Downloading composer/xdebug-handler (1.4.4)
  - Downloading composer/spdx-licenses (1.5.4)
  - Downloading composer/semver (1.7.1)
  - Downloading composer/ca-bundle (1.2.8)
  - Downloading composer/composer (1.10.10)
  - Downloading bolden/htmlcache (1.0.15)
  - Downloading craftcms/redactor (2.8.3)
  - Downloading dnoegel/php-xdg-base-dir (v0.1.1)
  - Downloading ether/seo (3.6.6)
  - Downloading firebase/php-jwt (v5.2.0)
  - Downloading rize/uri-template (0.3.2)
  - Downloading psr/cache (1.0.1)
  - Downloading google/cloud-core (v1.39.0)
  - Downloading google/crc32 (v0.1.0)
  - Downloading mtdowling/jmespath.php (2.6.0)
  - Downloading nystudio107/craft-minify (1.2.10)
  - Downloading oberon/starfield (1.0.1)
  - Downloading tinify/tinify (1.5.2)
  - Downloading ssnepenthe/color-utils (0.4.2)
  - Downloading ksubileau/color-thief-php (v1.4.1)
  - Downloading kraken-io/kraken-php (1.6)
  - Downloading imgix/imgix-php (3.3.0)
  - Downloading imageoptim/imageoptim (1.3.1)
  - Downloading google/cloud-storage (v1.23.0)
  - Downloading aws/aws-sdk-php (3.158.14)
  - Downloading phpoption/phpoption (1.7.5)
  - Downloading vlucas/phpdotenv (v3.6.7)
  - Downloading symfony/var-dumper (v3.3.6)
  - Downloading psy/psysh (v0.10.4)
  - Downloading yiisoft/yii2-shell (2.0.4)
  - Upgrading ========================] 100%yiisoft/yii2-composer (2.0.10  => 2.0.10 94bb3f6): Extracting archive
  - Upgrading craftcms/plugin-installer (1.5.5 => 1.5.6): Extracting archive
  - Upgrading ezyang/htmlpurifier (v4.13.0  => v4.13.0 08e27c9): Extracting archive
  - Upgrading cebe/markdown (1.2.1  => 1.2.1 9bac5e9): Extracting archive
  - Upgrading craftcms/cms (3.5.14  => 3.5.14 81a574b): Extracting archive
  - Upgrading symfony/polyfill-mbstring (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading symfony/polyfill-php72 (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading symfony/polyfill-php70 (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading symfony/polyfill-intl-normalizer (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading symfony/polyfill-intl-idn (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading symfony/polyfill-iconv (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading doctrine/lexer (1.0.2  => 1.0.2 1febd6c): Extracting archive
  - Downgrading egulias/email-validator (2.19.0 => 2.1.22): Extracting archive
  - Upgrading swiftmailer/swiftmailer (v6.2.3  => v6.2.3 149cfdf): Extracting archive
  - Upgrading yiisoft/yii2-swiftmailer (2.1.2  => 2.1.2 09659a5): Extracting archive
  - Upgrading symfony/process (v3.3.6  => v3.3.6 0743280): Extracting archive
  - Upgrading yiisoft/yii2-queue (2.3.0  => 2.3.0 25c1142): Extracting archive
  - Upgrading yiisoft/yii2-debug (2.1.13  => 2.1.13 696712a): Extracting archive
  - Upgrading yii2tech/ar-softdelete (1.0.4  => 1.0.4 498ed03): Extracting archive
  - Upgrading webonyx/graphql-php (v0.12.6  => v0.12.6 4c545e5): Extracting archive
  - Upgrading voku/stop-words (2.0.1  => 2.0.1 8e63c0a): Extracting archive
  - Upgrading voku/portable-ascii (1.5.3  => 1.5.3 25bcbf0): Extracting archive
  - Upgrading symfony/polyfill-intl-grapheme (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading voku/portable-utf8 (5.4.47  => 5.4.47 c925225): Extracting archive
  - Upgrading voku/urlify (5.0.5  => 5.0.5 d59bfa6): Extracting archive
  - Upgrading voku/email-check (3.0.2  => 3.0.2 f91fc9d): Extracting archive
  - Upgrading symfony/polyfill-ctype (v1.18.1 => v1.19.0): Extracting archive
  - Upgrading webmozart/assert (1.9.1  => 1.9.1 bafc69c): Extracting archive
  - Upgrading phpdocumentor/reflection-common (1.0.1  => 1.0.1 21bdeb5): Extracting archive
  - Upgrading phpdocumentor/type-resolver (0.5.1  => 0.5.1 cf84290): Extracting archive
  - Upgrading phpdocumentor/reflection-docblock (4.3.4  => 4.3.4 da3fd97): Extracting archive
  - Upgrading voku/arrayy (7.8.4  => 7.8.4 1cf7833): Extracting archive
  - Upgrading voku/anti-xss (4.1.28  => 4.1.28 8919a19): Extracting archive
  - Upgrading defuse/php-encryption (v2.2.1  => v2.2.1 0f407c4): Extracting archive
  - Upgrading voku/stringy (6.4.0  => 6.4.0 b534a95): Extracting archive
  - Upgrading twig/twig (v2.12.5  => v2.12.5 18772e0): Extracting archive
  - Upgrading true/punycode (v2.1.1  => v2.1.1 a4d0c11): Extracting archive
  - Upgrading symfony/yaml (v3.3.6  => v3.3.6 ddc2332): Extracting archive
  - Upgrading seld/cli-prompt (1.0.3  => 1.0.3 a19a737): Extracting archive
  - Upgrading sebastian/diff (2.0.1  => 2.0.1 347c1d8): Extracting archive
  - Upgrading pixelandtonic/imagine (1.2.2.1  => 1.2.2.1 c70db7d): Extracting archive
  - Upgrading tubalmartin/cssmin (v4.1.1  => v4.1.1 3cbf557): Extracting archive
  - Upgrading psr/container (1.0.0  => 1.0.0 b7ce3b1): Extracting archive
  - Upgrading pimple/pimple (v3.2.3  => v3.2.3 9e40394): Extracting archive
  - Upgrading mrclay/props-dic (3.0.0  => 3.0.0 0b0fd25): Extracting archive
  - Upgrading mrclay/jsmin-php (2.4.0  => 2.4.0 bb05feb): Extracting archive
  - Upgrading psr/log (1.1.3  => 1.1.3 0f73288): Extracting archive
  - Upgrading monolog/monolog (1.25.5  => 1.25.5 1817faa): Extracting archive
  - Upgrading marcusschwarz/lesserphp (v0.5.4  => v0.5.4 3a0f5ae): Extracting archive
  - Upgrading intervention/httpauth (2.1.0  => 2.1.0 3d67894): Extracting archive
  - Upgrading mrclay/minify (3.0.10  => 3.0.10 8dba84a): Extracting archive
  - Upgrading mikehaertl/php-shellcommand (1.6.2  => 1.6.2 06d6220): Extracting archive
  - Upgrading ralouphie/getallheaders (3.0.3  => 3.0.3 120b605): Extracting archive
  - Upgrading psr/http-message (1.0.1  => 1.0.1 f6561bf): Extracting archive
  - Upgrading guzzlehttp/psr7 (1.7.0  => 1.7.0 53330f4): Extracting archive
  - Upgrading guzzlehttp/promises (1.4.0  => 1.4.0 60d379c): Extracting archive
  - Upgrading guzzlehttp/guzzle (6.5.5  => 6.5.5 9d4290d): Extracting archive
  - Upgrading league/oauth2-client (2.5.0  => 2.5.0 d9f2a1e): Extracting archive
  - Upgrading league/flysystem (1.0.70  => 1.0.70 5858247): Extracting archive
  - Upgrading laminas/laminas-stdlib (3.2.1  => 3.2.1 2b18347): Extracting archive
  - Upgrading laminas/laminas-escaper (2.6.1  => 2.6.1 25f2a05): Extracting archive
  - Upgrading laminas/laminas-feed (2.12.3  => 2.12.3 3c91415): Extracting archive
  - Upgrading enshrined/svg-sanitize (0.13.3  => 0.13.3 bc66593): Extracting archive
  - Upgrading elvanto/litemoji (1.4.4  => 1.4.4 17bf635): Extracting archive
  - Upgrading creocoder/yii2-nested-sets (0.9.0  => 0.9.0 cb8635a): Extracting archive
  - Upgrading craftcms/server-check (1.1.9  => 1.1.9 579fd9a): Extracting archive
  - Upgrading craftcms/oauth2-craftid (1.0.0.1  => 1.0.0.1 3f18364): Extracting archive
  - Upgrading symfony/finder (v3.3.6  => v3.3.6 baea7f6): Extracting archive
  - Upgrading symfony/filesystem (v3.3.6  => v3.3.6 427987e): Extracting archive
  - Upgrading symfony/debug (v3.3.6  => v3.3.6 7c13ae8): Extracting archive
  - Upgrading symfony/console (v3.3.6  => v3.3.6 b087823): Extracting archive
  - Upgrading seld/phar-utils (1.1.1  => 1.1.1 8674b1d): Extracting archive
  - Upgrading seld/jsonlint (1.8.2  => 1.8.2 590cfec): Extracting archive
  - Upgrading justinrainbow/json-schema (5.2.10  => 5.2.10 2ba9c8c): Extracting archive
  - Upgrading composer/xdebug-handler (1.4.3 => 1.4.4): Extracting archive
  - Upgrading composer/spdx-licenses (1.5.4  => 1.5.4 6946f78): Extracting archive
  - Upgrading composer/semver (1.7.1  => 1.7.1 3827632): Extracting archive
  - Upgrading composer/ca-bundle (1.2.8  => 1.2.8 8a7ecad): Extracting archive
  - Upgrading composer/composer (1.10.10  => 1.10.10 32966a3): Extracting archive
  - Upgrading bolden/htmlcache (1.0.15  => 1.0.15 ff0df86): Extracting archive
  - Upgrading bolden/htmlcache (1.0.15 ff0df86 => 1.0.15 ): Extracting archive
    Update of bolden/htmlcache failed
  - Upgrading craftcms/redactor (2.8.3  => 2.8.3 92e2aa8): Extracting archive
  - Upgrading craftcms/redactor (2.8.3 92e2aa8 => 2.8.3 ): Extracting archive
    Update of craftcms/redactor failed
  - Upgrading dnoegel/php-xdg-base-dir (v0.1.1  => v0.1.1 8f8a6e4): Extracting archive
  - Upgrading ether/seo (3.6.6  => 3.6.6 cfacc65): Extracting archive
  - Upgrading ether/seo (3.6.6 cfacc65 => 3.6.6 ): Extracting archive
    Update of ether/seo failed
  - Upgrading firebase/php-jwt (v5.2.0  => v5.2.0 feb0e82): Extracting archive
  - Upgrading rize/uri-template (0.3.2  => 0.3.2 9e5fdd5): Extracting archive
  - Upgrading psr/cache (1.0.1  => 1.0.1 d11b50a): Extracting archive
  - Upgrading google/cloud-core (v1.39.0  => v1.39.0 f9e7421): Extracting archive
  - Upgrading google/crc32 (v0.1.0  => v0.1.0 a8525f0): Extracting archive
  - Upgrading mtdowling/jmespath.php (2.6.0  => 2.6.0 42dae2c): Extracting archive
  - Upgrading nystudio107/craft-minify (1.2.10  => 1.2.10 01d5de3): Extracting archive
  - Upgrading nystudio107/craft-minify (1.2.10 01d5de3 => 1.2.10 ): Extracting archive
    Update of nystudio107/craft-minify failed
  - Upgrading oberon/starfield (1.0.1  => 1.0.1 229911b): Extracting archive
  - Upgrading oberon/starfield (1.0.1 229911b => 1.0.1 ): Extracting archive
    Update of oberon/starfield failed
  - Upgrading tinify/tinify (1.5.2  => 1.5.2 b15d1f3): Extracting archive
  - Upgrading ssnepenthe/color-utils (0.4.2  => 0.4.2 a68562f): Extracting archive
  - Upgrading ksubileau/color-thief-php (v1.4.1  => v1.4.1 fc2acef): Extracting archive
  - Upgrading kraken-io/kraken-php (1.6  => 1.6 56563df): Extracting archive
  - Upgrading imgix/imgix-php (3.3.0  => 3.3.0 6995ca3): Extracting archive
  - Upgrading imageoptim/imageoptim (1.3.1  => 1.3.1 b73eb5d): Extracting archive
  - Upgrading google/cloud-storage (v1.23.0  => v1.23.0 42f7dfb): Extracting archive
  - Upgrading aws/aws-sdk-php (3.158.8 => 3.158.14): Extracting archive
  - Upgrading phpoption/phpoption (1.7.5  => 1.7.5 994eccc): Extracting archive
  - Upgrading vlucas/phpdotenv (v3.6.7  => v3.6.7 2065bed): Extracting archive
  - Upgrading symfony/var-dumper (v3.3.6  => v3.3.6 b2623bc): Extracting archive
  - Upgrading psy/psysh (v0.10.4  => v0.10.4 a8aec1b): Extracting archive
  - Upgrading yiisoft/yii2-shell (2.0.4  => 2.0.4 6832c3d): Extracting archive
 61/97 [=================>----------]  62%    Failed to extract bolden/htmlcache: (9) unzip -qq  '/home/circleci/project/vendor/composer/tmp-5a77b56f96472f76a7d87eb4a878729b' -d '/home/circleci/project/vendor/composer/42756e93'

unzip:  cannot find or open /home/circleci/project/vendor/composer/tmp-5a77b56f96472f76a7d87eb4a878729b.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
    Failed to extract craftcms/redactor: (9) unzip -qq  '/home/circleci/project/vendor/composer/tmp-13160d8711604c9586eae57645300910' -d '/home/circleci/project/vendor/composer/1224dcb6'

unzip:  cannot find or open /home/circleci/project/vendor/composer/tmp-13160d8711604c9586eae57645300910.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
 70/97 [====================>-------]  72%    Failed to extract ether/seo: (9) unzip -qq  '/home/circleci/project/vendor/composer/tmp-9bf39e2157b227e95722aa2a6ec652e7' -d '/home/circleci/project/vendor/composer/75dadb61'

unzip:  cannot find or open /home/circleci/project/vendor/composer/tmp-9bf39e2157b227e95722aa2a6ec652e7.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
 80/97 [=======================>----]  82%    Failed to extract nystudio107/craft-minify: (9) unzip -qq  '/home/circleci/project/vendor/composer/tmp-6978c52eefb3f7abd3442745f5e3230a' -d '/home/circleci/project/vendor/composer/ad51799f'

unzip:  cannot find or open /home/circleci/project/vendor/composer/tmp-6978c52eefb3f7abd3442745f5e3230a.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
    Failed to extract oberon/starfield: (9) unzip -qq  '/home/circleci/project/vendor/composer/tmp-d864573c53cedc418723c1923ff6b1a3' -d '/home/circleci/project/vendor/composer/9311fafd'

unzip:  cannot find or open /home/circleci/project/vendor/composer/tmp-d864573c53cedc418723c1923ff6b1a3.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
 97/97 [============================] 100%

  [craft\composer\InvalidPluginException]                               
  Couldn't install bolden/htmlcache: Unable to determine the base path  

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-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>]...

Exited with code exit status 1
CircleCI received exit code 1
angrybrad commented 4 years ago

@Jan10 care you able to reproduce that locally as well?

jan10 commented 4 years ago

@angrybrad yes.

Markup on 2020-10-27 at 16:39:51

Failed to extract craftcms/contact-form: (9) unzip -qq  '/Users/jan/Sites/Replaced/backend/vendor/composer/tmp-71f6ffadabbd08f8796febda8af77b96' -d '/Users/jan/Sites/Replaced/backend/vendor/composer/0e39be83'

unzip:  cannot find or open /Users/jan/Sites/Replaced/backend/vendor/composer/tmp-71f6ffadabbd08f8796febda8af77b96.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
    Failed to extract craftcms/redactor: (9) unzip -qq  '/Users/jan/Sites/Replaced/backend/vendor/composer/tmp-e36b83aa7de182fdf4c0230bfe99c14d' -d '/Users/jan/Sites/Replaced/backend/vendor/composer/67d2ca01'

unzip:  cannot find or open /Users/jan/Sites/Replaced/backend/vendor/composer/tmp-e36b83aa7de182fdf4c0230bfe99c14d.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
    Failed to extract ether/seo: (9) unzip -qq  '/Users/jan/Sites/Replaced/backend/vendor/composer/tmp-5c03781efb1e1278e1fdfa0e6410ecf6' -d '/Users/jan/Sites/Replaced/backend/vendor/composer/267d4322'

unzip:  cannot find or open /Users/jan/Sites/Replaced/backend/vendor/composer/tmp-5c03781efb1e1278e1fdfa0e6410ecf6.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
  81/101 [======================>-----]  80%    Failed to extract nystudio107/craft-minify: (9) unzip -qq  '/Users/jan/Sites/Replaced/backend/vendor/composer/tmp-72a5ed4ccd918869d4761aa7329e6f92' -d '/Users/jan/Sites/Replaced/backend/vendor/composer/234e283f'

unzip:  cannot find or open /Users/jan/Sites/Replaced/backend/vendor/composer/tmp-72a5ed4ccd918869d4761aa7329e6f92.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
  91/101 [=========================>--]  90%    Failed to extract spacecatninja/imager-x: (9) unzip -qq  '/Users/jan/Sites/Replaced/backend/vendor/composer/tmp-3cdfde95fcd6758eb6488ba531ce3b5e' -d '/Users/jan/Sites/Replaced/backend/vendor/composer/f41f8c11'

unzip:  cannot find or open /Users/jan/Sites/Replaced/backend/vendor/composer/tmp-3cdfde95fcd6758eb6488ba531ce3b5e.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
    Failed to extract verbb/image-resizer: (9) unzip -qq  '/Users/jan/Sites/Replaced/backend/vendor/composer/tmp-509b8e6049126b35cff553ef600635fd' -d '/Users/jan/Sites/Replaced/backend/vendor/composer/ff19eb2e'

unzip:  cannot find or open /Users/jan/Sites/Replaced/backend/vendor/composer/tmp-509b8e6049126b35cff553ef600635fd.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
 101/101 [============================] 100%

  [craft\composer\InvalidPluginException]
  Couldn't install craftcms/contact-form: Unable to determine the Plugin clas
  s

Versions:

composer info
aws/aws-sdk-php                      3.158.14  AWS SDK for PHP - Use Amazon Web Services in your PHP project
cebe/markdown                        1.2.1     A super fast, highly extensible markdown parser for PHP
composer/ca-bundle                   1.2.8     Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
composer/composer                    1.10.10   Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.
composer/semver                      1.7.1     Semver library that offers utilities, version constraint parsing and validation.
composer/spdx-licenses               1.5.4     SPDX licenses list and validation library.
composer/xdebug-handler              1.4.4     Restarts a process without Xdebug.
craftcms/cms                         3.5.14    Craft CMS
craftcms/oauth2-craftid              1.0.0.1   Craft OAuth 2.0 Client Provider for The PHP League OAuth2-Client
craftcms/plugin-installer            1.5.6     Craft CMS Plugin Installer
craftcms/redactor                    2.8.3     Edit rich text content in Craft CMS using Redactor by Imperavi.
craftcms/server-check                1.1.9     Craft CMS Server Check
creocoder/yii2-nested-sets           0.9.0     The nested sets behavior for the Yii framework
defuse/php-encryption                v2.2.1    Secure PHP Encryption Library
doctrine/lexer                       1.0.2     PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
egulias/email-validator              2.1.22    A library for validating emails against several RFCs
elvanto/litemoji                     1.4.4     A PHP library simplifying the conversion of unicode, HTML and shortcode emoji.
enshrined/svg-sanitize               0.13.3    An SVG sanitizer for PHP
ezyang/htmlpurifier                  v4.13.0   Standards compliant HTML filter written in PHP
firebase/php-jwt                     v5.2.0    A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.
google/auth                          v1.14.3   Google Auth Library for PHP
google/cloud-core                    v1.39.0   Google Cloud PHP shared dependency, providing functionality useful to all components.
google/cloud-storage                 v1.23.0   Cloud Storage Client for PHP
google/crc32                         v0.1.0    Various CRC32 implementations
guzzlehttp/guzzle                    6.5.5     Guzzle is a PHP HTTP client library
guzzlehttp/promises                  1.4.0     Guzzle promises library
guzzlehttp/psr7                      1.7.0     PSR-7 message implementation that also provides common utility methods
imageoptim/imageoptim                1.3.1     ImageOptim API for PHP
imgix/imgix-php                      3.3.0     A PHP client library for generating URLs with imgix.
intervention/httpauth                2.1.0     HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration
justinrainbow/json-schema            5.2.10    A library to validate a json schema.
kraken-io/kraken-php                 1.6       Official Kraken.io SDK
ksubileau/color-thief-php            v1.4.1    Grabs the dominant color or a representative color palette from an image.
laminas/laminas-escaper              2.6.1     Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs
laminas/laminas-feed                 2.12.3    provides functionality for consuming RSS and Atom feeds
laminas/laminas-stdlib               3.2.1     SPL extensions, array utilities, error handlers, and more
laminas/laminas-zendframework-bridge 1.1.1     Alias legacy ZF class names to Laminas Project equivalents.
league/flysystem                     1.0.70    Filesystem abstraction: Many filesystems, one API.
league/oauth2-client                 2.5.0     OAuth 2.0 Client Library
lsolesen/pel                         0.9.8     PHP Exif Library. A library for reading and writing Exif headers in JPEG and TIFF images using PHP.
marcusschwarz/lesserphp              v0.5.4    lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.
mikehaertl/php-shellcommand          1.6.2     An object oriented interface to shell commands
monolog/monolog                      1.25.5    Sends your logs to files, sockets, inboxes, databases and various web services
mrclay/jsmin-php                     2.4.0     Provides a modified port of Douglas Crockford's jsmin.c, which removes unnecessary whitespace from JavaScript files.
mrclay/minify                        3.0.10    Minify is a PHP app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unne...
mrclay/props-dic                     3.0.0     Props is a simple DI container that allows retrieving values via custom property and method names
mtdowling/jmespath.php               2.6.0     Declaratively specify how to extract elements from a JSON document
opis/closure                         3.6.0     A library that can be used to serialize closures (anonymous functions) and arbitrary objects.
paragonie/random_compat              v9.99.100 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpdocumentor/reflection-common      1.0.1     Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock    4.3.4     With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver          0.5.1
pimple/pimple                        v3.2.3    Pimple, a simple Dependency Injection Container
pixelandtonic/imagine                1.2.2.1   Image processing for PHP 5.3
psr/cache                            1.0.1     Common interface for caching libraries
psr/container                        1.0.0     Common Container Interface (PHP FIG PSR-11)
psr/http-message                     1.0.1     Common interface for HTTP messages
psr/log                              1.1.3     Common interface for logging libraries
ralouphie/getallheaders              3.0.3     A polyfill for getallheaders.
rize/uri-template                    0.3.2     PHP URI Template (RFC 6570) supports both expansion & extraction
sebastian/diff                       2.0.1     Diff implementation
seld/cli-prompt                      1.0.3     Allows you to prompt for user input on the command line, and optionally hide the characters they type
seld/jsonlint                        1.8.2     JSON Linter
seld/phar-utils                      1.1.1     PHAR file format utilities, for when PHP phars you up
ssnepenthe/color-utils               0.4.2     A PHP library for performing SASS-like color manipulations.
swiftmailer/swiftmailer              v6.2.3    Swiftmailer, free feature-rich PHP mailer
symfony/console                      v3.3.6    Symfony Console Component
symfony/debug                        v3.3.6    Symfony Debug Component
symfony/filesystem                   v3.3.6    Symfony Filesystem Component
symfony/finder                       v3.3.6    Symfony Finder Component
symfony/polyfill-ctype               v1.19.0   Symfony polyfill for ctype functions
symfony/polyfill-iconv               v1.19.0   Symfony polyfill for the Iconv extension
symfony/polyfill-intl-grapheme       v1.19.0   Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn            v1.19.0   Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer     v1.19.0   Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring            v1.19.0   Symfony polyfill for the Mbstring extension
symfony/polyfill-php70               v1.19.0   Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-php72               v1.19.0   Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/process                      v3.3.6    Symfony Process Component
symfony/yaml                         v3.3.6    Symfony Yaml Component
tinify/tinify                        1.5.2     PHP client for the Tinify API. Tinify compresses your images intelligently. Read more at https://tinify.com.
true/punycode                        v2.1.1    A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)
tubalmartin/cssmin                   v4.1.1    A PHP port of the YUI CSS compressor
twig/twig                            v2.12.5   Twig, the flexible, fast, and secure template language for PHP
verbb/base                           1.0.2     Common utilities and building-blocks for Verbb plugins for Craft CMS.
vlucas/phpdotenv                     v2.6.6    Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
voku/anti-xss                        4.1.28    anti xss-library
voku/arrayy                          7.8.4     Array manipulation library for PHP, called Arrayy!
voku/email-check                     3.0.2     email-check (syntax, dns, trash, ...) library
voku/portable-ascii                  1.5.3     Portable ASCII library - performance optimized (ascii) string functions for php.
voku/portable-utf8                   5.4.47    Portable UTF-8 library - performance optimized (unicode) string functions for php.
voku/stop-words                      2.0.1     Stop-Words via PHP
voku/stringy                         6.4.0     A string manipulation library with multibyte support
voku/urlify                          5.0.5     PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.
webmozart/assert                     1.9.1     Assertions to validate method input/output with nice error messages.
webonyx/graphql-php                  v0.12.6   A PHP port of GraphQL reference implementation
yii2tech/ar-softdelete               1.0.4     Provides support for ActiveRecord soft delete in Yii2
yiisoft/yii2                         2.0.38    Yii PHP Framework Version 2
yiisoft/yii2-composer                2.0.10    The composer plugin for Yii extension installer
yiisoft/yii2-debug                   2.1.13    The debugger extension for the Yii framework
yiisoft/yii2-queue                   2.3.0     Yii2 Queue Extension which supported DB, Redis, RabbitMQ, Beanstalk, SQS and Gearman
yiisoft/yii2-swiftmailer             2.1.2     The SwiftMailer integration for the Yii framework
angrybrad commented 4 years ago

@Jan10 Can you shoot your composer.json and composer.lock files over to support@craftcms.com?

brandonkelly commented 4 years ago

@Jan10 Sometimes that happens because someone force-pushes to their repo, which can invalidate existing composer.lock files. Try deleting your composer.lock and run composer update again.

jan10 commented 4 years ago

@angrybrad, @brandonkelly works, thanks!

peimansh commented 3 years ago

Seems something has changed, I'm not sure if from Composer part or Craft part. On PHP Dockerfile we have: RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer which installs composer and RUN composer install to install dependencies. Until 2 days ago: the Composer install script installed 2.x version, but now it installs 1.10.x as the latest version. I had removed Hirak/Prestissimo, so now building the image takes soooo long time ! I tried removing vendor/, deleting composer.lock and run composer update but no luck as it doesn't update plugin-installer by itself. Can someone shed some light please ?

peimansh commented 3 years ago

And another question:

Would it be safer to use : COPY --from=composer /usr/bin/composer /usr/bin/composer instead of RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer ? The composer image uses the latest version, but Installer script for some reason is installing 1.10.x as latest version since a few days ago

peimansh commented 3 years ago

Seems solved: https://github.com/composer/composer/issues/9545

jonlongnecker commented 3 years ago

I'm just now running into this - had a site that didn't get updated for a while so It's failing on all plugin updates. I'm guessing because it's still running on the older version of Craft that hadn't fixed this yet (3.5.14). Is there a way to get just Craft updated to work with Composer 2 and then run the other plugin updates?

jonlongnecker commented 3 years ago

Checking in again - I'm seemingly stuck getting my site updated because of this Composer issue. Do I need to revert my machine to composer 1 so these updates will install? Is there a way to update Craft by itself since its plugin updater seems to be the issue?

angrybrad commented 3 years ago

@jonlongnecker if you have composer installed on the command line, make sure it's the latest release (composer self-update), then nuke your composer.lock and vendor folder, and run composer update from the project root to pull in a fresh copy of the updated dependencies.

leymannx commented 3 years ago

"Failed to extract" ... '/usr/bin/unzip' -qq here. rm -rf vendor and then composer clearcache && composer install -n again fixed it for me.