Skip to content

Failed to extract symfony/http-kernel #51995

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

Closed
loopy3025 opened this issue Oct 11, 2023 · 3 comments
Closed

Failed to extract symfony/http-kernel #51995

loopy3025 opened this issue Oct 11, 2023 · 3 comments

Comments

@loopy3025
Copy link

loopy3025 commented Oct 11, 2023

Symfony version(s) affected

symfony/http-kernel 6.3.5

Description

Getting this during composer install of acquia/drupal-environment-detector

Failed to extract symfony/http-kernel: (2) '/usr/bin/unzip' -qq '/Users/adam/projects/oursite/vendor/composer/tmp-6b324950550f341f3867311f5c0eb16d' -d '/Users/adam/projects/oursite/vendor/composer/0db9c232'

warning: filename too long--truncating.
[ o�6^P��WL^Bg%-^\g�C��]�&�+i�^IzY^G^B-�,6^T���]����!m)=#N���Cu�=��7�^M5>>��*^H^N�^F�^V�^Jn �^B�>+�-�^\l�p;+s%g$K^_�^X^G����4�K6�(�FY�)G^Mæ����- U��B�Ri�.���TU3-��^E&3^P<Ei(���.��J��^R+H6�8�v?_�+���p�|��^V��@��i|T[�-mA'�+�Z�H�2?�A^PHV�!^P-��{UVJ�+��V?PK^T$�V+!P^O?�Ҧ��/h���>^J��R�1+k1.���JZ�9�?=Z�A>�2�J-��o�:�+�?R���/��+-V��^W��Ѭe�f�{��n�~^^ϻL���{1�-��^E^_?�2�+++^Z-�#�g��V^S��!�^PMl--? ��-j�!b-� .��W+^Y^W^FF�2�^K���RY�8&-�&�^P}^X^X�^SbC�sV��_�R7��OJ�^D��5xp+~<^_��+a�A�s+���^Y^C�-̦�^X�'|K%^B^^R�^]J^C����-=Ӥ ] symfony-http-kernel-9f991a9/CacheWarmer/CacheWarmerInterface.php: mismatching "local" filename (o�6^P��WL^Bg%-^\g�C��]�&�+i�^IzY^G^B-�,6^T���]����!m)=#N���Cu�=��7�^M5>>��^H^N�^F�^V�^Jn �^B�>+�-�^\l�p;+s%g$K^_�^X^G����4�K6�(�FY�)G^Mæ����- U��B�Ri�.���TU3-��^E&3^P<Ei(���.��J��^R+H6�8�v?_�+���p�|��^V��@��i|T[�-mA'�+�Z�H�2?�A^PHV�!^P-��{UVJ�+��V?PK^T$�V+!P^O?�Ҧ��/h���>^J��R�1+k1.���JZ�9�?=Z�A>�2�J-��o�:�+�?R���/��+-V��^W��Ѭe�f�{��n�~^^ϻL���{1�-��^E^_?�2�+++^Z-�#�g��V^S��!�^PMl--? ��-*j�!b-� .��W+^Y^W^FF�2�^K���RY�8&-�&�^P}^X^X�^SbC�sV��_�R7��OJ�^D��5xp+~<^_��+a�A�s+���^Y^C�-̦�^X�'|K%^B^^R�^]J^C����-=Ӥ),
continuing with "central" filename version
error: invalid compressed data to inflate /Users/adam/projects/oursite/vendor/composer/0db9c232/symfony-http-kernel-9f991a9/CacheWarmer/CacheWarmerInterface.php
file #27: bad zipfile offset (local header sig): 19355
file #28: bad zipfile offset (local header sig): 19817
file #29: bad zipfile offset (local header sig): 19891
file #30: bad zipfile offset (local header sig): 20487
file #31: bad zipfile offset (local header sig): 20565
file #32: bad zipfile offset (local header sig): 22295
file #33: bad zipfile offset (local header sig): 22390
file #34: bad zipfile offset (local header sig): 23621
file #35: bad zipfile offset (local header sig): 24938
file #36: bad zipfile offset (local header sig): 25719
/Users/adam/projects/oursite/vendor/composer/0db9c232/symfony-http-kernel-9f991a9/Controller/ArgumentResolver/ServiceValueResolver.php bad CRC 2af263ca (should be b90d0c87)

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

79/88 [=========================>--] 89% Failed to extract acquia/drupal-environment-detector: (2) '/usr/bin/unzip' -qq '/Users/adam/projects/oursite/vendor/composer/tmp-60e1d14c9bf317b00863ef05f52bf858' -d '/Users/adam/projects/oursite/vendor/composer/da3d445e'

/Users/adam/projects/oursite/vendor/composer/da3d445e/acquia-drupal-environment-detector-396cc5e/composer.lock bad CRC 8caceb71 (should be 89f0b0a9)

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

Then, when Drupal attempts to bootstrap:

[error] Error: Class "Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php) #0 /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(455): Drupal\Component\DependencyInjection\Container->createService(Array, 'private__E5RB7E...')
#1 /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(468): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)

There is only one build process occurring on this system.

I was forced to pin symfony/http-kernel to v6.3.3 in order to get Drupal to bootstrap. I am not entirely sure if this is a failing of Composer, Drupal, Symfony, or my system somehow. However, since 6.3.3 installs just fine, my money is on something was missed when zipping this up.

In composer, the reference for 6.3.5 seems correct (9f991a964368bee8d883e8d57ced4fe9fff04dfc) and when I attempt to manually download the zipball at https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc, it does download. The "bad crc" error seems to indicate the file is corrupted, but I can easily manually extract the file manually. I am not sure where the disconnect is in composer.

How to reproduce

Attempt to unzip symfony/http-kernel 6.3.5 with composer, possibly in a Drupal 10 project and on a mac running ARM.

Possible Solution

No response

Additional Context

The build works remotely during Acquia Pipelines build.

@loopy3025
Copy link
Author

Well, I feel dumb. composer clear-cache fixed the problem.

@stof
Copy link
Member

stof commented Oct 11, 2023

try clearing your composer cache. Maybe Github has generated corrupted zip files at some times due to a bug that is now fixed so that when you download the file manually you get a correct one but composer reuses the cached file instead of re-downloading it. That might also explain why the CI build works (if it did not run at the time the corrupted zip file was downloaded or it already had a cached valid file from an earlier build).

To validate that, you might actually check the composer cache (before clearing it of course):

  1. Run composer config cache-files-dir to know where the composer cache of downloaded files is
  2. Look at the $cacheDir/symfony/http-kernel/ folder (replacing $cacheDir by the actual cache directory)
  3. Try to unzip the files available there

@loopy3025
Copy link
Author

:D

@derrabus derrabus closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants