`Cannot read properties of undefined
-
This error for Google Site kit is given to me on the small window on the dashboard as well as on the Site kit page in the Backend of WordPress. Please help
Cannot read properties of undefined (reading 'data') in WPDashboardSessionDuration in WithWidgetComponentProps(WPDashboardSessionDuration) in div in WPDashboardWidgets in div in WPDashboardApp in RestoreSnapshots in ErrorHandler in StrictMode in Root
The page I need help with: [log in to see the link]
-
Hi @hjgt,
Thanks for reaching out, and sharing details of the error you’re encountering. As I suspect what you’re encountering is a third party plugin conflict please share the following:
- Your Site Health information. You can use this form to share privately if preferred.
- When checking the Site Kit dashboards/attempting set up from a Chrome browser incognito window do you see any browser console errors on the same screen where this notice appears? If so please share any such errors.
After reviewing the above I’ll provide you with some troubleshooting suggestions, which may include using the Health Check & Troubleshooting plugin, which can be useful to identify any third party plugin or theme related conflicts.
Let me know if you have any questions with the above.
@hjgt Just following up with you here to check whether you’d had an opportunity to check for any plugin conflicts, by following the steps suggested above? Let me know if you have any problems in doing so and I’d be happy to assist š
looks complicated
ok i filled out the form and pasted in my site health report.
This is the error in incognito mode:
report must be an array to partition. in SearchConsoleStats in div in div in Widget in WithWidgetSlug(Widget) in SearchFunnelWidget in WidgetRenderer in div in Cell in WidgetCellWrapper in div in Row in div in div in ForwardRef in WidgetAreaRenderer in div in WidgetContextRenderer in DashboardMainApp in DashboardEntryPoint in RestoreSnapshots in ErrorHandler in StrictMode in Root
the same thing is happening on 4 out of 5 of my websites, Sitekit is affected.
i use different themes and some different Plugins on each.Thanks for sharing. I’ve checked your Site Health information and inspected your site. As nothing obvious stands out please perform the steps below, which can help rule out any third party plugin or theme related conflicts:
- Login to your site from a Chrome browser incognito window
- Install and activate the Health Check & Troubleshooting plugin.
- Navigate to “Plugins > Health Check & Troubleshooting > Troubleshoot”.
- From the same screen click on the “Available Plugins” tab at the top right and then click on the “Enable” option next to “Site Kit by Google”
- Check your Site Kit dashboards once more
If the same occurs, please submit your Site Health information for another one of the impacted sites.
It might also be useful if you were able to share any browser console errors on the same dashboard page where this appears. I can assist with this if you’re unsure.
Please let me know if you have any questions with the above.
Thanks for your patience on this. We’ve identified a possible cause of this, a conflict with the JWT Auth plugin. For more details please see the respective GitHub issue.rel=”noopener” target=”_blank”>respective GitHub issue.
While I didn’t see the JWT plugin active based on the Site Health information you previously provided, if you did have this plugin active at some point you can add the below to a custom plugin or a child themes functions.php file.
/** * 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 ) ); } );
Alternatively you can use this mini plugin by pressing the “Download Zip” button, then installing and activating this as a standard WordPress plugin upload. After doing so you should no longer encounter this error.
If you still encounter this error, or if you’re not using the JWT Auth plugin and this appears please let me know and we can investigate further.
As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist.
I got this notification on my site kit dashboard.
I troubleshooter it already thinking the error might be caused by rank math plugin but the issue was not solved.look into it for me.
report must be an array to partition. in SearchConsoleStats in div in div in Widget in WithWidgetSlug(Widget) in SearchFunnelWidget in WidgetRenderer in div in Cell in WidgetCellWrapper in div in ForwardRef in div in div in ForwardRef in WidgetAreaRenderer in div in WidgetContextRenderer in DashboardMainApp in DashboardEntryPoint in RestoreSnapshots in ErrorHandler in StrictMode in Root
Hi @kingbasit,
I’ve responded to your individual support topic on this now. Before we check for any possible Rank Math plugin conflict please let me know if you are using the JWT Auth from that support topic, where we can communicate from.
None of us are using JWT Auth plugin, so stop it.
I tried your plugin, but it did Not work because we don’t use the plugin, and you keep accusing us of using JWT Auth, I have given you all the evidence and informed you, that I have disabled and uninstalled all other plugins, and still no solution.
I have lost 2 websites and had to redo one from scratch because of you. still, no solution, the one site that has google site kit working is the one I had to redo from scratch, it’s not a theme issue because all my sites have different themes, I’ve explained all this, and still, you hide behind your negligence at the expense of our time and suffering!Hi @hjgt,
I’ve answered your latest support topic now. Hopefully we can determine the cause. Thank you!
I just determined the cause and fixed it myself, it turned out I had been hacked and all my websites. The files the hackers had left were somehow also disabling the Sitekit, I presume so we don’t know that our visitors were being redirected and their ads being shown on our websites. I installed wordfence and found all this, cleared the files one by one and now all website Site Kits are functioning perfectly.
Thanks for trying anyways.
Cheers šerror, Site Kit, WP, WordPress, google, sitekit
- This reply was modified 2 years ago by Will Bill.
- The topic ‘`Cannot read properties of undefined’ is closed to new replies.