Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All widgets showing error state #6099

Closed
asvinb opened this issue Nov 2, 2022 · 9 comments
Closed

All widgets showing error state #6099

asvinb opened this issue Nov 2, 2022 · 9 comments

Comments

@asvinb
Copy link
Collaborator

asvinb commented Nov 2, 2022

Bug Description

Not sure if it's related to PHP 8.1 and maybe it'll be fixed by #5110 but all widgets on the dashboard display the following error message after activating the Query Monitor plugin:
The response is not a valid JSON response.

Steps to reproduce

  1. Create a new site on TasteWP
  2. Install and setup Google SiteKit, with Analytics module connected.
  3. The gathering data state is shown for all applicable widgets.
  4. Install and activate the Query Monitor plugin.
  5. Clear local storage and refresh Google Site Kit main dashboard.
  6. See errors.

Screenshots

image

Additional Context

Site Health Info posted as a comment.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

@asvinb
Copy link
Collaborator Author

asvinb commented Nov 2, 2022

Site Health info:

`
### wp-core ###

version: 6.1
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%year%/%monthnum%/%day%/%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: -1
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /s2-hulkinglimit/wordpress
wordpress_size: 49.48 MB (51878687 bytes)
uploads_path: /s2-hulkinglimit/wordpress/wp-content/uploads
uploads_size: 0.00 B (0 bytes)
themes_path: /s2-hulkinglimit/wordpress/wp-content/themes
themes_size: 7.93 MB (8316246 bytes)
plugins_path: /s2-hulkinglimit/wordpress/wp-content/plugins
plugins_size: 23.95 MB (25118493 bytes)
database_size: 896.00 KB (917504 bytes)
total_size: 82.24 MB (86230930 bytes)

### wp-dropins (1) ###

maintenance.php: true

### wp-active-theme ###

name: Twenty Twenty-Two (twentytwentytwo)
version: 1.3
author: the WordPress team
author_website: https://wordpress.org/
parent_theme: none
theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, block-templates, widgets-block-editor, wp-block-styles, editor-style
theme_path: /s2-hulkinglimit/wordpress/wp-content/themes/twentytwentytwo
auto_update: Disabled

### wp-themes-inactive (1) ###

Twenty Twenty: version: 2.1, author: the WordPress team, Auto-updates disabled

### wp-plugins-active (6) ###

Backup Migration: version: 1.2.2, author: Migrate, Auto-updates enabled
Copy & Delete Posts: version: 1.3.4, author: Copy Delete Posts, Auto-updates enabled
MyPopUps: version: 1.1.7, author: Pop-ups, Auto-updates enabled
Query Monitor: version: 3.10.1, author: John Blackbourn, Auto-updates disabled
Redirect Redirection: version: 1.1.1, author: Inisev, Auto-updates disabled
Site Kit by Google: version: 1.86.0, author: Google, Auto-updates disabled

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: File uploads is turned off
post_max_size: 60M
upload_max_filesize: 60M
max_effective_size: 60 MB
max_file_uploads: 20
imagick_limits: 
	imagick::RESOURCETYPE_AREA: 122 MB
	imagick::RESOURCETYPE_DISK: 1073741824
	imagick::RESOURCETYPE_FILE: 192492
	imagick::RESOURCETYPE_MAP: 512 MB
	imagick::RESOURCETYPE_MEMORY: 256 MB
	imagick::RESOURCETYPE_THREAD: 1
imagemagick_file_formats: Unable to determine
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: unknown

### wp-server ###

server_architecture: Linux 5.4.0-124-generic x86_64
httpd_software: TasteWP-S2 Official/3.0.0
php_version: 8.1.9 64bit
php_sapi: fpm-fcgi
max_input_variables: 5000
time_limit: 100
memory_limit: 256M
max_input_time: 30
upload_max_filesize: 60M
php_post_max_size: 60M
curl_version: 7.68.0 OpenSSL/1.1.1f
suhosin: false
imagick_availability: true
pretty_permalinks: false

### wp-database ###

extension: mysqli
server_version: 8.0.30-0ubuntu0.20.04.2
client_version: mysqlnd 8.1.9
max_allowed_packet: 268435456
max_connections: 1000

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /s2-hulkinglimit/wordpress/wp-content
WP_PLUGIN_DIR: /s2-hulkinglimit/wordpress/wp-content/plugins
WP_MEMORY_LIMIT: 96M
WP_MAX_MEMORY_LIMIT: 96M
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: /s2-hulkinglimit/wordpress/debug.log
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: true
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable

### google-site-kit ###

version: 1.86.0
php_version: 8.1.9
wp_version: 6.1
reference_url: https://hulkinglimit.s2-tastewp.com
amp_mode: no
site_status: connected-site
user_status: authenticated
verification_status: verified-file
connected_user_count: 1
active_modules: site-verification, search-console, analytics, analytics-4, pagespeed-insights
recoverable_modules: none
required_scopes: 
	openid: ✅
	https://www.googleapis.com/auth/userinfo.profile: ✅
	https://www.googleapis.com/auth/userinfo.email: ✅
	https://www.googleapis.com/auth/siteverification: ✅
	https://www.googleapis.com/auth/webmasters: ✅
	https://www.googleapis.com/auth/analytics.readonly: ✅
capabilities: 
	googlesitekit_authenticate: ✅
	googlesitekit_setup: ✅
	googlesitekit_view_posts_insights: ✅
	googlesitekit_view_dashboard: ✅
	googlesitekit_manage_options: ✅
	googlesitekit_view_splash: ✅
	googlesitekit_view_authenticated_dashboard: ✅
	googlesitekit_view_wp_dashboard_widget: ✅
	googlesitekit_view_admin_bar_menu: ✅
enabled_features: 
	adsenseSetupV2: ✅
	dashboardSharing: ⭕
	ga4ActivationBanner: ⭕
	ideaHubModule: ⭕
	twgModule: ⭕
	userInput: ⭕
search_console_property: https://hulkinglimit.s2-tastewp.com/
analytics_account_id: 2481•••••
analytics_property_id: UA-2481•••••••
analytics_profile_id: 2794•••••
analytics_use_snippet: yes
analytics_4_property_id: 3404411••
analytics_4_web_data_stream_id: 4253••••••
analytics_4_measurement_id: G-N8••••••••
analytics_4_use_snippet: yes

@aaemnnosttv
Copy link
Collaborator

@asvinb can you take a look and share what the response is that's causing the error, especially now that #5110 has been merged?

@asvinb
Copy link
Collaborator Author

asvinb commented Dec 19, 2022

@aaemnnosttv @bethanylang I just checked and everything looks ok. Maybe we can close the ticket unless @wpdarren want to take a quick look.

@asvinb asvinb assigned aaemnnosttv and mxbclang and unassigned asvinb Dec 19, 2022
@mohitwp
Copy link
Collaborator

mohitwp commented Dec 20, 2022

@asvinb @aaemnnosttv @wpdarren I'm able to reproduce this error when using PHP 8.1 and 8.2.

  • SK widgets showing JSON errors.
  • If query monitor is active, then user is not able to Set up Site kit and getting Rest API error on Splash screen.
  • Tested using instaWP and TasteWP.
  • Query Monitor version - 3.10.1

image

image

image

@asvinb
Copy link
Collaborator Author

asvinb commented Dec 20, 2022

@mohitwp I did not setup SK from scratch, but rather just refreshed the dashboard after switching to PHP 8.1. Let me check on my end, setting it up from scratch.

@asvinb
Copy link
Collaborator Author

asvinb commented Dec 20, 2022

@mohitwp @aaemnnosttv @bethanylang Update:

  • Did a reset of Site Kit
  • Switched to PHP 8.1
  • Ran composer install
  • Proceeded to setup Site Kit again.
  • Got an error message on the splash screen as per screenshot below.

image

PHP error log:

[20-Dec-2022 12:36:47 UTC] PHP Fatal error:  Uncaught Error: Class "Google\Site_Kit_Dependencies\GuzzleHttp\Client" not found in /Users/asvin/Local Sites/site-kit/app/public/wp-content/plugins/site-kit-wp/third-party/google/apiclient/src/Client.php:972
Stack trace:
#0 /Users/asvin/Local Sites/site-kit/app/public/wp-content/plugins/site-kit-wp/third-party/google/apiclient/src/Client.php(936): Google\Site_Kit_Dependencies\Google\Client->createDefaultHttpClient()
#1 /Users/asvin/Local Sites/site-kit/app/public/wp-content/plugins/site-kit-wp/includes/Core/Authentication/Clients/Client_Factory.php(66): Google\Site_Kit_Dependencies\Google\Client->getHttpClient()
#2 /Users/asvin/Local Sites/site-kit/app/public/wp-content/plugins/site-kit-wp/includes/Core/Authentication/Clients/OAuth_Client_Base.php(162): Google\Site_Kit\Core\Authentication\Clients\Client_Factory::create_client(Array)
#3 /Users/asvin/Local Sites/site-kit/app/public/wp-content/plugins/site-kit-wp/includes/Core/Util/Health_Checks.php(109): Google\Site_Kit\Core\Authentication\Clients\OAuth_Client_Base->get_client()
#4 /Users/asvin/Local Sites/site-kit/app/public/wp-content/plugins/site-kit-wp/includes/Core/Util/Health_Checks.php(86): Google\Site_Kit\Core\Util\Health_Checks->check_google_api()
#5 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/rest-api/class-wp-rest-server.php(1171): Google\Site_Kit\Core\Util\Health_Checks->Google\Site_Kit\Core\Util\{closure}(Object(WP_REST_Request))
#6 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/google-site-ki...', Array, NULL)
#7 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch(Object(WP_REST_Request))
#8 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/rest-api.php(410): WP_REST_Server->serve_request('/google-site-ki...')
#9 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))
#10 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#11 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#12 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)
#13 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/class-wp.php(780): WP->parse_request('')
#14 /Users/asvin/Local Sites/site-kit/app/public/wp-includes/functions.php(1332): WP->main('')
#15 /Users/asvin/Local Sites/site-kit/app/public/wp-blog-header.php(16): wp()
#16 /Users/asvin/Local Sites/site-kit/app/public/index.php(17): require('/Users/asvin/Lo...')
#17 {main}
  thrown in /Users/asvin/Local Sites/site-kit/app/public/wp-content/plugins/site-kit-wp/third-party/google/apiclient/src/Client.php on line 972

@aaemnnosttv
Copy link
Collaborator

@asvinb is this related to SK or Query Monitor? I noticed recently when testing PHP 8.1 that there were problems with Query Monitor active which caused all the REST requests to error. Does this only happen with Query Monitor active?

@wpdarren
Copy link
Collaborator

@aaemnnosttv yes, it does seem to only be when Query Monitor is enabled.

@kuasha420 and I have just come across this while testing on PHP 8.1.

When you disable Query Monitor, no errors occur.

image

@mxbclang mxbclang removed their assignment Feb 2, 2023
@aaemnnosttv
Copy link
Collaborator

This is no longer an issue as of #1146 which is in the upcoming release 1.98.0 👍

@aaemnnosttv aaemnnosttv closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2023
@aaemnnosttv aaemnnosttv removed their assignment Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants