Closed jamesozzie closed 2 years ago
Update: From reviewing the JWT Auth plugin I can consistently recreate this, following the steps below:
The error remains after deactivating JWT Auth plugin, until your session storage is cleared.
Before escalating or adding further details I'm going to try and recreate this same error based on the latest report of this error, where the JWT Auth plugin is not active.
Unable to recreate the same issue without the JWT Auth plugin inactive, as per one users experience. This user did however encounter a separate error within their Site Health dashboard.
The other 2 Site Health info reports we have do indicate a JWT Auth plugin active, indicating there is a conflict of some type.
Escalating this for team review, with no obvious cause. Notes added to main bug description. Unsure if there is anything that can be done on the Site Kit side with this conflict.
Note that I also have a test site in support with all the same plugins as the sole impacted user who reported this who doesn't have the JWT Auth plugin active. I can't recreate the same error on this site, indicating the conflict is only with the JWT Plugin.
One additional user in the forums reported the same. Details added to main body of report above.
This user confirmed that this error appears with the JWT plugin active.
I've been doing more testing on this today, and it occurs consistently on one site, while not evident on another. Additional notes:
google_api_connect_fail
- https://recordit.co/2u4YEPzuHXI have investigate this with the JWT Auth plugin active. When the plugin is activated, all WP Rest Routes require Authorization headers in the request to be accessed (except the whitelisted ones). But in the Admin page the API calls are made with the credentials
, now JWT Token.
We can't really do anything other than advise JWT Auth users to whitelist the google-site-kit
routes using a filter the JWT Auth Plugin provides.
create wp-content/mu-plugins/jwt-auth-whitelist.php
with the following content.
<?php
/**
* Whitelist Google Site Kit API calls in JWT Auth by Useful Team.
*/
add_filter( 'jwt_auth_whitelist', function ( $endpoints ) {
$your_endpoints = array(
'/wp-json/google-site-kit/*',
);
return array_unique( array_merge( $endpoints, $your_endpoints ) );
} );
In my opinion, the behavior is a bug in the JWT Auth plugin as it shouldn't make cookie authorized requests to fail. And we can definitely raise an issue there.
There's no action to be taken on our side other then suggesting them the above fix.
As for as the error without JWT Plugin, I'm unable to recreate it as well. And other than the impacted user giving us their site credentials, I think there's no way for us to reproduce/investigate their issue.
cc @jamesozzie @bethanylang
Closing this out, with a mini plugin created to make use of the above filter. I've also reached out to the JWT Auth team and contacted all impacted users.
For those impacted, you can use the jwt_auth_whitelist
filter above, or download, install and activate the mini plugin as a standard WordPress plugin, in order to ensure Site Kit works alongside JWT Auth.
Just adding here that another user reported this error although in this users case their site was compromised: https://wordpress.org/support/topic/google-site-kit-12/
This user did not use the JWT Auth plugin, and was able to continue using Site Kit after addressing any issues by removing malicious files and using a security plugin to determine any action areas.
Bug Description
A few users in the support forums have encountered a "report must be an array to partition." error on the Site Kit dashboard.
Until today we've so far been unable to recreate this or pinpoint the exact cause. Today, when recreating an environment of one impacted user (SH info) we were able to recreate this in support. In this particular case it occured after activating one of the same plugins as the impacted user.
Gathering more details at present, issue details to be updated. Trying to recreate on other sites at present
Console errors on a support site where this appears:
``` checkPropTypes.js?a15c:20 Warning: Failed prop type: Invalid prop `report` of type `object` supplied to `UserCountGraph`, expected an array. in UserCountGraph (created by DashboardAllTrafficWidget) in DashboardAllTrafficWidget (created by WhenAnalyticsActive(DashboardAllTrafficWidget)) in WhenAnalyticsActive(DashboardAllTrafficWidget) (created by WidgetRenderer) in WidgetRenderer (created by WidgetAreaRenderer) in div (created by Cell) in Cell (created by WidgetCellWrapper) in WidgetCellWrapper (created by WidgetAreaRenderer) in div (created by Row) in Row (created by WidgetAreaRenderer) in div (created by WidgetAreaRenderer) in div (created by ForwardRef) in ForwardRef (created by WidgetAreaRenderer) in WidgetAreaRenderer (created by WidgetContextRenderer) in div (created by WidgetContextRenderer) in WidgetContextRenderer (created by DashboardMainApp) in DashboardMainApp (created by DashboardEntryPoint) in DashboardEntryPoint in RestoreSnapshots (created by Root) in ErrorHandler (created by Root) in StrictMode (created by Root) in Root printWarning @ checkPropTypes.js?a15c:20 checkPropTypes.js?a15c:20 Warning: Failed prop type: Invalid prop `report` of type `object` supplied to `UserDimensionsPieChart`, expected an array. in UserDimensionsPieChart (created by DashboardAllTrafficWidget) in DashboardAllTrafficWidget (created by WhenAnalyticsActive(DashboardAllTrafficWidget)) in WhenAnalyticsActive(DashboardAllTrafficWidget) (created by WidgetRenderer) in WidgetRenderer (created by WidgetAreaRenderer) in div (created by Cell) in Cell (created by WidgetCellWrapper) in WidgetCellWrapper (created by WidgetAreaRenderer) in div (created by Row) in Row (created by WidgetAreaRenderer) in div (created by WidgetAreaRenderer) in div (created by ForwardRef) in ForwardRef (created by WidgetAreaRenderer) in WidgetAreaRenderer (created by WidgetContextRenderer) in div (created by WidgetContextRenderer) in WidgetContextRenderer (created by DashboardMainApp) in DashboardMainApp (created by DashboardEntryPoint) in DashboardEntryPoint in RestoreSnapshots (created by Root) in ErrorHandler (created by Root) in StrictMode (created by Root) in Root printWarning @ checkPropTypes.js?a15c:20 checkPropTypes.js?a15c:20 Warning: Failed prop type: Invalid prop `report` of type `object` supplied to `TotalUserCount`, expected an array. in TotalUserCount (created by DashboardAllTrafficWidget) in DashboardAllTrafficWidget (created by WhenAnalyticsActive(DashboardAllTrafficWidget)) in WhenAnalyticsActive(DashboardAllTrafficWidget) (created by WidgetRenderer) in WidgetRenderer (created by WidgetAreaRenderer) in div (created by Cell) in Cell (created by WidgetCellWrapper) in WidgetCellWrapper (created by WidgetAreaRenderer) in div (created by Row) in Row (created by WidgetAreaRenderer) in div (created by WidgetAreaRenderer) in div (created by ForwardRef) in ForwardRef (created by WidgetAreaRenderer) in WidgetAreaRenderer (created by WidgetContextRenderer) in div (created by WidgetContextRenderer) in WidgetContextRenderer (created by DashboardMainApp) in DashboardMainApp (created by DashboardEntryPoint) in DashboardEntryPoint in RestoreSnapshots (created by Root) in ErrorHandler (created by Root) in StrictMode (created by Root) in Root printWarning @ checkPropTypes.js?a15c:20 checkPropTypes.js?a15c:20 Warning: Failed prop type: Invalid prop `searchConsoleData` of type `object` supplied to `Overview`, expected an array. in Overview (created by SearchFunnelWidget) in SearchFunnelWidget (created by WidgetRenderer) in WidgetRenderer (created by WidgetAreaRenderer) in div (created by Cell) in Cell (created by WidgetCellWrapper) in WidgetCellWrapper (created by WidgetAreaRenderer) in div (created by Row) in Row (created by WidgetAreaRenderer) in div (created by WidgetAreaRenderer) in div (created by ForwardRef) in ForwardRef (created by WidgetAreaRenderer) in WidgetAreaRenderer (created by WidgetContextRenderer) in div (created by WidgetContextRenderer) in WidgetContextRenderer (created by DashboardMainApp) in DashboardMainApp (created by DashboardEntryPoint) in DashboardEntryPoint in RestoreSnapshots (created by Root) in ErrorHandler (created by Root) in StrictMode (created by Root) in Root printWarning @ checkPropTypes.js?a15c:20 checkPropTypes.js?a15c:20 Warning: Failed prop type: Invalid prop `data` of type `object` supplied to `SearchConsoleStats`, expected an array. in SearchConsoleStats (created by SearchFunnelWidget) in SearchFunnelWidget (created by WidgetRenderer) in WidgetRenderer (created by WidgetAreaRenderer) in div (created by Cell) in Cell (created by WidgetCellWrapper) in WidgetCellWrapper (created by WidgetAreaRenderer) in div (created by Row) in Row (created by WidgetAreaRenderer) in div (created by WidgetAreaRenderer) in div (created by ForwardRef) in ForwardRef (created by WidgetAreaRenderer) in WidgetAreaRenderer (created by WidgetContextRenderer) in div (created by WidgetContextRenderer) in WidgetContextRenderer (created by DashboardMainApp) in DashboardMainApp (created by DashboardEntryPoint) in DashboardEntryPoint in RestoreSnapshots (created by Root) in ErrorHandler (created by Root) in StrictMode (created by Root) in Root printWarning @ checkPropTypes.js?a15c:20 browser.js?40b6:45 Uncaught Invariant Violation: report must be an array to partition. at invariant (webpack-internal:///./node_modules/invariant/browser.js:38:15) at partitionReport (webpack-internal:///./assets/js/util/partition-report.js:41:51) at extractSearchConsoleDashboardData (webpack-internal:///./assets/js/modules/search-console/util/index.js:98:104) at Overview (webpack-internal:///./assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/Overview.js:163:110) at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16260:18) at mountIndeterminateComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:18794:13) at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:20162:16) at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:336:14) at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:385:16) at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:440:31) browser.js?40b6:45 Uncaught Invariant Violation: report must be an array to partition. at invariant (webpack-internal:///./node_modules/invariant/browser.js:38:15) at partitionReport (webpack-internal:///./assets/js/util/partition-report.js:41:51) at SearchConsoleStats (webpack-internal:///./assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/SearchConsoleStats.js:66:104) at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16260:18) at mountIndeterminateComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:18794:13) at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:20162:16) at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:336:14) at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:385:16) at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:440:31) at beginWork$$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:25780:7) react-dom.development.js?61bb:21843 The above error occurred in theSteps to reproduce
Screenshots
https://user-images.githubusercontent.com/41326532/177720076-05cbb102-d7b4-49f1-87c8-449166f3f8ec.mp4
Impacted Users
Additional Context
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