google-api-php-client icon indicating copy to clipboard operation
google-api-php-client copied to clipboard

Script Google\Task\Composer::cleanup handling the pre-autoload-dump event terminated with an exception

Open bjsapkota1313 opened this issue 1 year ago • 1 comments

Environment details

  • Docker
  • PHP 8.1
  • "google/apiclient": "^2.15.1",

Steps to reproduce

  • Composer install

Code example

# example

image

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

bjsapkota1313 avatar Dec 14 '23 11:12 bjsapkota1313

See https://github.com/googleapis/google-api-php-client/pull/2532

@bjsapkota1313 I am updating the README to contain more info on how to debug the error. Can you follow these instructions and let me know if it fixes your problem? Here are the instructions:

If you see the following error, it's because you need to increase your composer process timeout:

Script Google\Task\Composer::cleanup handling the pre-autoload-dump event terminated with an exception
In Filesystem.php line 200:
Failed to remove directory "(/path/to/vendor/google/apiclient-services/src/...": rmdir(/path/to/...): Text file busy

Either increase the timeout for composer by adding the env flag as COMPOSER_PROCESS_TIMEOUT=600 composer install, or put this in the config section of the composer schema:

{
    "config": {
        "process-timeout": 600
    }
}

This happens because there are a LOT of Google services which are downloaded as part of this package, and it can unfortunately take so long that composer's default of 300 seconds times out.

bshaffer avatar Dec 15 '23 22:12 bshaffer

Closing due to inactivity. Please open a new issue if this continues to be a problem

bshaffer avatar May 20 '24 18:05 bshaffer