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

Zip extraction issues investigation #11148

Open
pramod-mandadapu opened this issue Oct 25, 2022 · 12 comments
Open

Zip extraction issues investigation #11148

pramod-mandadapu opened this issue Oct 25, 2022 · 12 comments
Labels
Milestone

Comments

@pramod-mandadapu
Copy link

Hi Team,

We are using php-actions/composer@v6 version.

When we are trying to deploy our code we are getting below error.

We have noticed that the extraction is failed at GitHub runners it self. Is it an issue with composer?

Can you please let us know.

**Error: Failed to extract rankmath/seo-by-rank-math-pro: (1) '/usr/bin/unzip' -qq '/app/vendor/composer/tmp-d924851250d3e7553dbb2ddae8e6e83c' -d '/app/vendor/composer/57aa60f7'

warning [/app/vendor/composer/tmp-d924851250d3e7553dbb2ddae8e6e83c]: 1524255 extra bytes at beginning or within zipfile
(attempting to process anyway)

In ZipDownloader.php line 171:

Failed to extract rankmath/seo-by-rank-math-pro: (1) '/usr/bin/unzip' -qq '
/app/vendor/composer/tmp-d924851250d3e7553dbb2ddae8e6e83c' -d '/app/vendor/
composer/57aa60f7'

warning [/app/vendor/composer/tmp-d924851250d3e7553dbb2ddae8e6e83c]: 15242
55 extra bytes at beginning or within zipfile
(attempting to process anyway)

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--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] [--] [...]**

@Seldaek Seldaek added this to the 2.4 milestone Oct 26, 2022
@pramod-mandadapu
Copy link
Author

Hi @Seldaek ,

We have executed the job again and it reported the same error. No debug statements are printed.

Do we need to enable anything from our end.. Please find the attached log file.

1_deploy (1).txt

Regards,
Pramod M

@stof
Copy link
Contributor

stof commented Oct 26, 2022

This rankmath/seo-by-rank-math-pro package is not one registered on packagist.org, so this is not something we can reproduce.

Make sure that the zip they provide is not corrupted.

@Seldaek
Copy link
Member

Seldaek commented Oct 26, 2022

You can try to run composer self-update --snapshot before your install step, hopefully that does it, but I'm not sure if it will depending how the action runner you use runs composer. Otherwise you may need to wait until the next patch release is out.

@Seldaek
Copy link
Member

Seldaek commented Oct 27, 2022

2.4.4 is out now so hopefully you'll get the extra output if it happens again.. But I think what @stof said might be worth looking at as well.

@Seldaek Seldaek changed the title Unable to extract Rank Math pro plugin Zip extraction issues investigation Oct 27, 2022
@Seldaek Seldaek modified the milestones: 2.4, Bugs Nov 24, 2022
emahorvat52 pushed a commit to emahorvat52/composer that referenced this issue Feb 3, 2023
@fredden
Copy link
Contributor

fredden commented May 26, 2023

Do you want reports submitted here? I've got a failure in a GitHub Actions run which links to this issue. https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435

Logs
Run ramsey/composer-install@v1
  with:
    dependency-versions: highest
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
    COMPOSER_AUTH: {"github-oauth": {"github.com": "***"}}
Composer cache directory found at /home/runner/.cache/composer
Composer working directory set to project root.
Using highest versions of dependencies
PHP version is 8.1.18
Operating system is linux
Cache primary key is linux-php-8.1.18-highest-16f0c69564c8694637117b8f9196ce[2](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:2)bde7cb1[3](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:3)0[4](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:4)1398d7a36b4acc4[5](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:5)cf39d98-
Cache restore keys are: linux-php-8.1.18-highest-1[6](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:6)f0c69564c869463[7](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:7)117b[8](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:8)f[9](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:10)196ce2bde7cb13041398d7a36b4acc45cf39d98-, linux-php-8.1.18-highest-
Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-[10](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:11)-[11](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:12)-github-actions-deprecating-save-state-and-set-output-commands/
/usr/local/bin/composer update --no-interaction --no-progress --ansi
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Received 14649042 of 14649042 (100.0%), 22.0 MBs/sec
Cache Size: ~14 MB (14649042 B)
/usr/bin/tar -z -xf /home/runner/work/_temp/c1458d0c-d345-4433-8d22-d84df89a2062/cache.tgz -P -C /home/runner/work/magento-coding-standard/magento-coding-standard
Updating dependencies
Lock file operations: 0 installs, 13 updates, 0 removals
  - Upgrading doctrine/instantiator (1.4.1 => 2.0.0)
  - Upgrading myclabs/deep-copy (1.11.0 => 1.11.1)
  - Upgrading nikic/php-parser (v4.15.2 => v4.15.5)
  - Upgrading phpstan/phpstan (1.9.14 => 1.10.15)
  - Upgrading phpunit/php-code-coverage (9.2.20 => 9.2.26)
  - Upgrading phpunit/phpunit (9.5.27 => 9.6.8)
  - Upgrading rector/rector (0.15.10 => 0.15.25)
  - Upgrading sebastian/diff (4.0.4 => 4.0.5)
  - Upgrading sebastian/environment (5.1.4 => 5.1.5)
  - Upgrading sebastian/recursion-context (4.0.4 => 4.0.5)
  - Upgrading sebastian/type (3.2.0 => 3.2.1)
  - Upgrading squizlabs/php_codesniffer (3.7.1 => 3.7.2)
  - Upgrading webonyx/graphql-php (v15.0.0 => v15.4.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 37 installs, 0 updates, 0 removals
  - Downloading squizlabs/php_codesniffer (3.7.2)
  - Downloading dealerdirect/phpcodesniffer-composer-installer (v1.0.0)
  - Downloading doctrine/instantiator (2.0.0)
  - Downloading myclabs/deep-copy (1.11.1)
  - Downloading phpcompatibility/php-compatibility (9.3.5)
  - Downloading phpcsstandards/phpcsutils (1.0.5)
  - Downloading theseer/tokenizer (1.2.1)
  - Downloading nikic/php-parser (v4.15.5)
  - Downloading phpunit/php-text-template (2.0.4)
  - Downloading phpunit/php-file-iterator (3.0.6)
  - Downloading phpunit/php-code-coverage (9.2.26)
  - Downloading phpunit/php-invoker (3.1.1)
  - Downloading phpunit/php-timer (5.0.3)
  - Downloading symfony/polyfill (v1.27.0)
  - Downloading webonyx/graphql-php (v15.4.0)
  - Downloading phpunit/phpunit (9.6.8)
  - Downloading yoast/phpunit-polyfills (1.0.5)
Cache restored successfully
Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Cache restored from key: linux-php-8.1.18-highest-16f0c69564c8694637117b8f9196ce2bde7cb13041398d7a36b4acc45cf39d98-
  - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive
  - Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive
  - Installing doctrine/instantiator (2.0.0): Extracting archive
  - Installing myclabs/deep-copy (1.11.1): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.3): Extracting archive
  - Installing phpcompatibility/php-compatibility (9.3.5): Extracting archive
  - Installing phpcsstandards/phpcsutils (1.0.5): Extracting archive
  - Installing theseer/tokenizer (1.2.1): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing nikic/php-parser (v4.15.5): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/environment (5.1.5): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.26): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpstan/phpstan (1.10.15): Extracting archive
  - Installing rector/rector (0.15.25): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/recursion-context (4.0.5): Extracting archive
  - Installing sebastian/exporter (4.0.5): Extracting archive
  - Installing sebastian/diff (4.0.5): Extracting archive
  - Installing sebastian/comparator (4.0.8): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.5): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/type (3.2.1): Extracting archive
  - Installing symfony/polyfill (v1.27.0): Extracting archive
  - Installing webonyx/graphql-php (v15.4.0): Extracting archive
  - Installing phpunit/phpunit (9.6.8): Extracting archive
  - Installing yoast/phpunit-polyfills (1.0.5): Extracting archive
    Failed to extract phpstan/phpstan: (9) '/usr/bin/unzip' -qq '/home/runner/work/magento-coding-standard/magento-coding-standard/vendor/composer/tmp-46f0136a1c18ce98f6669c4f9eaeb304' -d '/home/runner/work/magento-coding-standard/magento-coding-standard/vendor/composer/c782ea37'

[/home/runner/work/magento-coding-standard/magento-coding-standard/vendor/composer/tmp-46f0136a1c18ce98f6669c4f9eaeb304]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/runner/work/magento-coding-standard/magento-coding-standard/vendor/composer/tmp-46f0136a1c18ce98f6669c4f9eaeb304 or
        /home/runner/work/magento-coding-standard/magento-coding-standard/vendor/composer/tmp-46f0136a1c18ce98f6669c4f9eaeb304.zip, and cannot find /home/runner/work/magento-coding-standard/magento-coding-standard/vendor/composer/tmp-46f0136a1c18ce98f6669c4f9eaeb304.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Additional debug info, please report to 
https://github.com/composer/composer/issues/11148 if you see this:
File size: 22[12](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:13)352
File SHA1: 94bbbeb5bd543070899328[13](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:14)[14](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:15)14fd75e6283faa
First 100 bytes (hex): 504b03040a00000000008043a9560000000000000000000000001800090070687073746[16](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:17)e2d7068707374616e2d373632633464612f555405000[18](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:19)1665a64504b03040a00000008008043a9561623f5c87d0200002f0400001f0009007068707374616e
Last 100 bytes (hex): 523537cdaeddc421c80fe85b629f96553d0feb7983ccd0ee9c52656a12e8b[19](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:20)55e1cdd2414cd331944377b5bae9bd8b8c7c9c6988d43918b9c5e4ac54e81e6b66cbeeac0bdb2e1c532a2642b526541e5d4951fa3593a9da572a3e[20](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:21)ff3a945aad77935ea
Origin URL: https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd
Response Headers: []
    Install of phpstan/phpstan failed
Error: '/home/runner/work/magento-coding-standard/magento-coding-standard/vendor/composer/tmp-46f0136a1c18ce98f6669c4f9eaeb304' is not a zip archive.

In ZipDownloader.php line [22](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:23)0:

  '/home/runner/work/magento-coding-standard/magento-coding-standard/vendor/c  
  omposer/tmp-46f0136a1c18ce98f6669c4f9eaeb[30](https://github.com/magento/magento-coding-standard/actions/runs/5092612078/jobs/9154185912?pr=435#step:7:31)4' is not a zip archive.          


update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-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] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]

Error: The process '/usr/local/bin/composer' failed with exit code 19

logs_812.zip

PHP version doesn't seem relevant, as there are similar failures on other PHP versions, eg:

These are all failing with URLs like https://api.github.com/repos/$vendor/$package/zipball/$hash

@Seldaek
Copy link
Member

Seldaek commented May 28, 2023

Data from the log you shared above:

File size: 2212352
File SHA1: 94bbbeb5bd543070899328131414fd75e6283faa
First 100 bytes (hex): 504b03040a00000000008043a956000000000000000000000000180009007068707374616e2d7068707374616e2d373632633464612f555405000181665a64504b03040a00000008008043a9561623f5c87d0200002f0400001f0009007068707374616e
Last 100 bytes (hex): 523537cdaeddc421c80fe85b629f96553d0feb7983ccd0ee9c52656a12e8b1955e1cdd2414cd331944377b5bae9bd8b8c7c9c6988d43918b9c5e4ac54e81e6b66cbeeac0bdb2e1c532a2642b526541e5d4951fa3593a9da572a3e20ff3a945aad77935ea

Data I got from downloading https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd here:

File size: 3413564
File SHA1: c93c2fabbe35dadb4ad9fc0ecd675f8bba8f9834
First 100 bytes (hex): 504b03040a00000000008043a956000000000000000000000000180009007068707374616e2d7068707374616e2d373632633464612f555405000181665a64504b03040a00000008008043a9561623f5c87d0200002f0400001f0009007068707374616e
Last 100 bytes (hex): 7374616e2d373632633464612f7068707374616e2e706861722e617363555405000181665a64504b0506000000000a000a007e03000080123400280037363263346461633464613666383735366565626238306535323863336134373835356461396264

So we can indeed see the file appears truncated, they begin with the same but yours is much shorter.

What I find odd is that phpstan/phpstan does not seem to have been downloaded, and there are no headers logged which confirms that, so it looks like a corrupt cache file. Now the question is was it written corrupt by Composer into the cache, or was it corrupted by GitHub Action's cache/restore step?

The other question is what can we do about this.. I'd imagine if we detect a corrupt zip file and we see that it came from cache we probably should wipe the cache and redownload it + retry extraction.

@cy2-alex
Copy link

cy2-alex commented Sep 4, 2023

I'm also seeing this problem with the latest laravel/framework release laravel/framework@ae93199

@Krinkle
Copy link

Krinkle commented Sep 5, 2023

At https://github.com/wikimedia/less.php/actions/runs/6079215498/job/16491426989

  - Installing phpunit/phpunit (9.5.28): Extracting archive
    Failed to extract phan/phan: (9) '/usr/bin/unzip' -qq '/home/runner/work/less.php/less.php/vendor/composer/tmp-d6728d6c8fb84564c3b6a4780b3daf24' -d '/home/runner/work/less.php/less.php/vendor/composer/d2ee98f2'

[/home/runner/work/less.php/less.php/vendor/composer/tmp-d6728d6c8fb84564c3b6a4780b3daf24]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/runner/work/less.php/less.php/vendor/composer/tmp-d6728d6c8fb84564c3b6a4780b3daf24 or
        /home/runner/work/less.php/less.php/vendor/composer/tmp-d6728d6c8fb84564c3b6a4780b3daf24.zip, and cannot find /home/runner/work/less.php/less.php/vendor/composer/tmp-d6728d6c8fb84564c3b6a4780b3daf24.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Additional debug info, please report to https://github.com/composer/composer/issues/11148 if you see this:
File size: 1605441
File SHA1: 2538e983d6d9c54c348dd1370eeb3a6058a3b6a6
First 100 bytes (hex): 504b03040a0000000000238e1955000000000000000000000000120009007068616e2d7068616e2d666566343031372f555405000183180863504b03040a0000000800238e1955074e3ce4cb000000290100001f0009007068616e2d7068616e2d666566
Last 100 bytes (hex): f46b81e9643d1ab1767c68ace071625e4c245dd3a6067277d36966d2c2271679cc8c355ab8e9271d034699b0e68f2001b9cb8bea4db1e05b708ee595a7c4485999255b48505cc11534cdaf6a636591d06402e98536cde0e63cc6c4940fe5b81d8e983ae6
Origin URL: https://api.github.com/repos/phan/phan/zipball/fef40178a952bcfcc3f69b76989dd613c3d5c759
Response Headers: ["HTTP\/2 200 ","access-control-allow-origin: https:\/\/render.githubusercontent.com","content-disposition: attachment; filename=phan-phan-5.4.1-0-gfef4017.zip","content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox","content-type: application\/zip","cross-origin-resource-policy: cross-origin","etag: W\/\"771d0464fbaeb3d847f538f8bb37e78f623caca0c052b88466080c6c2aeed7e5\"","strict-transport-security: max-age=31536000","vary: Authorization,Accept-Encoding,Origin","x-content-type-options: nosniff","x-frame-options: deny","x-xss-protection: 1; mode=block","date: Tue, 05 Sep 2023 01:42:57 GMT","x-github-request-id: 4C0A:1F3E:97E2A:E5329:64F6879F"]
    Install of phan/phan failed

Error: '/home/runner/work/less.php/less.php/vendor/composer/tmp-d6728d6c8fb84564c3b6a4780b3daf24' is not a zip archive.
In ZipDownloader.php line 220:
                                                                               
  '/home/runner/work/less.php/less.php/vendor/composer/tmp-d6728d6c8fb84564c3  
  b6a4780b3daf24' is not a zip archive.                                        
                                                                               

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>...]

Error: Process completed with exit code 19.

@Zodiac1978
Copy link

Zodiac1978 commented Jan 7, 2024

Having a similar problem in our WordPress plugin:
https://github.com/pluginkollektiv/antispam-bee/actions/runs/7438346183/job/20237004440?pr=553

Details

Failed to extract dmore/chrome-mink-driver: (9) '/usr/bin/unzip' -qq '/home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-8c32a8ca3da2dcaf6930b22d30047676.zip' -d '/home/runner/work/antispam-bee/antispam-bee/vendor/composer/497a19e6'

[/home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-8c32a8ca3da2dcaf6930b22d30047676.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-8c32a8ca3da2dcaf6930b22d30047676.zip or
        /home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-8c32a8ca3da2dcaf6930b22d30047676.zip.zip, and cannot find /home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-8c32a8ca3da2dcaf6930b22d30047676.zip.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Additional debug info, please report to https://github.com/composer/composer/issues/11148 if you see this:
File size: 21262
File SHA1: 326e963d64196f0c8c47b4d53b1fa12e89dc09a6
First 100 bytes (hex): 1f8b0800000000000003ec3bed72db4692fecda79895532769c36f49a4acacaf8a16298b59495491549c5492b387c0901c0b0470330351f479ef85ee31eec5aebb67008212655b8ae4ecd51a49592430e8eee9efee69c6fcfaed2488463c783b15dc17ea
Last 100 bytes (hex): d8a8afbfec3ced3cdffdf5f0edfece41e7c5dec121658830a37063389970ce938aa17862534f46207f2fb68ba083b672c3b9b93bdd3c37cfcd73f3dc3c37cfcd73f3dc3c37cfcd73f3dc3c37cfcd73f3dc3c37cfcd73f37cffcfff07a29d1f1e00b80100
Origin URL: https://gitlab.com/api/v4/projects/DMore%2Fchrome-mink-driver/repository/archive.zip?sha=f85c8f86ca2e9000119c310577a6942683f7e280
Response Headers: ["HTTP\/2 200 ","date: Sun, 07 Jan 2024 12:54:47 GMT","content-type: application\/octet-stream","cache-control: max-age=0, private, must-revalidate","content-disposition: attachment; filename=\"chrome-mink-driver-f85c8f86ca2e9000119c310577a6942683f7e280-f85c8f86ca2e9000119c310577a6942683f7e280.tar.gz\"","content-security-policy: default-src 'none'","content-transfer-encoding: binary","etag: W\/\"12ae32cb1ec02d01eda3581b127c1fee\"","vary: Origin, Accept-Encoding","x-content-type-options: nosniff","x-frame-options: SAMEORIGIN","x-gitlab-meta: {\"correlation_id\":\"b5a64622036d6da41bb80a02677529ed\",\"version\":\"1\"}","x-request-id: b5a64622036d6da41bb80a02677529ed","x-runtime: 0.102572","strict-transport-security: max-age=31536000","referrer-policy: strict-origin-when-cross-origin","ratelimit-observed: 4","ratelimit-remaining: 1997","ratelimit-reset: 1704632147","ratelimit-resettime: Sun, 07 Jan 2024 12:55:47 GMT","ratelimit-limit: 2000","gitlab-lb: haproxy-main-45-lb-gprd","gitlab-sv: localhost","cf-cache-status: MISS","report-to: {\"endpoints\":[{\"url\":\"https:\\\/\\\/a.nel.cloudflare.com\\\/report\\\/v3?s=I4kBirs4JPZxNroW9PaIEo8YxMGHtgPHH5nTqh%2FMa7iIHJ4NFkpDyw5DvGoyXZl2q7Qcn%2BFG%2BqGN7ibK%2FsFG1rtpzAnZTH6avQnq7oYgNi8F8bMEF%2ByfMPfOPPw%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}","nel: {\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}","set-cookie: _cfuvid=Qp.iO_NDqX1aWG8z1mOn.t4S6UmM5IKsCIxclFeqsOs-1704632087693-0-604800000; path=\/; domain=.gitlab.com; HttpOnly; Secure; SameSite=None","server: cloudflare","cf-ray: 841c59f2ec3321a9-ORD"]
    Install of dmore/chrome-mink-driver failed
    Failed to extract dmore/behat-chrome-extension: (9) '/usr/bin/unzip' -qq '/home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-68a0d5da3a611d845534e7e6c48bccf6.zip' -d '/home/runner/work/antispam-bee/antispam-bee/vendor/composer/81fd2147'

[/home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-68a0d5da3a611d845534e7e6c48bccf6.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-68a0d5da3a611d845534e7e6c48bccf6.zip or
        /home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-68a0d5da3a611d845534e7e6c48bccf6.zip.zip, and cannot find /home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-68a0d5da3a611d845534e7e6c48bccf6.zip.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Additional debug info, please report to https://github.com/composer/composer/issues/11148 if you see this:
File size: 4265
File SHA1: a2e391e6349ea27b1084df867ca4e4d04f503351
First 100 bytes (hex): 1f8b0800000000000003ed1c6b77dbb6359ff92b30359be54cef67ecda6e154baeb5d9968f2437cb893d15222189354572046947ebd2dfbe7b01922229397ebb8f10ed392241dc272eee038063d34fa3a9618da9319a31aa31e7d5d3b712b446a3217ea1
Last 100 bytes (hex): 5ed00f50a8d430f0afd6b2e19c645f4f245cb2188b166493605314ff4215b8b02624b190a2509f63ba59b198c841f2aae2bed6722d6d694b5bdad296b6b4a52d6d694b5bdad296b6b4a52d6d694b5bdad296b6b4a52d6d69fb62fb3f41db3a0900780000
Origin URL: https://gitlab.com/api/v4/projects/DMore%2Fbehat-chrome-extension/repository/archive.zip?sha=6279986ef85ac179f055460502e9b11c3784146c
Response Headers: ["HTTP\/2 200 ","date: Sun, 07 Jan 2024 12:54:47 GMT","content-type: application\/octet-stream","cache-control: max-age=0, private, must-revalidate","content-disposition: attachment; filename=\"behat-chrome-extension-6279986ef85ac179f055460502e9b11c3784146c-6279986ef85ac179f055460502e9b11c3784146c.tar.gz\"","content-security-policy: default-src 'none'","content-transfer-encoding: binary","etag: W\/\"12ae32cb1ec02d01eda3581b127c1fee\"","vary: Origin, Accept-Encoding","x-content-type-options: nosniff","x-frame-options: SAMEORIGIN","x-gitlab-meta: {\"correlation_id\":\"82847d966f67820ebde32de0b05e0b5c\",\"version\":\"1\"}","x-request-id: 82847d966f67820ebde32de0b05e0b5c","x-runtime: 0.167551","strict-transport-security: max-age=31536000","referrer-policy: strict-origin-when-cross-origin","ratelimit-observed: 4","ratelimit-remaining: 1996","ratelimit-reset: 1704632147","ratelimit-resettime: Sun, 07 Jan 2024 12:55:47 GMT","ratelimit-limit: 2000","gitlab-lb: haproxy-main-51-lb-gprd","gitlab-sv: localhost","cf-cache-status: MISS","report-to: {\"endpoints\":[{\"url\":\"https:\\\/\\\/a.nel.cloudflare.com\\\/report\\\/v3?s=jro1x5hjnX6%2B2mIKPYJg%2FEqh3hGXF7LtNOK6S8we4s%2FROAcD%2BuKxJYLwxg%2FBpscEz1cJNkAFL7QmLY7BWnPMDFnIl2dFPwxSBq7vaFINao4g%2FVvmx9nadA085jo%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}","nel: {\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}","set-cookie: _cfuvid=sI8sR9bc3FFOeGI54lyxLI0YoiYq1QODTm2ML_bppII-1704632087863-0-604800000; path=\/; domain=.gitlab.com; HttpOnly; Secure; SameSite=None","server: cloudflare","cf-ray: 841c59f35c8221a9-ORD"]
    Install of dmore/behat-chrome-extension failed
Error: '/home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-8c32a8ca3da2dcaf6930b22d30047676.zip' is not a zip archive.

In ZipDownloader.php line 222:
                                                                               
  '/home/runner/work/antispam-bee/antispam-bee/vendor/composer/tmp-8c32a8ca3d  
  a2dcaf6930b22d30047676.zip' is not a zip archive.                            
                                                                               

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>...]

Error: Process completed with exit code 19.

Any ideas what can cause this or how we can fix it?

@mattradford-sage
Copy link

Also having an issue installing a WordPress plugin, from Envato:


[/home/runner/work/saw/saw/vendor/composer/tmp-cb7fc79298338b244d2fe2b27fd5866a.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/runner/work/saw/saw/vendor/composer/tmp-cb7fc79298338b244d2fe2b27fd5866a.zip or
        /home/runner/work/saw/saw/vendor/composer/tmp-cb7fc79298338b244d2fe2b27fd5866a.zip.zip, and cannot find /home/runner/work/saw/saw/vendor/composer/tmp-cb7fc79298338b244d2fe2b27fd5866a.zip.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Additional debug info, please report to https://github.com/composer/composer/issues/11148 if you see this:
File size: 2008
File SHA1: 9de24677aac820c2be5cd5835b200a591e0a8ef7
First 100 bytes (hex): 7b22646f776e6c6f61645f75726c223a2268747470733a2f2f6d61726b6574706c6163652d646f776e6c6f6164732e637573746f6d65722e656e7661746f75736572636f6e74656e742e636f6d2f66696c65732f3438343636343736332f66696c656269
Last 100 bytes (hex): 763533474178526749765735674b553630556c67444a4e364638364f6b554a54514a67766c456c654e6d646a326a6973482d574a4b6f4a444f7e415f5c75303032364b65792d506169722d49643d41504b414a52503241564b4e465a4f4d34424c51227d
Origin URL: https://api.envato.com/v3/market/buyer/download?item_id=21715379&version=6.0.6
Response Headers: ["HTTP\/2 200 ","date: Mon, 22 Jan 2024 17:02:44 GMT","content-type: application\/json; charset=utf-8","content-length: 1371","x-amzn-requestid: 1010349a-8841-4f54-9ff1-bb3c674fa134","referrer-policy: origin-when-cross-origin","x-xss-protection: 1; mode=block","x-runtime: 0.071180","access-control-allow-origin: *","content-encoding: gzip","strict-transport-security: max-age=31536000","x-frame-options: SAMEORIGIN","x-amzn-remapped-connection: keep-alive","x-download-options: noopen","x-request-id: 84995dc65c4f4671-DFW","x-amz-apigw-id: R83kOFpzIAMERvQ=","vary: Accept","cache-control: no-store","x-amzn-remapped-server: nginx","expires: 0","x-content-type-options: nosniff","etag: W\/\"ba37b6a2edf0c6791abd3ff69099378d\"","pragma: no-cache","x-amzn-remapped-date: Mon, 22 Jan 2024 17:02:44 GMT","x-cache: Miss from cloudfront","via: 1.1 d13b53f294edffa45064366c617596fe.cloudfront.net (CloudFront)","x-amz-cf-pop: DFW57-P3","x-amz-cf-id: Lf8upScYnQQ7y3NGTWUz2ZjM1_kBmorxlZsN80g9FfzXq-MxReu57g==","cf-cache-status: DYNAMIC","set-cookie: __cf_bm=jYG5nMuQQb9D62aAcllVc3yQ2icThvuKF7WJzJWEDqQ-1705942964-1-AZvlh4+DUyjCW6f8AS2Gev0ZbJJpPZjmbHHA\/jdkaFq9Yob3JaurmFaLsQsll8Dkh9FZZM\/482hhdmXDdLD\/D8Y=; path=\/; expires=Mon, 22-Jan-24 17:32:44 GMT; domain=.api.envato.com; HttpOnly; Secure; SameSite=None","server: cloudflare","cf-ray: 84995dc65c4f4671-DFW"]
    Install of envato/filebird-pro failed
Error: '/home/runner/work/saw/saw/vendor/composer/tmp-cb7fc79298338b244d2fe2b27fd5866a.zip' is not a zip archive.

In ZipDownloader.php line 222:
                                                                               
 /home/runner/work/saw/saw/vendor/compo  
  ser/tmp-cb7fc79298338b244d2fe2b27fd5866a.zip' is not a zip archive.          
                                                                               

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>...]

Error: Process completed with exit code 19.```

@Zodiac1978
Copy link

Any ideas what can cause this or how we can fix it?

In our case the repo was renamed/moved and the redirection from GitLab was not working correctly for ZIP files in GitHub Actions (only locally). A composer update was the fix (and rebasing some PRs).

@Seldaek Seldaek added the Bug label Feb 9, 2024
@thiagodp
Copy link

thiagodp commented Jun 26, 2024

Hello @Seldaek ,

I'm having a similar problem (extraction issues) when installing kahlan/kahlan:

image

The message includes "O cliente não tem o privilégio necessário" (in Portuguese) which means something like "The user doesn't have the enough access privileges".

Environment:

C:\code\oss\router>composer diagnose -vvv
Running 2.7.7 (2024-06-10 22:11:12) with PHP 8.2.12 on Windows NT / 10.0
Reading ./composer.json (C:\code\oss\router\composer.json)
Loading config file ./composer.json (C:\code\oss\router\composer.json)
Checked CA file C:\dev\xampp\apache\bin\curl-ca-bundle.crt: valid
Executing command (C:\code\oss\router): git branch -a --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: C:/Users/thiag/AppData/Roaming/Composer/composer.json

Reading ./composer.lock (C:\code\oss\router\composer.lock)
Reading C:\code\oss\router/vendor/composer/installed.json (C:\code\oss\router\vendor\composer\installed.json)
Checking composer.json: Reading ./composer.json (C:\code\oss\router\composer.json)
OK
Checking platform settings: OK
Checking git settings: Executing command (CWD): git config color.ui
Executing command (CWD): git --version
OK git version 2.45.2
Checking http connectivity to packagist: Downloading http://repo.packagist.org/packages.json
[200] http://repo.packagist.org/packages.json
OK
Checking https connectivity to packagist: Downloading https://repo.packagist.org/packages.json
[200] https://repo.packagist.org/packages.json
OK
Checking github.com rate limit: Downloading https://api.github.com/rate_limit
[200] https://api.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: Downloading https://getcomposer.org/versions
[200] https://getcomposer.org/versions
OK
Checking Composer and its dependencies for vulnerabilities: Downloading https://repo.packagist.org/packages.json if modified
[304] https://repo.packagist.org/packages.json
Downloading https://packagist.org/api/security-advisories/
[200] https://packagist.org/api/security-advisories/
OK
Composer version: 2.7.7
PHP version: 8.2.12
PHP binary path: C:\dev\xampp\php\php.exe
OpenSSL version: OpenSSL 3.0.11 19 Sep 2023
curl version: 8.4.0 libz 1.2.12 ssl OpenSSL/3.0.11
zip: extension not loaded, unzip not available, 7-Zip present (7z)

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

9 participants