I have been debugging my Magento 2 build and I have found that when cache is enabled I see intermittent JS loading errors. If I disable the FPC cache the errors stop and the page works correctly (consistently).

No code changes are implemented, just a simple page reload.

Good page load:

enter image description here

Bad page load:

enter image description here

The errors happen approx every 3-4 page loads. Then goes away again for the next couple of page loads but then reappears.

If I disable FPC cache I do not see any errors ever (tested with approx 50 page reloads).

I have of course cleared cache, deleted pub/static/* deployed static content etc

Anyone have any ideas?



The cause of this was a 3rd party JS widget that was injecting jQuery 3.3.1. Which is incompatible with core Magento jQuery. Removing the widget resolved the issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.