grrr-amsterdam / simply-static-deploy

WordPress plugin to deploy static sites easily to an AWS S3 bucket.
MIT License
68 stars 11 forks source link

An error occurred: Call to undefined method GuzzleHttp\Utils::chooseHandler() #42

Open satheler opened 3 years ago

satheler commented 3 years ago

Error on StaticDeployJob.

debug.txt (end of file)

[2021-08-17 21:01:24] [StaticDeployJob.php:232] We've found our next task: sync
[2021-08-17 21:01:24] [StaticDeployJob.php:190] Current task: sync
[2021-08-17 21:01:24] [StaticDeployJob.php:208] Performing task: sync
[2021-08-17 21:01:24] [SyncTask.php:18] Sync site to s3
[2021-08-17 21:01:24] [class-ss-task.php:44] Status message: [sync] Syncing files to S3
[2021-08-17 21:01:24] [StaticDeployJob.php:211] Caught an error
[2021-08-17 21:01:24] [StaticDeployJob.php:359] An error occurred: Call to undefined method GuzzleHttp\Utils::chooseHandler()
[2021-08-17 21:01:24] [StaticDeployJob.php:360] object(Error)#15794 (7) {  ["message":protected]=>  string(58) "Call to undefined method GuzzleHttp\Utils::chooseHandler()"  ["string":"Error":private]=>  string(0) ""  ["code":protected]=>  int(0)  ["file":protected]=>  string(65) "/opt/bitnami/wordpress/vendor/guzzlehttp/guzzle/src/functions.php"  ["line":protected]=>  int(61)  ["trace":"Error":private]=>  array(15) {    [0]=>    array(3) {      ["file"]=>      string(92) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/HandlerStack.php"      ["line"]=>      int(42)      ["function"]=>      string(25) "GuzzleHttp\choose_handler"    }    [1]=>    array(5) {      ["file"]=>      string(86) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/Client.php"      ["line"]=>      int(65)      ["function"]=>      string(6) "create"      ["class"]=>      string(23) "GuzzleHttp\HandlerStack"      ["type"]=>      string(2) "::"    }    [2]=>    array(5) {      ["file"]=>      string(108) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Handler/GuzzleV6/GuzzleHandler.php"      ["line"]=>      int(26)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(17) "GuzzleHttp\Client"      ["type"]=>      string(2) "->"    }    [3]=>    array(5) {      ["file"]=>      string(63) "/opt/bitnami/wordpress/vendor/aws/aws-sdk-php/src/functions.php"      ["line"]=>      int(279)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(34) "Aws\Handler\GuzzleV6\GuzzleHandler"      ["type"]=>      string(2) "->"    }    [4]=>    array(3) {      ["file"]=>      string(81) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Sdk.php"      ["line"]=>      int(373)      ["function"]=>      string(24) "Aws\default_http_handler"    }    [5]=>    array(5) {      ["file"]=>      string(90) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Aws/ClientProvider.php"      ["line"]=>      int(25)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(7) "Aws\Sdk"      ["type"]=>      string(2) "->"    }    [6]=>    array(5) {      ["file"]=>      string(78) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Syncer.php"      ["line"]=>      int(38)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(42) "Grrr\SimplyStaticDeploy\Aws\ClientProvider"      ["type"]=>      string(2) "->"    }    [7]=>    array(5) {      ["file"]=>      string(86) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Tasks/SyncTask.php"      ["line"]=>      int(25)      ["function"]=>      string(4) "sync"      ["class"]=>      string(30) "Grrr\SimplyStaticDeploy\Syncer"      ["type"]=>      string(2) "->"    }    [8]=>    array(5) {      ["file"]=>      string(87) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/StaticDeployJob.php"      ["line"]=>      int(209)      ["function"]=>      string(7) "perform"      ["class"]=>      string(38) "Grrr\SimplyStaticDeploy\Tasks\SyncTask"      ["type"]=>      string(2) "->"    }    [9]=>    array(5) {      ["file"]=>      string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"      ["line"]=>      int(301)      ["function"]=>      string(4) "task"      ["class"]=>      string(39) "Grrr\SimplyStaticDeploy\StaticDeployJob"      ["type"]=>      string(2) "->"    }    [10]=>    array(5) {      ["file"]=>      string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"      ["line"]=>      int(175)      ["function"]=>      string(6) "handle"      ["class"]=>      string(21) "WP_Background_Process"      ["type"]=>      string(2) "->"    }    [11]=>    array(5) {      ["file"]=>      string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"      ["line"]=>      int(303)      ["function"]=>      string(12) "maybe_handle"      ["class"]=>      string(21) "WP_Background_Process"      ["type"]=>      string(2) "->"    }    [12]=>    array(5) {      ["file"]=>      string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"      ["line"]=>      int(327)      ["function"]=>      string(13) "apply_filters"      ["class"]=>      string(7) "WP_Hook"      ["type"]=>      string(2) "->"    }    [13]=>    array(5) {      ["file"]=>      string(45) "/opt/bitnami/wordpress/wp-includes/plugin.php"      ["line"]=>      int(470)      ["function"]=>      string(9) "do_action"      ["class"]=>      string(7) "WP_Hook"      ["type"]=>      string(2) "->"    }    [14]=>    array(3) {      ["file"]=>      string(46) "/opt/bitnami/wordpress/wp-admin/admin-ajax.php"      ["line"]=>      int(187)      ["function"]=>      string(9) "do_action"    }  }  ["previous":"Error":private]=>  NULL}
[2021-08-17 21:01:24] [StaticDeployJob.php:315] Status message: [error] An error occurred: Call to undefined method GuzzleHttp\Utils::chooseHandler()
[2021-08-17 21:01:24] [StaticDeployJob.php:190] Current task: cancel
[2021-08-17 21:01:24] [StaticDeployJob.php:208] Performing task: cancel
[2021-08-17 21:01:24] [class-ss-task.php:44] Status message: [cancel] Cancelling job
[2021-08-17 21:01:24] [class-ss-wrapup-task.php:22] Deleting temporary files
[2021-08-17 21:01:24] [class-ss-task.php:44] Status message: [wrapup] Wrapping up
[2021-08-17 21:01:24] [StaticDeployJob.php:227] This task is done and there are no more tasks, time to complete the job
[2021-08-17 21:01:24] [StaticDeployJob.php:259] Completing the job
[2021-08-17 21:01:24] [StaticDeployJob.php:315] Status message: [done] Done! Finished in 00:02:31
{
  ["message":protected] =>  string(58) "Call to undefined method GuzzleHttp\Utils::chooseHandler()" 
  ["string":"Error":private] =>  string(0) "" 
  ["code":protected] =>  int(0)
  ["file":protected] =>  string(65) "/opt/bitnami/wordpress/vendor/guzzlehttp/guzzle/src/functions.php"
  ["line":protected] =>  int(61)
  ["trace":"Error":private] =>  array(15) {
    [0] => array(3) {
        ["file"] => string(92) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/HandlerStack.php"
        ["line"] => int(42) 
        ["function"] => string(25) "GuzzleHttp\choose_handler"
    }
    [1] => array(5) { 
      ["file"] => string(86) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/Client.php"
      ["line"] => int(65) 
      ["function"] => string(6) "create" 
      ["class"] => string(23) "GuzzleHttp\HandlerStack" 
      ["type"] => string(2) "::"
    } 
    [2] => array(5) { 
      ["file"] => string(108) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Handler/GuzzleV6/GuzzleHandler.php"
      ["line"] => int(26)
      ["function"] => string(11) "__construct" 
      ["class"] => string(17) "GuzzleHttp\Client"
      ["type"]=> string(2) "->"
    }
    [3] => array(5) {
      ["file"] => string(63) "/opt/bitnami/wordpress/vendor/aws/aws-sdk-php/src/functions.php"
      ["line"] => int(279)
      ["function"] => string(11) "__construct"
      ["class"] => string(34) "Aws\Handler\GuzzleV6\GuzzleHandler"
      ["type"] => string(2) "->"
    }
    [4]=>    array(3) {
      ["file"] => string(81) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Sdk.php"
      ["line"] => int(373)
      ["function"] => string(24) "Aws\default_http_handler"    
    }
    [5]=>    array(5) {
      ["file"] => string(90) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Aws/ClientProvider.php"
      ["line"] => int(25)
      ["function"] => string(11) "__construct"
      ["class"] => string(7) "Aws\Sdk"
      ["type"] => string(2) "->"
    }
    [6] => array(5) {
      ["file"] => string(78) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Syncer.php"
      ["line"] => int(38)
      ["function"] => string(11) "__construct"
      ["class"] => string(42) "Grrr\SimplyStaticDeploy\Aws\ClientProvider"
      ["type"] => string(2) "->"
    }
    [7] => array(5) {
      ["file"] => string(86) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Tasks/SyncTask.php"
      ["line"] => int(25)
      ["function"] => string(4) "sync"
      ["class"] => string(30) "Grrr\SimplyStaticDeploy\Syncer"
      ["type"] => string(2) "->"
    }
    [8] => array(5) {
      ["file"] => string(87) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/StaticDeployJob.php"
      ["line"] => int(209)
      ["function"] => string(7) "perform"
      ["class"] => string(38) "Grrr\SimplyStaticDeploy\Tasks\SyncTask"
      ["type"] => string(2) "->"
    }
    [9] => array(5) {
      ["file"] => string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"
      ["line"] => int(301)
      ["function"] => string(4) "task"
      ["class"] => string(39) "Grrr\SimplyStaticDeploy\StaticDeployJob"
      ["type"] => string(2) "->"
    }
    [10] => array(5) {
      ["file"] => string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"
      ["line"] => int(175)
      ["function"] => string(6) "handle"
      ["class"] => string(21) "WP_Background_Process"
      ["type"] => string(2) "->"
    }
    [11] => array(5) {
      ["file"] => string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"
      ["line"] => int(303)
      ["function"] => string(12) "maybe_handle"
      ["class"] => string(21) "WP_Background_Process"
      ["type"] => string(2) "->"
    }
    [12] => array(5) {
      ["file"] => string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"
      ["line"] => int(327)
      ["function"] => string(13) "apply_filters"
      ["class"] => string(7) "WP_Hook"
      ["type"] => string(2) "->"
    }
    [13] => array(5) {
      ["file"] => string(45) "/opt/bitnami/wordpress/wp-includes/plugin.php"
      ["line"] => int(470)
      ["function"] => string(9) "do_action"
      ["class"] => string(7) "WP_Hook"
      ["type"] => string(2) "->"
    }
    [14] => array(3) {
      ["file"] => string(46) "/opt/bitnami/wordpress/wp-admin/admin-ajax.php"
      ["line"] => int(187)
      ["function"] => string(9) "do_action"
    }
  }
  ["previous":"Error":private] =>  NULL
}
leonstafford commented 3 years ago

@satheler - what other plugins do you have active? One of them may include a different version of Guzzle, which causes these kinds of unknown method errors. Can try deactivating all other plugins and running again. If it works, then re-enable one by one until you know which one is causing the conflict.

(Grrr devs - I use a custom namespaced Guzzle for WP2Static to avoid this, which you can see in https://github.com/leonstafford/wp2static/blob/develop/composer.json - there's a repo in my account which helps with creating the custom namespaced one, maybe of interest to you)