• Resolved Pel

    (@pelstudio)


    Hi, thank you for writing such a useful and comprehensive plugin.

    We’ve been experiencing issues with our backups failing to upload to AWS S3. The issue only appeared after updating to 2.22.4.25. We receive the following error:

    A PHP fatal error (TypeError) has occurred: Argument 1 passed to Aws\Common\Client\AbstractClient::__construct() must implement interface Aws\Common\Credentials\CredentialsInterface, array given, called in /var/www/html/wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src/MultiRegionClient.php on line 53

    When testing the S3 settings (which have previously worked for years and we have not changed anything with the AWS configuration) we receive the following error:

    PHP Fatal error (TypeError) has occurred during test_storage_settings subaction. Error Message: Argument 1 passed to Aws\Common\Client\AbstractClient::__construct() must implement interface Aws\Common\Credentials\CredentialsInterface, array given, called in /var/www/html/wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src/MultiRegionClient.php on line 53 (Code: 0, line 73 in /var/www/html/wp-content/plugins/wpdm-amazon-s3/aws/Aws/Common/Client/AbstractClient.php)

    Any help in diagnosing the issue would be appreciated.

    Thank you.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Pel

    (@pelstudio)

    Given the similar post in the forum, I should mention that we do not have AWS Plugin for WP installed.

    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    Does the problem still exist if you, for testing purposes, de-activate all other plugins? If so, please then re-activate them in batches to locate the particular one that there is a conflict with.

    David

    Thread Starter Pel

    (@pelstudio)

    Hi, apologies for not having already tried that before posting.

    The conflict is with the WPDM – Amazon s3 plug-in.

    With that plug-in disabled, both the S3 settings test and remote backup upload work successfully.

    Unfortunately, we can’t update that plug-in due to some incompatibilities with our system and it’s a core function that we need to keep.

    We tried adding the define('UPDRAFTPLUS_S3_OLDLIB', true); setting to wp-config.php and with that enabled the S3 settings test passes and is able to access the bucket and create a file:

    S3 settings test result: Success: Region: US: We accessed the bucket, and were able to create files within it.

    But the actual upload of remote backups fail with the following error:

    Amazon S3: Error: Failed to access bucket [REDACTED]. Check your permissions and credentials. (1) UpdraftPlus_S3::getBucket(): [51] SSL: no alternative certificate subject name matches target host name

    But access should work give the success of the S3 settings test. Any thoughts on how we might be able to resolve and keep using the old S3 lib?

    Thank you.

    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    There is an option in the ‘expert’ section of the settings to turn off validation of SSL certificates – that should suppress that error.

    David

    Thread Starter Pel

    (@pelstudio)

    Thank you, that worked. Not ideal to have to turn off SSL cert validation but will have to do until we figure out a permanent solution to upgrade the outdated plug-in.

    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    You can contact us at https://updraftplus.com/paid-support-requests/ and send us a copy of the conflicting plugin (use wetransfer.com – don’t attach it directly, it’ll get blocked by filters) and we can have a look at the precise nature of the conflict.

    David

    Thread Starter Pel

    (@pelstudio)

    Hi, we noticed a new release targeted at some of these AWS issues so upgraded to v2.22.5.25.

    To test, we removed define('UPDRAFTPLUS_S3_OLDLIB', true) from wp-config.php and turned SSL certificate validation back ON.

    An issue still persists so we’ll upload the conflicting plugin via the Paid Support Request form per your suggestion.

    The error we are now receiving is:

    PHP Fatal error (TypeError) has occurred during backup uploads to the s3. Error Message: Argument 1 passed to Aws\Common\Client\AbstractClient::__construct() must implement interface Aws\Common\Credentials\CredentialsInterface, array given, called in /var/www/html/wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src/MultiRegionClient.php on line 53 (Code: 0, line 73 in /var/www/html/wp-content/plugins/wpdm-amazon-s3/aws/Aws/Common/Client/AbstractClient.php)

    • This reply was modified 2 years, 11 months ago by Pel. Reason: Issue actually persists on staging as well
    • This reply was modified 2 years, 11 months ago by Pel. Reason: fixed typo
    Plugin Author David Anderson

    (@davidanderson)

    @pelstudio Am I right in guessing that your bucket name contains dots (“periods”) in it, like “www.something.com” ?

    Plugin Author David Anderson

    (@davidanderson)

    Also – what are your PHP and WordPress versions?

    Thread Starter Pel

    (@pelstudio)

    @davidanderson Yes, we are using a recommended AWS naming convention of com.domain.bucket-name

    We are on WordPress 5.9.1 and PHP 7.3.30

    Plugin Author David Anderson

    (@davidanderson)

    If you change your setting in the ‘Expert’ settings section for “Use the server’s SSL certificates”, then does that make a difference?

    David

    Plugin Author David Anderson

    (@davidanderson)

    With define('UPDRAFTPLUS_S3_OLDLIB', true); included, this is. (In fact, it’s not “old”, it’s merely “alternative”. The only “old” part is the naming as “old” !). To work without that, you’d need the author of the conflicting plugin to stop loading their code on UpdraftPlus’s page.

    Thread Starter Pel

    (@pelstudio)

    With the most recently released version of the plug-in and define('UPDRAFTPLUS_S3_OLDLIB', true); we are now able to successfully upload to S3 with SSL Certificate Verification turn on and using the plugin’s default SSL certs, so this seems like a good solution since it doesn’t sacrifice security.

    Thank you for your help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Fatal Error Uploading/Connecting to AWS’ is closed to new replies.