• Resolved Fibro Jedi

    (@fibrojedi)


    Source map error: Error: request failed with status 404 Resource URL: https://domain.dmn/path-to-plugins/media-cleaner/app/vendor.js Source Map URL: vendor.js.map

    Source map error: Error: request failed with status 404 Resource URL: https://domain.dmn/path-to-plugins/media-cleaner/app/vendor.js Source Map URL: index.js.map

    Hey,

    I’ve tried a few times, but on Step 4 the (Media Library/images only) scan gets stuck on retrying. The dev console gives the above issues when admin-ajax is running /wp-json/media-cleaner/v1/check_targets

    It is stopping and starting (which may be intentional so admin-ajax doesn’t time out) – and the error doesn’t happen all the time. But when it does the error pop-up…well, pops up!

    In case it’s not stating the obvious, both vendor.js and index.js do exist in the reported location.

    1. Is there anything I can do to clear up the error?
    2. Given the process stops/starts and the error pop up says that skipping it could cause false positives, can the results be relied on while the Error 404 inconsistently appears?

    Thanks btw, trying to identify unused images isn’t easy programmatically – I’ve tried. So I appreciate what you’ve done here.

    • This topic was modified 7 months ago by Fibro Jedi.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @fibrojedi! ??

    This would imply that the scripts aren’t loaded, which is odd if you’re already on the dashboard with no errors. Could you ensure that the path to the vendor causing the issue is actually the same as the scripts run when you browse the plugin pages?

    You can always disable your other plugins to ensure there’s no incompatibility causing this issue.

    Thread Starter Fibro Jedi

    (@fibrojedi)

    I can’t disable the plugins in the live environment but I can try to replicate locally. I have got some URL rewriting going on, but the URL referred to worked/existed at the location being called, hence being somewhat confused myself.

    I’ll see if I can reproduce it locally and get back to you.

    Thread Starter Fibro Jedi

    (@fibrojedi)

    Okay, in my local environment I get a load of react errors on the settings page, e.g.

    Warning: Failed prop type: H: prop type name is invalid; it must be a function, usually from the prop-types package, but received undefined.This often happens because of typos such as PropTypes.function instead of PropTypes.func. H vr@https://localhost/wp-content/plugins/media-cleaner/app/index.js:1:119404 v@https://localhost/wp-content/plugins/media-cleaner/app/vendor.js:18:7496 m@https://localhost/wp-content/plugins/media-cleaner/app/vendor.js:18:7753 qt@https://localhost/wp-content/plugins/media-cleaner/app/index.js:1:103624 react.js:199:32

        React 5

        vr https://localhost/wp-content/plugins/media-cleaner/app/index.js:1

        React 13

        5209 https://localhost/wp-content/plugins/media-cleaner/app/index.js:1

    I still got the 404 on the vendor.js (and my local system does not have URL rewriting).

    Additionally, when the scan is running debug.log throws these errors (again local system, hence the unusual folder structure)

    [26-Apr-2024 11:33:32 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /mnt/1c88b8d1-c48e-4b2e-92b3-89e869e10559/domain/wp-content/plugins/media-cleaner/classes/core.php:1296) in /mnt/1c88b8d1-c48e-4b2e-92b3-89e869e10559/domain/wp-includes/rest-api/class-wp-rest-server.php on line 1831

    It’s been paused at 40% for a long time now – 15 minutes in on auto-retry.
    It has thrown a JSON error, but because the error is being returns in HTML form, so it’s getting HTML rather than the JSON response you’re expecting.

    e.g. this from console:

    XHRPOST
    https://localhost/wp-json/media-cleaner/v1/extract_references
    [HTTP/1.1 200 OK 29ms]
    
    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    
    <br />
    <b>Deprecated</b>:  explode(): Passing null to parameter #2 ($string) of type string is deprecated in <b>/mnt/1c88b8d1-c48e-4b2e-92b3-89e869e10559/domain/wp-content/plugins/media-cleaner/classes/parsers/common.php</b> on line <b>165</b><br />
    

    Then lastly, there’s this in debug.log:

    [26-Apr-2024 11:21:30 UTC] PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /mnt/1c88b8d1-c48e-4b2e-92b3-89e869e10559/domain/wp-content/plugins/media-cleaner/classes/core.php on line 1296

    This second error is, yes, a deprecated notice so technically not an error, but it may help me find what the error actually is because, I assume a value what supposed to be sent to the preg_replace() function but it didn’t get one for some reason.

    Does this help at all?

    I’ll try the disabling plugins, but I have so many that’s not a quick job either.
    Thanks.

    • This reply was modified 7 months ago by Fibro Jedi.
    • This reply was modified 7 months ago by Fibro Jedi. Reason: Adding extra error information in the hope it helps
    Plugin Support Val Meow

    (@valwa)

    Hey?@fibrojedi! ??

    Could you please reach out to me through Contact & Support | Meow Apps by mentioning this ticket? It might be easier to understand what is going on hands-on.

    Thread Starter Fibro Jedi

    (@fibrojedi)

    I certainly can, thank you. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Step 4 vendor.js.map and index.js.map error 404’ is closed to new replies.