Site Kit by Google - Analytics, Search Console, AdSense, Speed

Error with Site Kit by Google – Analytics, Search Console, AdSense, Speed

You may have this kind of error with Site Kit by Google – Analytics, Search Console, AdSense, Speed :

Warning: require(/wp-content/plugins/google-site-kit/third-party/guzzlehttp/psr7/src/functions.php): failed to open stream: No such file or directory in /wp-content/plugins/google-site-kit/third-party/guzzlehttp/psr7/src/functions_include.php on line 7

Warning: require(/wp-content/plugins/google-site-kit/third-party/guzzlehttp/psr7/src/functions.php): failed to open stream: No such file or directory in /wp-content/plugins/google-site-kit/third-party/guzzlehttp/psr7/src/functions_include.php on line 7

Fatal error: require(): Failed opening required ‘/wp-content/plugins/google-site-kit/third-party/guzzlehttp/psr7/src/functions.php’ (include_path=’.:/share/pear’) in /wp-content/plugins/google-site-kit/third-party/guzzlehttp/psr7/src/functions_include.php on line 7

Or :

Can't find variable: IntersectionObserver

    in header
    in DashboardPageSpeed
    in div
    in div
    in Widget
    in WithWidgetSlug(Widget)
    in DashboardPageSpeedWidget
    in WhenPagespeedInsightsActive(DashboardPageSpeedWidget)
    in WidgetRenderer
    in div
    in Cell
    in WidgetCellWrapper
    in div
    in Row
    in div
    in div
    in Grid
    in WidgetAreaRenderer
    in div
    in WidgetContextRenderer
    in DashboardApp
    in GoogleSitekitDashboard
    in RestoreSnapshots
    in ErrorHandler

Or :

Warning: include(/wp-content/plugins/site-kit-wp-1.2.0/includes/vendor/composer/autoload_classmap.php): failed to open stream: No such file or directory in /wp-content/plugins/site-kit-wp-1.2.0/includes/loader.php on line 26

Warning: include(): Failed opening ‘/wp-content/plugins/site-kit-wp-1.2.0/includes/vendor/composer/autoload_classmap.php’ for inclusion (include_path=’.:/share/pear’) in /wp-content/plugins/site-kit-wp-1.2.0/includes/loader.php on line 26

Warning: include(/wp-content/plugins/site-kit-wp-1.2.0/third-party/vendor/composer/autoload_classmap.php): failed to open stream: No such file or directory in /wp-content/plugins/site-kit-wp-1.2.0/includes/loader.php on line 28

Warning: include(): Failed opening ‘/wp-content/plugins/site-kit-wp-1.2.0/third-party/vendor/composer/autoload_classmap.php’ for inclusion (include_path=’.:/share/pear’) in /wp-content/plugins/site-kit-wp-1.2.0/includes/loader.php on line 28

Warning: array_merge(): Expected parameter 1 to be an array, bool given in /wp-content/plugins/site-kit-wp-1.2.0/includes/loader.php on line 28

Warning: require(/wp-content/plugins/site-kit-wp-1.2.0/third-party/vendor/autoload_files.php): failed to open stream: No such file or directory in /wp-content/plugins/site-kit-wp-1.2.0/includes/loader.php on line 53

Fatal error: require(): Failed opening required ‘/wp-content/plugins/site-kit-wp-1.2.0/third-party/vendor/autoload_files.php’ (include_path=’.:/share/pear’) in /wp-content/plugins/site-kit-wp-1.2.0/includes/loader.php on line 53

Or :

This plugin failed to load properly and is paused during recovery mode.

An error of type E_ERROR was caused in line 109 of the file /wp-content/plugins/google-site-kit/google-site-kit.php. Error message: Uncaught Error: Failed opening required ‘/wp-content/plugins/google-site-kit/includes/loader.php’ (include_path=’.:’) in /wp-content/plugins/google-site-kit/google-site-kit.php:109 Stack trace: 
#0 /wp-settings.php(418): include_once() 
#1 /wp-config.php(83): require_once(‘/home/...’) 
#2 /wp-load.php(50): require_once(‘/home/...’) 
#3 /wp-login.php(12): require(‘/home/...’) 
#4 {main} thrown

Or :

Fatal error: Can’t use function return value in write context in /wp-content/plugins/google-site-kit/google-site-kit.php on line 97

Or :

Fatal error: Uncaught Error: Call to undefined function opcache_reset() in /wp-content/plugins/google-site-kit/google-site-kit.php:102 Stack trace: #0 /wp-includes/class-wp-hook.php(290): googlesitekit_opcache_reset(Object(Plugin_Upgrader)) #1 /wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) #2 /wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /wp-admin/includes/class-wp-upgrader.php(836): do_action(‘upgrader_proces…’, Object(Plugin_Upgrader), Array) #4 /wp-admin/includes/class-plugin-upgrader.php(108): WP_Upgrader->run(Array) #5 /wp-admin/update.php(138): Plugin_Upgrader->install(‘https://downloa…’) #6 {main} thrown in /wp-content/plugins/google-site-kit/google-site-kit.php on line 102
There has been a critical error on your website. Please check your site admin email inbox for instructions.

Or :

Warning: include(/wp-content/plugins/google-site-kit/third-party/vendor/composer/autoload_classmap.php): failed to open stream: No such file or directory in /wp-content/plugins/google-site-kit/includes/loader.php on line 29

Warning: include(): Failed opening '/wp-content/plugins/google-site-kit/third-party/vendor/composer/autoload_classmap.php' for inclusion (include_path='.:/share/pear') in /wp-content/plugins/google-site-kit/includes/loader.php on line 29

