• Resolved scopichub

    (@scopichub)


    Hello team,

    I installed Site Kit the first time and also completed the setup but afterward as I click on the Dashboard it shows an error popped up “Sit Kit encountered an error”.

    Logs:

    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

    Please help me to solve this error

    • This topic was modified 2 years, 8 months ago by scopichub.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Hi @scopichub

    Thanks for reaching out. We’ve been looking into other reports of this and we were able to recreate this in one scenario, a third party plugin conflict. In your case please share your Site Health information and I can inspect your WordPress invironment. You can use this form to share privately if preferred.

    Once we have your Site Health information we can advise on this further. As I suspect what’s occurring in your case is also a plugin conflict you may wish to perform a check using the Health Check & Troubleshooting plugin.

    Looking forward to hearing from you.

    Thread Starter scopichub

    (@scopichub)

    Hi James, thanks for reaching out.

    I tried disabling and checking each plugin and found “JWT Auth – WordPress JSON Web Token Authentication” is culprit. When I disabled this particular plugin, the site kit seems to work fine.

    I go through the Github thread you mentioned and yes, I am facing it too. The site requires JWT Auth too, I can’t keep it turned off for a long time. I hope you understand.

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for the update, and sharing your experience. I’ll add your details to the related GitHub issue and keep you updated with any progress on this. I can’t state at this point is a fix is applicable on the Site Kit side, however, I have escalated this for a team review.

    I understand also that it’s not ideal to deactivate the JWT Auth plugin to check your Site Kit dashboard. I’ll keep you posted here with any update on this.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for your patience on this. We’ve identified the cause of this, with more details on the respective GitHub issue.

    To ensure you no longer encounter this 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.

    Let me know if you have any further queries on the above.

    Plugin Support James Osborne

    (@jamesosborne)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Site Kit encountered an error while setup’ is closed to new replies.