googleapis / google-api-php-client

A PHP client library for accessing Google APIs
Apache License 2.0
9.2k stars 3.52k forks source link

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

Closed bjsapkota1313 closed 1 month ago

bjsapkota1313 commented 6 months ago

Environment details

Steps to reproduce

Code example

# example

image

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

Thanks!

bshaffer commented 6 months ago

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 commented 1 month ago

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