• Resolved arpitkr

    (@arpitkr)


    I recently setup W3 total cache and things have been relatively smooth, and the plugin has been great

    I have setup Cloudfront pull as CDN

    Today, I updated a few of my plugins and proceeded to empty local and CDN cache.

    As soon as I tried to empty CDN, I got a fatal error. I went and checked the logs, and this is what I saw

    PHP Fatal error:  Uncaught Error: Call to undefined function GuzzleHttp\Promise\promise_for() in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php:158
    Stack trace:
    #0 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(443): Aws\Credentials\CredentialProvider::fromCredentials(Object(Aws\Credentials\Credentials))
    #1 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(323): Aws\ClientResolver::_apply_credentials(Object(Aws\Credentials\Credentials), Array, Object(Aws\HandlerList))
    #2 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/AwsClient.php(199): Aws\ClientResolver->resolve(Array, Object(Aws\HandlerList))
    #3 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(43): Aws\AwsClient->__construct(Array)
    #4 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(68): W3TC\CdnEngine_Mirror_CloudFront->_init()
    #5 /v in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php on line 158

    I logged into W3 dashboard to test Cloudfront credentials. The test fails with the following error

    [21-Feb-2022 07:05:20 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function GuzzleHttp\Promise\promise_for() in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php:158
    Stack trace:
    #0 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(443): Aws\Credentials\CredentialProvider::fromCredentials(Object(Aws\Credentials\Credentials))
    #1 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(323): Aws\ClientResolver::_apply_credentials(Object(Aws\Credentials\Credentials), Array, Object(Aws\HandlerList))
    #2 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/AwsClient.php(199): Aws\ClientResolver->resolve(Array, Object(Aws\HandlerList))
    #3 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(43): Aws\AwsClient->__construct(Array)
    #4 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(142): W3TC\CdnEngine_Mirror_CloudFront->_init()
    #5 / in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php on line 158

    Now I can verify that the credentials are in fact correct. And no other plugin I have uses these credentials. Can you please let me know how to proceed with this?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @arpitkr

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    Can you please confirm that you are not using any other plugin that may be using the same AWS SDK library?
    Thanks!

    Thread Starter arpitkr

    (@arpitkr)

    Thanks for the quick response Marko.

    To the best of my knowledge, no. I haven’t explicitly used AWS credentials on any other plugin.

    Having said that, I am not sure if there is any other plugin which is initialising the AWS SDK. Is there a way to find out?

    EDIT: It seems Updraft does use the SDK. I am not sure if they initialise it or not because I haven’t setup AWS credentials with Updraft

    • This reply was modified 3 years ago by arpitkr.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @arpitkr

    Thank you for the information.
    Can you please temporarily disable Updraft and see if the problem persists?
    Thanks!

    Thread Starter arpitkr

    (@arpitkr)

    I just did, still getting the same error

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @arpitkr

    Can you try to downgrade the W3TC version to 2.1.2. There could be a bug in the version of the Aws lib or a different class loaded by the autoloader due to another Aws lib loaded for another plugin as I’ve mentioned before.
    Thanks!

    Thread Starter arpitkr

    (@arpitkr)

    Thanks Marco
    There was actually an issue with Google listing, which I had upgraded today. Right now, the Google listing is crashing at multiple places. I have disabled it for now. Let me speak with Listing support and see what to do about it.

    Thanks for looking at it. We can close it. If I face issues after getting around Listing plugin, I will get back to you

    Thanks once again

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @arpitkr

    Thank you for the information.
    Let me know what you found.
    Thanks!

    Thread Starter arpitkr

    (@arpitkr)

    Listing was crashing while initializing aws sdk which has something to do with Jetpack. What exactly, listing support would hopefully let me know

    Interestingly enough, it seems that prevented even w3 total cache from initializing awe sdk

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @arpitkr

    Thank you for sharing this as this may help users with similar issues.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Cloudfront Credential Errors’ is closed to new replies.