• Resolved gdvine

    (@gdvine)


    I am using MC for the very first time on my website with 80,000 Posts. I recently trashed about half of these Posts and want to trash their images with your plugin. I assumed the scan would take a long time so I wasn’t fazed when MC needed about 50 minutes to get through each percent of the process. I set it up in the daytime and went to bed with the process at 7%.

    But when I woke up it had only got to 8% because it was erroring out with 403s on /wp-json/media-cleaner/v1/extract_references. Here is the JSON of the errors:
    {"code": "rest_cookie_invalid_nonce", "message": "Cookie check failed", "data": {"status": 403}}

    Also there were three 404 errors, from the following paths:
    /wp-content/plugins/media-cleaner/app/index.js.map
    /wp-content/plugins/wp-rest-api-authentication/admin/css/materialdesignicons.css.map
    /wp-content/plugins/media-cleaner/app/vendor.js.map

    I have pressed Auto-Retry a few times but the 403s are still happening. I checked the PHP logs and there are no messages relating to Media Cleaner in there.

    My host pointed to the fact that the WP nonce changes every 24 hours (as outlined in https://developer.www.ads-software.com/news/2023/08/understand-and-use-wordpress-nonces-properly/) as a possible culprit.

    Can you advise?

    • This topic was modified 1 year ago by Steven Stern (sterndata).
    • This topic was modified 1 year ago by gdvine.
    • This topic was modified 1 year ago by gdvine.
    • This topic was modified 1 year ago by gdvine.
    • This topic was modified 1 year ago by gdvine.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gdvine

    (@gdvine)

    Hey just tried again and Scan failed at 7% with a 502 error:
    Failed to load resource: the server responded with a status of 502 () (extract_references, line 0) 

    JSON response: 
    {"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}

    It’s been a couple weeks with no reply… any idea what could cause these errors? This time the failure happened in the afternoon so probably unrelated to nonce issues which reset at midnight.

    • This reply was modified 11 months, 3 weeks ago by gdvine.
    Plugin Support Val Meow

    (@valwa)

    Hey @gdvine! ??

    The?rest_cookie_invalid_nonce?error points to a problem with the authentication nonce, but it might be something else as your issue seems to be more persistant.

    Although you’ve mentioned the absence of PHP logs, I would recommend checking the WordPress debug log (if it’s enabled) as well as the server error logs for further insights into the issue. Particularly when encountering a 502 error, there should be some indication of which route is being accessed. Both the 502 error and the 404 errors for the?.map?files might point to a server configuration problem. While?.map?files are not essential for operation, their missing status could signal incorrect server rules or a misconfiguration in the .htaccess file.

    Please make sure that your WordPress REST API is accessible at all times and correctly routed. Another troubleshooting step would be to temporarily disable your other plugins and themes, as they could also be causing interference. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘403 cookie errors during scan’ is closed to new replies.