1

I have a local Composer installation (Windows 10, Composer 2.5.8 up-to-date,"C:\ProgramData\ComposerSetup\bin" added to $PATH, as well as C:\wamp64\bin\php\php8.2.0) and I keep getting this error when using certain composer commands on my terminal (Cmder), i.e "composer update" on a localhost Drupal 9 project :


In Process.php line 1204:

The process ""C:\Program Files\7-Zip\7z.EXE" x -bb0 -y C:\w
amp64\www\BDV-dev\vendor\composer\tmp-e8f98dc9f37c550099b83
c482cb9eae9 -oC:\wamp64\www\*****\vendor\composer\3ad6f7c
4" exceeded the timeout of 300 seconds.

When running "composer diagnose", here is what I get:

Checking platform settings: OK                                  
Checking git settings: OK git version 2.31.1                    
Checking http connectivity to packagist: OK                     
Checking https connectivity to packagist: OK                    
Checking 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: OK                                   
Composer version: 2.5.8                                         
PHP version: 8.2.0                                              
PHP binary path: C:\wamp64\bin\php\php8.2.0\php.exe             
OpenSSL version: OpenSSL 3.0.7 1 Nov 2022                       
cURL version: 7.85.0 libz 1.2.12 ssl OpenSSL/3.0.7              
zip: extension present, unzip not available, 7-Zip present (7z) 

I have tried to add 7-zip to $PATH and remove / reinstall 7-Zip and Composer but it didn't change anything... I have switched from Xampp to Wamp in order to set PHP 8.2.0 with zip extension enabled.

I have been stuck with this for several days, searched topics but can't find anything related to this issue.

Thank you for your help! Clément

  • The error message is saying that the program timed out, not that the executable couldn't be found. You can just try that command line call yourself (with different files if those temporary files don't exist anymore, of course). Does it work if you do that call yourself? Are you trying to pack / unpack something very large? – Peter Krebs Jun 27 '23 at 09:48
  • 2
    On this error message I was focussing on the "7-zip" part and I completely overlooked the timeout part... I have followed what I found on this post https://stackoverflow.com/a/49304952/15230683 (editing composer.json in order to disable the process timeout). I also performed the command "composer install --prefer-dist --no-dev" which allowed me to successfully update my Drupal 9 project. – Clément BK Jun 29 '23 at 08:37
  • Yes, your composer diagnose also outputs *"7-Zip present"* so it found the executable. You can answer your own question if you want, this is valid. – Peter Krebs Jun 29 '23 at 11:40
  • Does this answer your question? [Why composer install timeouts after 300 seconds?](https://stackoverflow.com/questions/18917768/why-composer-install-timeouts-after-300-seconds) – hakre Jul 01 '23 at 12:00

1 Answers1

1

I have followed what I found on this post:

Editing composer.json in order to disable the process timeout.

I also performed the command

composer install --prefer-dist --no-dev

which allowed me to successfully update my Drupal 9 project.

Mustafa Özçetin
  • 1,893
  • 1
  • 14
  • 16