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

Error extracting archive on composer update with 1.8.5 #7967

Closed
damienBAUDET opened this issue Sep 8, 2022 · 9 comments
Closed

Error extracting archive on composer update with 1.8.5 #7967

damienBAUDET opened this issue Sep 8, 2022 · 9 comments

Comments

@damienBAUDET
Copy link

Bug report

I've got an error when I run composer update, installing phpstan/phpstan (1.8.5): Extracting archive

Failed to extract phpstan/phpstan: (9) '/usr/bin/unzip' -qq '/myproject/vendor/composer/tmp-8f6b26ee3945a20fb9cc11f735a07821' -d '/myproject/vendor/composer/ad9ec86b'

[/myproject/vendor/composer/tmp-8f6b26ee3945a20fb9cc11f735a07821] 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 /myproject/vendor/composer/tmp-8f6b26ee3945a20fb9cc11f735a07821 or /myproject/vendor/composer/tmp-8f6b26ee3945a20fb9cc11f735a07821.zip, and cannot find /myproject/vendor/composer/tmp-8f6b26ee3945a20fb9cc11f735a07821.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 Install of phpstan/phpstan failed

[UnexpectedValueException] '/myproject/vendor/composer/tmp-8f6b26ee3945a20fb9cc11f735a07821' is not a zip archive.

Thanks

@mergeable
Copy link

mergeable bot commented Sep 8, 2022

This bug report is missing a link to reproduction at phpstan.org/try.

It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

This is definitely an infrastructure problem. Try to clear Composer cache, delete your vendor, update Composer to the latest version, and try again.

@xvilo
Copy link

xvilo commented Sep 10, 2022

We are also experiencing this on multiple platforms, local machine (macos), CI/CD gitlab-ci (linux) and here: https://app.buddy.works/repman/repman/pipelines/pipeline/244546/execution/631c967305209b734a22411e

Might be a broader issue can we re-open for an investigation?

Edit 1:
@ondrejmirtes clearing the composer cache does not resolve the issue

Edit 2:
Specifically locking 1.8.4 does work, so the zip of 1.8.5 might be broken?

@maluramichael
Copy link

This is definitely an infrastructure problem. Try to clear Composer cache, delete your vendor, update Composer to the latest version, and try again.

I had to completly nuke my .composer/vendor directory. After that it worked.

image

@morozov
Copy link
Contributor

morozov commented Sep 30, 2022

This is definitely an infrastructure problem.

I'm sorry to bump a closed issue but this is something that we've been observing in Doctrine DBAL builds consistently over the past few weeks. Here's the last occurrence:

    Failed to extract phpstan/phpstan: (9) '/usr/bin/unzip' -qq '/home/runner/work/dbal/dbal/vendor/composer/tmp-ae03ba03ca59623184672708b066d072' -d '/home/runner/work/dbal/dbal/vendor/composer/12ac174b'

[/home/runner/work/dbal/dbal/vendor/composer/tmp-ae03ba03ca59623184672708b066d072]
  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/dbal/dbal/vendor/composer/tmp-ae03ba03ca59623184672708b066d072 or
        /home/runner/work/dbal/dbal/vendor/composer/tmp-ae03ba03ca59623184672708b066d072.zip, and cannot find /home/runner/work/dbal/dbal/vendor/composer/tmp-ae03ba03ca59623184672708b066d072.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
    Install of phpstan/phpstan failed
Error: '/home/runner/work/dbal/dbal/vendor/composer/tmp-ae03ba03ca59623184672708b066d072' is not a zip archive.

In ZipDownloader.php line 207:

  '/home/runner/work/dbal/dbal/vendor/composer/tmp-ae03ba03ca59623184672708b0  
  66d072' is not a zip archive.

While it does look like an infrastructure issue, it's been reproducible only for the phpstan/phpstan Composer package. If necessary, I can provide more links to similar failing builds.

As a maintainer of the package, Ondřej, you may want to get in touch with those who run Packagist and ask for support. I couldn't find any "Support" page there.

@ondrejmirtes
Copy link
Member

What Composer version do you use?

@ondrejmirtes
Copy link
Member

Why I'm asking - composer/composer#10666 fixed cache corrupting and it first appeared in 2.2.10.

@morozov
Copy link
Contributor

morozov commented Oct 2, 2022

The referenced occurrence used Composer 2.4.2.

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants