# Failed to install authentication plugin by composer V2

**URL:** <https://discourse.cakephp.org/t/failed-to-install-authentication-plugin-by-composer-v2/9657>\
**Category:** Need Help\
**Tags:** help\
**Created:** [August 23, 2021, 9:47am UTC](https://discourse.cakephp.org/t/failed-to-install-authentication-plugin-by-composer-v2/9657 "2021-08-23T09:47:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rihofujino](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rihofujino](https://discourse.cakephp.org/u/rihofujino)\
**Post date:** [August 23, 2021, 9:47am UTC](https://discourse.cakephp.org/t/failed-to-install-authentication-plugin-by-composer-v2/9657/1 "2021-08-23T09:47:34Z")

</div>

### Prerequisites

```auto
CakePHP4.0
cakephp/authentication": “2.*”
Composer 2,1.6

```

### Cake authentication plugin installation fail

I am trying to run my CakePHP4 app by Composer v2, which is now currently running by Composer v1 because Composer is recommending migration from v1 to v2 as soon as possible.

However, when I upgrade my local Composer version from v1 to v2, the installation of [cakephp/authentication](https://github.com/cakephp/authentication) fails.

I tried `composer clearcache` but it doesn’t work. What should I do?

```auto
Failed to extract cakephp/authentication: (9) '/usr/bin/unzip' -qq '/Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-8ab97aa043e38717a05f6ddc4ebcacd8' -d '/Users/xxxxx/projects/cgi-bin/vendor/composer/8afb1ec3'

unzip: cannot find or open /Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-8ab97aa043e38717a05f6ddc4ebcacd8.

    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 wyrihaximus/twig-view: (9) '/usr/bin/unzip' -qq '/Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-c5c42ebbdfb34ece3b6edb4f5a399dbb' -d '/Users/xxxxx/projects/cgi-bin/vendor/composer/ca035c01'

unzip: cannot find or open /Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-c5c42ebbdfb34ece3b6edb4f5a399dbb.

    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 cakephp/bake: (9) '/usr/bin/unzip' -qq '/Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-7b9f7b500a9f650b8099dc59039afbf0' -d '/Users/xxxxx/projects/cgi-bin/vendor/composer/0be892f6'

unzip: cannot find or open /Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-7b9f7b500a9f650b8099dc59039afbf0.

    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 cakephp/debug_kit: (9) '/usr/bin/unzip' -qq '/Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-17b25c723d83aa386b363daf59e2cda3' -d '/Users/xxxxx/projects/cgi-bin/vendor/composer/8131a34e'

unzip: cannot find or open /Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-17b25c723d83aa386b363daf59e2cda3.

    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 cakephp/migrations: (9) '/usr/bin/unzip' -qq '/Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-bd2e99f40da7029b3ff300dc3dcdae07' -d '/Users/xxxxx/projects/cgi-bin/vendor/composer/f2584cb5'

unzip: cannot find or open /Users/xxxxx/projects/cgi-bin/vendor/composer/tmp-bd2e99f40da7029b3ff300dc3dcdae07.

    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
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package sebastian/resource-operations is abandoned, you should avoid using it. No replacement was suggested.

```

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [August 23, 2021, 11:07am UTC](https://discourse.cakephp.org/t/failed-to-install-authentication-plugin-by-composer-v2/9657/2 "2021-08-23T11:07:26Z")

</div>

Are you sure you have `"cakephp/plugin-installer": "^1.3",` inside your composer.json aka have the version 1.3.1 of the `cakephp/plugin-installer` installed?

---

<div class="post-metadata">

**Author:** ![rihofujino](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rihofujino](https://discourse.cakephp.org/u/rihofujino)\
**Post date:** [August 24, 2021, 5:23am UTC](https://discourse.cakephp.org/t/failed-to-install-authentication-plugin-by-composer-v2/9657/3 "2021-08-24T05:23:14Z")

</div>

Oh, my `cakephp/plugin-installer` version was 1.2 !  
I upgraded the version and now I the installation success.  
Thank you soo much!!
