• Resolved maxence1502

    (@maxence1502)


    Hi,

    For several months I’ve had an error in my logs during certain actions on my site. I don’t know exactly which action and I haven’t found anyone else with the same problem. I thought it would be corrected in an update.

    Here is my error:

    [30-Mar-2024 23:26:33 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /var/www/wordpress/wp-content/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php:134
    
    Stack trace:
    
    #0 /var/www/wordpress/wp-content/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php(255): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->get_analytics_report_data()
    
    #1 /var/www/wordpress/wp-content/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php(631): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->get_indicator_data()
    
    #2 /var/www/wordpress/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-reports-v1-controller.php(48): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->get_collection_params()
    
    #3 /var/www/wordpress/wp-content/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php(85): WC_REST_Reports_V1_Controller->register_routes()
    
    #4 /var/www/wordpress/wp-content/plugins/woocommerce/src/Admin/API/Init.php(151): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->register_routes()
    
    #5 /var/www/wordpress/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Admin\API\Init->rest_api_init()
    
    #6 /var/www/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    
    #7 /var/www/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    
    #8 /var/www/wordpress/wp-includes/rest-api.php(593): do_action()
    
    #9 /var/www/wordpress/wp-includes/rest-api.php(417): rest_get_server()
    
    #10 /var/www/wordpress/wp-includes/class-wp-hook.php(324): rest_api_loaded()
    
    #11 /var/www/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    
    #12 /var/www/wordpress/wp-includes/plugin.php(565): WP_Hook->do_action()
    
    #13 /var/www/wordpress/wp-includes/class-wp.php(418): do_action_ref_array()
    
    #14 /var/www/wordpress/wp-includes/class-wp.php(813): WP->parse_request()
    
    #15 /var/www/wordpress/wp-includes/functions.php(1336): WP->main()
    
    #16 /var/www/wordpress/wp-blog-header.php(16): wp()
    
    #17 /var/www/wordpress/index.php(17): require('...')
    
    #18 {main}
    
      thrown in /var/www/wordpress/wp-content/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php on line 134

    I should point out that I have the latest version of Woocommerce and that I haven’t made any changes to it.

    Do you have any ideas?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter maxence1502

    (@maxence1502)

    Any idea ?

    Plugin Author Julia Amosova

    (@jamosova)

    Hi there!

    Thanks for reporting!

    It looks like the error is coming from the Analytics section but we are not able to reproduce it so far which makes it difficult for us to fix.

    Can you please try to narrow it down and see what actions trigger it? Maybe you often perform any search in analytics?

    Thread Starter maxence1502

    (@maxence1502)

    Hello, I don’t use analytics ??

    I think this function is also called by something else

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hello @maxence1502,

    Thanks again for getting back to us.

    So that we can understand your site setup even better, please share with us your system status report which you can find via WooCommerce > Status > Get system report > Copy for support, then paste it via https://gist.github.com/ and send the link here.

    In the meantime, I’d also recommend keeping an eye out for any failed cron jobs to see if there could be any failed jobs on the same date as the shared error logs.

    Looking forward to your reply.

    Thread Starter maxence1502

    (@maxence1502)

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @maxence1502,

    Thank you for the additional details. Everything seems in order in your SSR. Can you please run a conflict test to find out if something external is interfering?

    To test, you’ll first want to change the theme on your site to Storefront, then check to see if the issue is still present. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you.

    If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each to see where the issue is coming from.

    Some important considerations:?
    — Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality, or you can consider using a service like?Jetpack. If something goes wrong, you will be able to restore it.

    — Also, you can consider using a plugin like?Health Check & Troubleshooting. This is a plugin developed by the WordPress community, and it is helpful to disable plugins without affecting your current site visitors.

    — It is also important to consider staging functionality in case you would not like to touch your production site (you can ask your host if they offer this service), or you can use WP Staging to spin up a new test site quickly.

    You can find more about this in this?guide.

    Please let us know about your findings.
    OP

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi there ?? ,

    We haven’t heard from you in a while; this is to check if you’ve been able to proceed with the troubleshooting steps provided before and if you still need help.

    Thanks!
    -OP

    If it helps anybody, the crash stems from the JWT Auth plugin. We get the same crash quite often. It seems to happen every time there is a REST API request made that is not authenticated by that plugin, i.e. when a normal fail response would be expected. They’ve been revamping that plugin recently, so this might get fixed in their v3.0 series.

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @seanconklin,

    Thank you for sharing this information and contributing to the WooCommerce Community. This might help other users in the future.

    Should you have further inquiries, kindly?create a new topic here.

    Thanks

    Thread Starter maxence1502

    (@maxence1502)

    The latest update of JWT Auth plugin fixed this error ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.