MainWP Community

BackWPup extension error selecting S3 buckets

I use BackWPup and the MainWP extension to manage all my child site backups. I also have BackWPup installed on my dashboard site and it is set up as a child site so I can back it up along with everything else.

Since version 4.0, there is an issue with the BackWPup extension. After entering the Access and Secret keys, the error below shows up and I’m unable to select a bucket.

Before I noticed the error, I made a change to another setting and saved the job out to all child sites, which ended up disconnecting with S3 because no bucket was selected. I had to spend a day and a half going to each individual child site to reselect the S3 bucket and save the settings for each backup job.

The BackWPup plugin works fine on each child site - there is no error if I enter the S3 keys and select a bucket. I don’t know if it’s an issue with having the main BackWPup plugin installed on the dashboard site in addition the MainWP extension of BackWPup, but this really needs to be sorted out because I can’t add a new child site and sync backup jobs otherwise, I’ll have to spend another day and a half manually fixing each site’s jobs.

Is anyone else experiencing this issue?

BEGIN ERROR MESSAGE

Missing required client configuration options: version: (string) A “version” configuration value is required. Specifying a version constraint ensures that your code will not be affected by a breaking change made to the service. For example, when using Amazon S3, you can lock your API version to “2006-03-01”. Your build of the SDK has the following version(s) of “s3”: * “2006-03-01” You may provide “latest” to the “version” configuration value to utilize the most recent available API version that your client’s API provider can find. Note: Using ‘latest’ in a production application is not recommended. A list of available API versions can be found on each client’s API documentation page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are unable to load a specific API version, then you may need to update your copy of the SDK.

END ERROR MESSAGE

Some additional information:

I deactivated the BackWPup plugin on my dashboard site to see if it is conflicting with the MainWP extension. While the error message is gone, I still can’t select a bucket; the dropdown list doesn’t respond to clicks. I can see in the code that my buckets are listed as options, but I’m unable to select one.

Seems like an error with the BackWPup extension. If anyone has any ideas, I’d appreciate the help.

Hey @ten9its, can you please post the community system report from your dashboard in a GitHub gist or pastebin for review?

Be sure to use this button it hides your private information
image

Here is the report.


### Server Info                    Required                                               Detected                                     Status   ###

MainWP Dashboard                   
MainWP Dashboard Version           4.0.7.2                                                4.0.7.2                                      Pass        
MainWP Upload Directory            Writable                                               Writable                                     Pass        
MainWP Extensions                  
Advanced Uptime Monitor Extension  5.0.1                                                  Active                                       Pass        
MainWP BackWPup Extension          4.0                                                    Active                                       Pass        
MainWP Branding Extension          4.0                                                    Active                                       Pass        
MainWP Client Reports Extension    4.0.3                                                  Active                                       Pass        
MainWP Google Analytics Extension  4.0.1                                                  Active                                       Pass        
MainWP iThemes Security Extension  4.0.1                                                  Active                                       Pass        
MainWP Maintenance Extension       4.0                                                    Active                                       Pass        
MainWP Page Speed Extension        4.0.1                                                  Active                                       Pass        
MainWP Staging Extension           4.0                                                    Active                                       Pass        
MainWP Sucuri Extension            4.0                                                    Active                                       Pass        
MainWP Vulnerability Checker Extension4.0.1                                                  Active                                       Pass        
MainWP Wordfence Extension         4.0                                                    Active                                       Pass        
Toolbar Extras for MainWP          1.1.0                                                  Inactive                                     Warning     
MainWP WordPress SEO Extension     4.0                                                    Active                                       Pass        
WordPress                          
WordPress Version                  >=3.6                                                  5.3.2                                        Pass        
WordPress Memory Limit             >=64M                                                  256M                                         Pass        
MultiSite Disabled                 =true                                                  true                                         Pass        
FileSystem Method                  = direct                                               direct                                       Pass        
PHP                                
PHP Version                        >=5.6                                                  7.2.27                                       Pass        
PHP Safe Mode Disabled             =true                                                  true                                         Pass        
PHP Max Execution Time             >=30 seconds                                           30                                           Pass        
PHP Max Input Time                 >=30 seconds                                           60                                           Pass        
PHP Memory Limit                   >=128M                                                 256M                                         Pass        
PCRE Backtracking Limit            >=10000                                                1000000                                      Pass        
PHP Upload Max Filesize            >=2M                                                   64M                                          Pass        
PHP Post Max Size                  >=2M                                                   32M                                          Pass        
SSL Extension Enabled              =true                                                  true                                         Pass        
SSL Warnings                       = empty                                                                                             Pass        
cURL Extension Enabled             =true                                                  true                                         Pass        
cURL Timeout                       >=300 seconds                                          600                                          Pass        
cURL Version                       >=7.18.1                                               7.67.0                                       Pass        
cURL SSL Version                   >=OpenSSL/0.9.8l                                       OpenSSL/1.1.1d                               Pass        
PHP Allow URL fopen                YES                                                    
PHP Exif Support                   YES ( V7.2.)                                           
PHP IPTC Support                   YES                                                    
PHP XML Support                    YES                                                    
PHP Disabled Functions             exec, passthru, shell_exec, system,                    
PHP Loaded Extensions              Core, PDO, Phar, Reflection, SPL, SimpleXML, bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, pdo_mysql, pdo_sqlite, posix, pspell, redis, session, soap, sockets, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib
MySQL                              
MySQL Version                      >=5.0                                                  5.7.29                                       Pass        
MySQL Mode                         NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
MySQL Client Encoding              utf8                                                   
Server Info                        
Server Software                    Apache                                                 
Operating System                   Linux                                                  
Architecture                       64 bit                                                 
Server Protocol                    HTTP/2.0                                               
HTTPS                              ON - on                                                
Server self connect                Not expected HTTP response body:                       
User Agent                         Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Gateway Interface                  CGI/1.1                                                
Memory Usage                       54.78 MB                                               
Request Time                       1581021597                                             
Accept Content                     text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Charset Content             N/A                                                    
MainWP Settings                    
Number Of Child Sites              20                                                     
Use WP-Cron                        Yes                                                    
Optimize for Shared Hosting or Big NetworksNo                                                     
Automatic Daily Update             Install trusted updates                                
Abandoned Plugins/Themes Tolerance 365                                                    
Maximum number of posts to return                                                         
Maximum number of pages to return                                                         
Primary Backup System              MainWP BackWPup Extension                              
Maximum simultaneous requests      10                                                     
Minimum delay between requests     200                                                    
Maximum simultaneous requests per ip1                                                      
Minimum delay between requests to the same ip1000                                                   
Maximum simultaneous sync requests 8                                                      
Minimum simultaneous install/update requests6                                                      
Active Plugins                     
Activity Log for MainWP            1.4.1                                                  Inactive                                     
BackWPup                           3.7.0                                                  Active                                       
Custom Login Page Customizer       2.0.1                                                  Active                                       
iThemes Security Pro               6.3.3                                                  Active                                       
MainWP BackWPup Extension OLD      4.0                                                    Inactive                                     
MainWP Child                       4.0.6.2                                                Active                                       
MainWP Dashboard                   4.0.7.2                                                Active                                       
MainWP Key Maker                   1.1                                                    Active                                       
My Private Site                    2.14.2                                                 Active                                       
Toolbar Extras                     1.4.9                                                  Active                                       
Toolbar Extras for MainWP          1.1.0                                                  Active                                       
Wordfence Security                 7.4.5                                                  Inactive                                     
Yoast SEO                          13.0                                                   Active                                       

