• Resolved jstraete

    (@jstraete)


    In my Woocommerce Logs, I fatal errors with the following:

    2023-07-20T12:35:28+00:00 CRITICAL Uncaught Error: Cannot use object of type Google\Site_Kit_Dependencies\GuzzleHttp\Psr7\Request as array in /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Authentication/Clients/OAuth_Client.php:535
    Stack trace:
    #0 /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Authentication/Authentication.php(423): Google\Site_Kit\Core\Authentication\Clients\OAuth_Client->refresh_profile_data(1800)
    #1 /var/www/html/wp-includes/class-wp-hook.php(308): Google\Site_Kit\Core\Authentication\Authentication->Google\Site_Kit\Core\Authentication\{closure}(Array)
    #2 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #3 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Authentication/Clients/Google_Site_Kit_Client.php(202): do_action('googlesitekit_r...', Array)
    #5 /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Authentication/Clients/Google_Site_Kit_Client.php(109): Google\Site_Kit\Core\Authentication\Clients\Google_Site_Kit_Client->fetchAccessTokenWithRefreshToken('QWCV6aPt89Ky//e...')
    #6 /var/www/html/wp-content/plugins/google-site-kit/third-party/google/apiclient/src/Client.php(732): Google\Site_Kit\Core\Authentication\Clients\Google_Site_Kit_Client->authorize()
    #7 /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Authentication/Clients/Google_Site_Kit_Client.php(220): Google\Site_Kit_Dependencies\Google\Client->execute(Object(Google\Site_Kit_Dependencies\GuzzleHttp\Psr7\Request), NULL)
    #8 /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Modules/Module.php(370): Google\Site_Kit\Core\Authentication\Clients\Google_Site_Kit_Client->execute(Object(Google\Site_Kit_Dependencies\GuzzleHttp\Psr7\Request))
    #9 /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Modules/Module.php(214): Google\Site_Kit\Core\Modules\Module->execute_data_request(Object(Google\Site_Kit\Core\REST_API\Data_Request))
    #10 /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Modules/REST_Modules_Controller.php(538): Google\Site_Kit\Core\Modules\Module->get_data('report', Array)
    #11 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1181): Google\Site_Kit\Core\Modules\REST_Modules_Controller->Google\Site_Kit\Core\Modules\{closure}(Object(WP_REST_Request))
    #12 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/google-site-ki...', Array, NULL)
    #13 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #14 /var/www/html/wp-includes/rest-api.php(410): WP_REST_Server->serve_request('/google-site-ki...')
    #15 /var/www/html/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))
    #16 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(Object(WP), Array)
    #17 /var/www/html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #18 /var/www/html/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)
    #19 /var/www/html/wp-includes/class-wp.php(780): WP->parse_request('')
    #20 /var/www/html/wp-includes/functions.php(1334): WP->main('')
    #21 /var/www/html/wp-blog-header.php(16): wp()
    #22 /var/www/html/index.php(17): require('/var/www/html/w...')
    #23 {main}
      thrown in /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Authentication/Clients/OAuth_Client.php on line 535

    Here is some of my environment setup:

    • WordPress version: 6.2.2
    • Woocommerce version: 7.9.0
    • PHP version: 8.1.13
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Adam Dunnage

    (@adamdunnage)

    Hi?@jstraete Thanks for getting in touch and sharing the error logs. To investigate this further for you, please could you share the following:

    1. Your Site Health information. You can use this form to share privately if preferred. Please also include your hosting provider here.
    2. Do you see any warnings or errors when checking your Site Health status (Tools > Site Health > Status), which differs from your Site Health information? Such errors may include REST endpoint references.

    Does temporarily downgrading your PHP version to 7.4 clear these errors? Is Site Kit still fully functional for you or is this affecting any of the plugin usability?

    Let me know if you have any questions in the meantime.

    Thread Starter jstraete

    (@jstraete)

    Hey Adam,

    I submitted my Site Health information to the form provided.

    The only warnings / errors that show on my site health are:

    • You should remove inactive plugins
    • Have a default theme available
    • You should use a persistent object cache

    The Site Kit plugin appears to function fine on the site as far as I can tell. I would really not prefer to make any changes to my current PHP version as my site has many plugins as you will see and I prefer not to break anything by doing that (and so staying downgraded to a lower version of PHP wouldn’t be a solution for me here if that did fix it anyhow).

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @jstraete Thanks for sharing the information. Could I please ask you to try following the troubleshooting steps here to see if you encounter the same error when in troubleshooting mode with just Site Kit active?

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @jstraete Just updating you here to let you know that this will be fixed in the new version of Site Kit 1.106.0 which will be released later today. Please ensure the plugin is up to date and please do let us know if you continue to see the issue after updating, thanks!

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @jstraete Site Kit 1.106.0 is now available. Please can you update to the latest version and confirm that you no longer see the error message?

    Thread Starter jstraete

    (@jstraete)

    Sorry for the delay here. Yes, I upgraded to 1.106.0 it looks like about a week ago and have not gotten any fatal errors on my site since then. Thanks!

    Plugin Support Adam Dunnage

    (@adamdunnage)

    You are very welcome, glad to hear that!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Critical Error’ is closed to new replies.