Blank Page at wp-admin/admin.php?page=googlesitekit-dashboard
Bug Description
Can see the content of the page for a short time, but is then removed. Deleted local storage, cookies: Logged back in, same issue.
Steps to reproduce
-
Go to /wp-admin/admin.php?page=googlesitekit-dashboard
-
See error in Chrome Dev Console:
JQMIGRATE: Migrate is installed, version 1.4.1
admin.php?page=googlesitekit-dashboard:1 A cookie associated with a cross-site resource at https://mail-attachment.googleusercontent.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
react-dom.min.js?ver=16.8.4:117 TypeError: e.replace is not a function
at z (commons.js?ver=1.0.0:1)
at t.value (allmodules.js?ver=1.0.0:1)
at ce (react-dom.min.js?ver=16.8.4:98)
at qg (react-dom.min.js?ver=16.8.4:97)
at hi (react-dom.min.js?ver=16.8.4:104)
at Qg (react-dom.min.js?ver=16.8.4:144)
at Rg (react-dom.min.js?ver=16.8.4:145)
at Sc (react-dom.min.js?ver=16.8.4:158)
at Z (react-dom.min.js?ver=16.8.4:156)
at Kc (react-dom.min.js?ver=16.8.4:155)
Bg @ react-dom.min.js?ver=16.8.4:117
Ig.f.componentDidCatch.c.callback @ react-dom.min.js?ver=16.8.4:126
Ag @ react-dom.min.js?ver=16.8.4:116
zg @ react-dom.min.js?ver=16.8.4:116
qi @ react-dom.min.js?ver=16.8.4:130
ui @ react-dom.min.js?ver=16.8.4:133
(anonymous) @ react-dom.min.js?ver=16.8.4:158
unstable_runWithPriority @ react.min.js?ver=16.8.4:27
Vc @ react-dom.min.js?ver=16.8.4:158
Sc @ react-dom.min.js?ver=16.8.4:158
Z @ react-dom.min.js?ver=16.8.4:156
Kc @ react-dom.min.js?ver=16.8.4:155
ya @ react-dom.min.js?ver=16.8.4:153
enqueueSetState @ react-dom.min.js?ver=16.8.4:202
t.setState @ react.min.js?ver=16.8.4:20
n @ allmodules.js?ver=1.0.0:1
e.callback @ allmodules.js?ver=1.0.0:1
resolve @ commons.js?ver=1.0.0:1
(anonymous) @ commons.js?ver=1.0.0:1
setTimeout (async)
(anonymous) @ commons.js?ver=1.0.0:1
r @ lodash.min.js?ver=4.17.11:5
nu @ lodash.min.js?ver=4.17.11:67
combinedGet @ commons.js?ver=1.0.0:1
collectModuleData @ commons.js?ver=1.0.0:1
(anonymous) @ hooks.min.js?ver=2.2.0:1
(anonymous) @ googlesitekit-dashboard.js?ver=1.0.0:1
react-dom.min.js?ver=16.8.4:117 Invariant Violation: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=TypeError%3A%20e.replace%20is%20not%20a%20function&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at pb (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:12:454)
at n (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:13:221)
at Ac (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:70:369)
at https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:80:190
at N (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:90:3)
at hi (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:105:408)
at Qg (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:144:217)
at Rg (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:145:76)
at Sc (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:158:109)
at Z (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:156:492)
Bg @ react-dom.min.js?ver=16.8.4:117
c.callback @ react-dom.min.js?ver=16.8.4:126
Ag @ react-dom.min.js?ver=16.8.4:116
zg @ react-dom.min.js?ver=16.8.4:116
qi @ react-dom.min.js?ver=16.8.4:131
ui @ react-dom.min.js?ver=16.8.4:133
(anonymous) @ react-dom.min.js?ver=16.8.4:158
unstable_runWithPriority @ react.min.js?ver=16.8.4:27
Vc @ react-dom.min.js?ver=16.8.4:158
Sc @ react-dom.min.js?ver=16.8.4:158
Z @ react-dom.min.js?ver=16.8.4:156
Kc @ react-dom.min.js?ver=16.8.4:155
ya @ react-dom.min.js?ver=16.8.4:153
enqueueSetState @ react-dom.min.js?ver=16.8.4:202
t.setState @ react.min.js?ver=16.8.4:20
n @ allmodules.js?ver=1.0.0:1
e.callback @ allmodules.js?ver=1.0.0:1
resolve @ commons.js?ver=1.0.0:1
(anonymous) @ commons.js?ver=1.0.0:1
setTimeout (async)
(anonymous) @ commons.js?ver=1.0.0:1
r @ lodash.min.js?ver=4.17.11:5
nu @ lodash.min.js?ver=4.17.11:67
combinedGet @ commons.js?ver=1.0.0:1
collectModuleData @ commons.js?ver=1.0.0:1
(anonymous) @ hooks.min.js?ver=2.2.0:1
(anonymous) @ googlesitekit-dashboard.js?ver=1.0.0:1
react-dom.min.js?ver=16.8.4:12 Uncaught Invariant Violation: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=TypeError%3A%20e.replace%20is%20not%20a%20function&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at pb (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:12:454)
at n (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:13:221)
at Ac (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:70:369)
at https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:80:190
at N (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:90:3)
at hi (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:105:408)
at Qg (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:144:217)
at Rg (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:145:76)
at Sc (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:158:109)
at Z (https://www.techniker-forum.de/wordpress/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:156:492)
pb @ react-dom.min.js?ver=16.8.4:12
n @ react-dom.min.js?ver=16.8.4:13
Ac @ react-dom.min.js?ver=16.8.4:70
(anonymous) @ react-dom.min.js?ver=16.8.4:80
N @ react-dom.min.js?ver=16.8.4:90
hi @ react-dom.min.js?ver=16.8.4:105
Qg @ react-dom.min.js?ver=16.8.4:144
Rg @ react-dom.min.js?ver=16.8.4:145
Sc @ react-dom.min.js?ver=16.8.4:158
Z @ react-dom.min.js?ver=16.8.4:156
Kc @ react-dom.min.js?ver=16.8.4:155
ya @ react-dom.min.js?ver=16.8.4:153
enqueueSetState @ react-dom.min.js?ver=16.8.4:202
t.setState @ react.min.js?ver=16.8.4:20
n @ allmodules.js?ver=1.0.0:1
e.callback @ allmodules.js?ver=1.0.0:1
resolve @ commons.js?ver=1.0.0:1
(anonymous) @ commons.js?ver=1.0.0:1
setTimeout (async)
(anonymous) @ commons.js?ver=1.0.0:1
r @ lodash.min.js?ver=4.17.11:5
nu @ lodash.min.js?ver=4.17.11:67
combinedGet @ commons.js?ver=1.0.0:1
collectModuleData @ commons.js?ver=1.0.0:1
(anonymous) @ hooks.min.js?ver=2.2.0:1
(anonymous) @ googlesitekit-dashboard.js?ver=1.0.0:1
jsapi_compiled_default_module.js:151 Uncaught (in promise) Error: Container is not defined
at gvjs_dp (jsapi_compiled_default_module.js:151)
at gvjs_WL.gvjs_Tq [as constructor] (jsapi_compiled_default_module.js:239)
at gvjs_WL.gvjs_VL [as constructor] (jsapi_compiled_ui_module.js:1000)
at new gvjs_WL (jsapi_compiled_ui_module.js:1031)
at t.value (allmodules.js?ver=1.0.0:1)
at allmodules.js?ver=1.0.0:1
gvjs_dp @ jsapi_compiled_default_module.js:151
gvjs_Tq @ jsapi_compiled_default_module.js:239
gvjs_VL @ jsapi_compiled_ui_module.js:1000
gvjs_WL @ jsapi_compiled_ui_module.js:1031
value @ allmodules.js?ver=1.0.0:1
(anonymous) @ allmodules.js?ver=1.0.0:1
Promise.then (async)
google.v.w.J.jo @ loader.js:289
n.onload @ allmodules.js?ver=1.0.0:1
load (async)
t @ allmodules.js?ver=1.0.0:1
Yf @ react-dom.min.js?ver=16.8.4:67
qg @ react-dom.min.js?ver=16.8.4:92
hi @ react-dom.min.js?ver=16.8.4:104
Qg @ react-dom.min.js?ver=16.8.4:144
Rg @ react-dom.min.js?ver=16.8.4:145
Sc @ react-dom.min.js?ver=16.8.4:158
Z @ react-dom.min.js?ver=16.8.4:156
Kc @ react-dom.min.js?ver=16.8.4:155
ya @ react-dom.min.js?ver=16.8.4:153
enqueueSetState @ react-dom.min.js?ver=16.8.4:202
t.setState @ react.min.js?ver=16.8.4:20
n @ allmodules.js?ver=1.0.0:1
e.callback @ allmodules.js?ver=1.0.0:1
resolve @ commons.js?ver=1.0.0:1
(anonymous) @ commons.js?ver=1.0.0:1
setTimeout (async)
(anonymous) @ commons.js?ver=1.0.0:1
r @ lodash.min.js?ver=4.17.11:5
nu @ lodash.min.js?ver=4.17.11:67
combinedGet @ commons.js?ver=1.0.0:1
collectModuleData @ commons.js?ver=1.0.0:1
(anonymous) @ hooks.min.js?ver=2.2.0:1
(anonymous) @ googlesitekit-dashboard.js?ver=1.0.0:1
3jsapi_compiled_default_module.js:151 Uncaught (in promise) Error: Container is not defined
at gvjs_dp (jsapi_compiled_default_module.js:151)
at gvjs_WL.gvjs_Tq [as constructor] (jsapi_compiled_default_module.js:239)
at gvjs_WL.gvjs_VL [as constructor] (jsapi_compiled_ui_module.js:1000)
at new gvjs_WL (jsapi_compiled_ui_module.js:1031)
at t.value (allmodules.js?ver=1.0.0:1)
at allmodules.js?ver=1.0.0:1
gvjs_dp @ jsapi_compiled_default_module.js:151
gvjs_Tq @ jsapi_compiled_default_module.js:239
gvjs_VL @ jsapi_compiled_ui_module.js:1000
gvjs_WL @ jsapi_compiled_ui_module.js:1031
value @ allmodules.js?ver=1.0.0:1
(anonymous) @ allmodules.js?ver=1.0.0:1
Promise.then (async)
google.v.w.J.jo @ loader.js:289
(anonymous) @ allmodules.js?ver=1.0.0:1
(anonymous) @ hooks.min.js?ver=2.2.0:1
n.onload @ allmodules.js?ver=1.0.0:1
load (async)
t @ allmodules.js?ver=1.0.0:1
Yf @ react-dom.min.js?ver=16.8.4:67
qg @ react-dom.min.js?ver=16.8.4:92
hi @ react-dom.min.js?ver=16.8.4:104
Qg @ react-dom.min.js?ver=16.8.4:144
Rg @ react-dom.min.js?ver=16.8.4:145
Sc @ react-dom.min.js?ver=16.8.4:158
Z @ react-dom.min.js?ver=16.8.4:156
Kc @ react-dom.min.js?ver=16.8.4:155
ya @ react-dom.min.js?ver=16.8.4:153
enqueueSetState @ react-dom.min.js?ver=16.8.4:202
t.setState @ react.min.js?ver=16.8.4:20
n @ allmodules.js?ver=1.0.0:1
e.callback @ allmodules.js?ver=1.0.0:1
resolve @ commons.js?ver=1.0.0:1
(anonymous) @ commons.js?ver=1.0.0:1
setTimeout (async)
(anonymous) @ commons.js?ver=1.0.0:1
r @ lodash.min.js?ver=4.17.11:5
nu @ lodash.min.js?ver=4.17.11:67
combinedGet @ commons.js?ver=1.0.0:1
collectModuleData @ commons.js?ver=1.0.0:1
(anonymous) @ hooks.min.js?ver=2.2.0:1
(anonymous) @ googlesitekit-dashboard.js?ver=1.0.0:1
4jsapi_compiled_default_module.js:151 Uncaught (in promise) Error: Container is not defined
at gvjs_dp (jsapi_compiled_default_module.js:151)
at gvjs_7L.gvjs_Tq [as constructor] (jsapi_compiled_default_module.js:239)
at gvjs_7L.gvjs_VL [as constructor] (jsapi_compiled_ui_module.js:1000)
at new gvjs_7L (jsapi_compiled_ui_module.js:1032)
at t.value (allmodules.js?ver=1.0.0:1)
at allmodules.js?ver=1.0.0:1
Screenshots

Additional Context
-
PHP Version: php -v PHP 7.3.11-1+0~20191026.48+debian10~1.gbpf71ca0 (cli) (built: Oct 26 2019 14:20:37) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.11-1+0~20191026.48+debian10~1.gbpf71ca0, Copyright (c) 1999-2018, by Zend Technologies
-
OS: [e.g. iOS] Debian 10.1
-
Browser [e.g. chrome, safari] Google Chrome Version 78.0.3904.87
-
Plugin Version [e.g. 22] Site Kit by Google Version 1.0.0
-
Device: [e.g. iPhone6] macOs Catalina 10.15.1
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- When
googlesitekit.pageTitleis empty, this should not cause a JS error causing the dashboard screen to be blank.
Implementation Brief
- Merge #862
- Make sure
decodeHtmlEntitydoes not error when not supplied aString, and check the value/type ofgooglesitekit.pageTitleto make sure it's not used whenundefined.
Changelog entry
- Fix bug resulting in blank plugin dashboard screen under certain circumstances.
It seems like it might come from calls to decodeHtmlEntity( googlesitekit.pageTitle ). Obviously it’s wildly hard to debug this but I’ve noticed throughout the code that googlesitekit.pageTitle is often wrapped: https://github.com/google/site-kit-wp/blob/3c9b9dab6efbb12ce5c25c061ceda0ce85f32fe6/assets/js/googlesitekit-adminbar.js#L91 whereas there are places like https://github.com/google/site-kit-wp/blob/3c9b9dab6efbb12ce5c25c061ceda0ce85f32fe6/assets/js/components/dashboard-details/dashboard-details-app.js#L98 that doesn’t protect against pageTitle being false-y/not a string.
I can’t quite find how that would happen yet, but I suppose if it can that’d be the bug, because it matches the failures we saw with this error when development builds of React were used.
I've all-but-confirmed the error to be the one I expected. Changing googlesitekit.pageTitle = undefined in:
https://github.com/google/site-kit-wp/blob/b55547182dd65b12c76fb57c7115ad18cf64e137/assets/js/modules/search-console/dashboard/dashboard-widget-sitestats.js#L46
will cause the same error in the same place to throw:
The ACs for this one should be that we don't see a blank screen anymore when googlesitekit.pageTitle is undefined. I can write up the IB afterward, and I have a patch ready in #862.
IB set, and the issue already has a PR, so this should be easy to get through and deploy a fix for 😄
IB ✅
I was able to reproduce this on http://mediatemple.cmsdevrel.com/wp-admin
Steps:
- Deactivated 1.0.4
- Deleted 1.0.4
- Installed 1.1.1 (attached)
- Ran through setup to domain verification
- Clicked allow and noticed a 500 error
- Navigate to Site Kit dashboard here - http://mediatemple.cmsdevrel.com/wp-admin/admin.php?page=googlesitekit-splash
Notice error:

Zip version: google-site-kit.zip
If you need credentials for the WP host, please ping me.
Tested
Refreshed my host from last night's issue, still saw the blank page.
Deactivated and deleted 1.1.1
Downloaded and zipped latest develop 1.1.2 google-site-kit.zip
Went through install flow. No longer seeing blank page.

Passed QA ✅
After doing some tests just now I was able to reproduce this again on the latest develop (attached).
Steps:
- Install attached zip (created today off of develop at 1 hour ago google-site-kit.zip
- Click activate plugin after installation success

- Click Start Setup from the plugins screen

- Click Cancel on the welcome to setup screen

Notice Minified React error 31

Site Health info
### wp-core ###
version: 5.3
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%year%/%monthnum%/%day%/%postname%/
https_status: false
user_registration: 0
default_comment_status: open
multisite: false
user_count: 3
dotorg_communication: true
### wp-paths-sizes ###
wordpress_path: /home/interser/public_html
wordpress_size: 37.73 MB (39559273 bytes)
uploads_path: /home/interser/public_html/wp-content/uploads
uploads_size: 0.00 B (0 bytes)
themes_path: /home/interser/public_html/wp-content/themes
themes_size: 4.60 MB (4822642 bytes)
plugins_path: /home/interser/public_html/wp-content/plugins
plugins_size: 7.01 MB (7352406 bytes)
database_size: 682.59 KB (698977 bytes)
total_size: 50.00 MB (52433298 bytes)
### wp-active-theme ###
name: Twenty Nineteen (twentynineteen)
version: 1.4
author: the WordPress team
author_website: https://wordpress.org/
parent_theme: none
theme_features: automatic-feed-links, title-tag, post-thumbnails, menus, html5, custom-logo, customize-selective-refresh-widgets, wp-block-styles, align-wide, editor-styles, editor-style, editor-font-sizes, editor-color-palette, responsive-embeds, widgets
theme_path: /home/interser/public_html/wp-content/themes/twentynineteen
### wp-themes-inactive (3) ###
Twenty Seventeen: version: 2.2, author: the WordPress team
Twenty Sixteen: version: 2.0, author: the WordPress team
Twenty Twenty: version: 1.0, author: the WordPress team
### wp-plugins-active (1) ###
Site Kit by Google: version: 1.1.1, author: Google
### wp-plugins-inactive (2) ###
Akismet Anti-Spam: version: 4.1.3, author: Automattic
Hello Dolly: version: 1.7.2, author: Matt Mullenweg
### wp-media ###
image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
gd_version: bundled (2.1.0 compatible)
ghostscript_version: 9.25
### wp-server ###
server_architecture: Linux 3.10.0-962.3.2.lve1.5.24.6.el7.x86_64 x86_64
httpd_software: LiteSpeed
php_version: 5.6.40 64bit
php_sapi: litespeed
max_input_variables: 1000
time_limit: 30
memory_limit: 256M
max_input_time: 60
upload_max_size: 128M
php_post_max_size: 32M
curl_version: 7.66.0 OpenSSL/1.0.2t
suhosin: true
imagick_availability: false
htaccess_extra_rules: true
### wp-database ###
extension: mysqli
server_version: 10.1.43-MariaDB-cll-lve
client_version: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
### wp-constants ###
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/interser/public_html/wp-content
WP_PLUGIN_DIR: /home/interser/public_html/wp-content/plugins
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined
### wp-filesystem ###
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
After testing out some sites with @cole10up today, it seems the error outlined in https://github.com/google/site-kit-wp/issues/767#issuecomment-559356798 was only reproducible on a particular host and seemed to be an instance of https://github.com/google/site-kit-wp/issues/779.
I could see the error in Firefox but just got a blank screen in Chrome, leading us to think it was the same error. But it wasn't and the cause of the reported error is fixed by this, so moving this back through to Approval.
Note that there are a few more JavaScript issues that can cause a blank page. They largely seem to be related to having just updated to a different version of the plugin, but we haven't been able to dig up their root cause yet. This is one of the highest priorities we'll keep investigating.