I am having the same issue. I took a quick look at it and at least for me the issue appears to be a problem with the binding of the buckets to the Angular dropdown. The buckets are getting populated in the SELECT element, but not getting rendered in the Angular dropdown. As a quick fix I removed the bucket data binding and just hard-coded the bucket I wanted to use into the SELECT element. This is obviously a quick fix until this can be addressed in the plugin.

SAMPLE CODE MODIFICATION:
File: MainWPBackupDestinationS3.job.php
Line: 90

<!--
<select class="ui dropdown ng-binding" ng-if="scope_s3_buckets" name="s3bucket" id="s3bucket"
        ng-init="scope_s3_bucket='<?php echo esc_attr( MainWPBackWPUpView::get_value( $default, 's3bucket', '' ) ); ?>'">
  <option ng-selected="scope_s3_bucket==bucket" value="{{ bucket }}"
          ng-repeat="bucket in scope_s3_buckets">{{ bucket }}
  </option>
</select>
-->
<select name="s3bucket" id="s3bucket" class="ui dropdown">
  <option value="my-s3-bucket-name" SELECTED>my-s3-bucket-name</option>							
</select>

EDIT: I forgot I had removed the data binding class ng-binding from the original code block during my testing - I re-added it into my code sample.

Thank yo all for the update.

I notified the dev team about this problem. As soon as I get an update, I will let you know.

I have more info on this one. After I got the bucket configured I started to get the same error @ten9its was getting about the version not being set. When getting this error the S3 client construction fails so no buckets are returned. I looked into it and my guess is that the AWS SDK in the extension was updated from version 2 to 3. This means a couple changes need to be made to the S3 client configuration. I made the following modification and it is now working for me. Hope this helps.

FILE: MainWPBackWPupExtension.class.php
LINE: 557

/*
$s3 = Aws\S3\S3Client::factory( array(
  'key'      => $s3accesskey,
  'secret'   => $s3secretkey,
  'region'   => $s3region,
  'base_url' => mainwp_backwpup_get_s3_base_url( $s3region, $s3base_url ),
  'scheme'   => 'https'
) );
*/
$s3 = Aws\S3\S3Client::factory( array(
  'region'   => $s3region,
  'base_url' => mainwp_backwpup_get_s3_base_url( $s3region, $s3base_url ),
  'scheme'   => 'https',
  'version'  => '2006-03-01',
  'credentials' => array(
    'key'  => $s3accesskey,
    'secret'  => $s3secretkey
  )
) );
1 Like

@kensatx thank you, the combination of both band-aids did the trick for the time being. I had already tried adding the version to MainWPBackWPupExtension.class.php but didn’t change it to use the ‘credentials’ parameter.

Hi all, I just want to say thanks for helping out. I have sent the details to the dev team.

@kensatx Thank you very much for the workaround – much appreciated!

@bogdan Is there an ETA for a fix?

Hi @EricJacksch, we are still working on this. I don’t have precise ETA, but we will give our best to get this updated this week or early next.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.