Support » Plugin: UpdraftPlus WordPress Backup Plugin » Google Client libraries conflict – PHP Fatal Error

  • Resolved catherinelfoley

    (@catherinelfoley)


    I am getting a new error on my backups related to remote storage.

    PHP Fatal error (TypeError) has occurred during backup uploads to the googledrive. Error Message: Argument 1 passed to Google_Client::__construct() must be of the type array, object given, called in /wp-content/plugins/updraftplus/methods/googledrive.php on line 697 (Code: 0, line 92 in /wp-content/plugins/woocommerce-bookings/includes/lib/google-api/google/apiclient/src/Google/Client.php)

    According to WooCommerce – There’s a conflict of Google Client libraries between updraft plus and WooCommerce Bookings. Updraft plus is using version 1.1.4 of the Google client library and WooCommerce Bookings uses the more recent version 2.2.2.

    How can this be resolved? Thank you.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • sampatraothopte

    (@sampatraothopte)

    Fatal error: Uncaught exception ‘InvalidArgumentException’ with message ‘Invalid token format’ in /home/thoptebiotech/public_html/wp-content/plugins/erp/vendor/google/apiclient/src/Google/Client.php:433 Stack trace: #0 /home/thoptebiotech/public_html/wp-content/plugins/erp/modules/crm/includes/class-google-auth.php(61): Google_Client->setAccessToken(Array) #1 /home/thoptebiotech/public_html/wp-content/plugins/erp/modules/crm/includes/class-google-auth.php(14): WeDevs\ERP\CRM\Google_Auth->init_client() #2 /home/thoptebiotech/public_html/wp-content/plugins/erp/modules/crm/includes/class-google-auth.php(29): WeDevs\ERP\CRM\Google_Auth->__construct() #3 /home/thoptebiotech/public_html/wp-content/plugins/erp/wp-erp.php(260): WeDevs\ERP\CRM\Google_Auth::init() #4 /home/thoptebiotech/public_html/wp-content/plugins/erp/wp-erp.php(123): WeDevs_ERP->instantiate() #5 /home/thoptebiotech/public_html/wp-content/plugins/erp/wp-erp.php(92): WeDevs_ERP->setup() #6 /home/thoptebiotech/public_html/wp-content/plugins/erp/wp-erp.php(375): We in /home/thoptebiotech/public_html/wp-content/plugins/erp/vendor/google/apiclient/src/Google/Client.php on line 433

    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    UpdraftPlus only attempts to load its version of the Google library – the one it wants to use – immediately before contacting Google.

    If another plugin always loads its version of the Google library, this prevents UpdraftPlus being able to use its own copy, because another is already present. Presumably the other plugin just loads its copy on every page. The way to resolve this is to ask the other plugin author to only load their libraries at the point of using them, not on every WP load, so that they can’t conflict.

    David

    Plugin Author David Anderson

    (@davidanderson)

    When we’ve seen this before, sometimes the other plugin author asks “why can’t UpdraftPlus update to the latest Google library version?” The reason is that UpdraftPlus supports back to PHP 5.2, whereas the latest Google library version requires PHP 5.4 or later. Upgrading would mean that loads of website owners would find their backups no longer worked.

    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.