Warning: array_merge(): Argument #2 is not an array in /wp-content/plugins/google-site-kit/includes/loader.php on line 29

Warning: require(/wp-content/plugins/google-site-kit/third-party/vendor/autoload_files.php): failed to open stream: No such file or directory in /wp-content/plugins/google-site-kit/includes/loader.php on line 53

Fatal error: require(): Failed opening required '/wp-content/plugins/google-site-kit/third-party/vendor/autoload_files.php' (include_path='.:/share/pear') in /wp-content/plugins/google-site-kit/includes/loader.php on line 53

Or :

An error of type E_ERROR was caused in line 145 of the file /wp-content/plugins/google-site-kit/includes/Core/Authentication/Google_Proxy.php. Error message: Uncaught Exception: Missing site_id or site_code parameter for setup URL. in /wp-content/plugins/google-site-kit/includes/Core/Authentication/Google_Proxy.php:145

Or :

PHP Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64

PHP Deprecated: Return type of Google\\Site_Kit_Dependencies\\Google\\Collection::valid() should either be compatible with Iterator::valid(): bool, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /wp-content/plugins/google-site-kit/third-party/google/apiclient/src/Collection.php on line 36

PHP Deprecated: Return type of Google\\Site_Kit_Dependencies\\Google\\Model::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /wp-content/plugins/google-site-kit/third-party/google/apiclient/src/Model.php on line 240

PHP Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64

Or :

An error of type E_ERROR was caused in line 125 of the file /wp-content/plugins/wp-jobsearch/modules/social-login/google/google-sdk/Auth/OAuth2.php. Error message: Uncaught Google_Auth_Exception: Error fetching OAuth2 access token, message: ‘invalid_request: Could not determine client ID from request.’ in /wp-content/plugins/wp-jobsearch/modules/social-login/google/google-sdk/Auth/OAuth2.php:125
Stack trace:
#0 /wp-content/plugins/wp-jobsearch/modules/social-login/google/google-sdk/Client.php(128): Google_Auth_OAuth2->authenticate(‘sitekit-afePeke…’, false)
#1 /wp-content/plugins/wp-jobsearch/modules/social-login/google/google.php(89): Google_Client->authenticate(‘sitekit-afePeke…’)
#2 /wp-content/plugins/wp-jobsearch/modules/social-login/google/google.php(50): JobsearchGoogle->set_access_tokes()
#3 /wp-content/plugins/wp-jobsearch/modules/social-login/google/google.php(544): JobsearchGoogle->__construct()

Or :

Warning: require_once(/wp-content/plugins/google-site-kit/includes/loader.php): failed to open stream: No such file or directory in /wp-content/plugins/google-site-kit/google-site-kit.php on line 109

Fatal error: require_once(): Failed opening required '/wp-content/plugins/google-site-kit/includes/loader.php' (include_path='.:/opt/php7-4/lib/php:/wp-content/plugins/wp-appbox/inc/phpQuery/:/wp-content/plugins/wp-appbox/inc/phpQuery/plugins/') in /wp-content/plugins/google-site-kit/google-site-kit.php on line 109

Or :

resource' is a soft reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)

/wp-content/plugins/google-site-kit/third-party/google/apiclient-services/src/GoogleAnalyticsAdmin/Resource/PropertiesWebDataStreams.php

Or :

Oops! There was a problem during set up. Please try again.
Unable to receive access token because of an invalid authorization code or refresh token.

Or :

Additional Permissions Required: Site Kit can’t access the relevant data from Analytics because you haven’t granted all permissions requested during setup.

There are multiple solutions to try to make it work.

Updates

The first thing to do if you are stuck with Site Kit by Google – Analytics, Search Console, AdSense, Speed is to ensure that all your WordPress is up to date. You should check your :

  • WordPress
  • Plugins
  • Theme

Once all these updates are done, check back if these errors appear.

Check Site Kit by Google – Analytics, Search Console, AdSense, Speed

Sometimes, you just need to disable the plugin, and enable it just after to make it work again.

If it doesn’t work, your Site Kit by Google – Analytics, Search Console, AdSense, Speed plugin may be corrupted. To ensure that it’s not your case, you have to re-download the plugin (or the theme delivered with the plugin) and try to install it again.

Check others plugins

Are you sure that the error is related to Site Kit by Google – Analytics, Search Console, AdSense, Speed? Maybe not.

It could be related to another plugin that is not compatible. It could happen when you use a cache plugin, a security plugin, or simply a poorly developed plugin.

Disable all plugins. Then, check for your error, if the error is still there, the problem is not related to plugins compatibility. If there are no more errors, then enable every plugin one by one and check for the error. The goal is to target the plugin involved.

Try another theme

The error can be a problem with your theme.

If it’s not already done, then you should install & activate the default WordPress theme like Twenty Twenty-Two. Check for the error, and see what is happening to be sure that your WordPress theme is not the cause.

Permalinks & htaccess

If it doesn’t work, you may have a problem with your WordPress permalinks and/or your htaccess file. You should go on your WordPress dashboard, and re-saving permalinks from the permalinks page.

Contact the developer

If all these solutions don’t work, we advise you to contact the plugin developer.

You may have found a new bug, or a specific issue. You should get in touch with the developer either on the WordPress plugin forum, either by mail, either on their specific website with their own support.

Alternative solutions

If the developer doesn’t reply, or your problem is very urgent, then you should try an alternative to the plugin.

There are thousands of plugins on the official directory, and many others outside. You should try to find and test them!

If the issue is very specific, and the plugin could not be replaced, we advise you to contact an expert.
This is the best way to ensure you're not going to break your site anymore.