question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Loading chunk" error on some MDN pages

See original GitHub issue

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry goes blank a couple hundred ms after loading, with these errors in devtools:

Content Security Policy: Couldn’t process unknown directive ‘script-src-elem’
Loading failed for the <script> with source “https://developer.mozilla.org/static/js/6.397539b0.chunk.js”. FinalizationRegistry:1:1
ChunkLoadError: Loading chunk 6 failed.
(error: https://developer.mozilla.org/static/js/6.397539b0.chunk.js)
    Webpack 57
react-dom.production.min.js:216:199
Uncaught ChunkLoadError: Loading chunk 6 failed.
(error: https://developer.mozilla.org/static/js/6.397539b0.chunk.js)
    Webpack 57
bootstrap:172:17

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kgcommented, Jul 19, 2021
StatusCode        : 200
StatusDescription : OK
Content           : (this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[6],{131:function(e,t,n){"use
                    strict";n.r(t),n.d(t,"default",(function(){return H}));var
                    r=n(6),a=n(3),s=n(0),c=n(1),o=n.n(c),i=n(2),l=o.a.c...
RawContent        : HTTP/1.1 200 OK
                    Connection: keep-alive
                    X-Frame-Options: DENY
                    X-XSS-Protection: 1; mode=block
                    X-Content-Type-Options: nosniff

Seems like it was a transient failure that got cached. I think MDN’s frontend might benefit from having a way to detect that a chunk load failed like this and either show an error message or re-try it somehow - I got a completely blank page and had to dig through the devtools logs to figure out which error messages were relevant + stuck across multiple loads.

0reactions
caugnercommented, Apr 26, 2022

Maybe this happens when

  1. an MDN page is loaded immediately before our CDN is invalidated, and
  2. that outdated page loads a chunk that no longer exists.
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >
Uncaught (in promise) Error: Loading chunk # failed. #7502
Im having the exact issue with my react application that sits on AWS S3 as a static web host, If the user is...
Read more >
Tips for authoring fast-loading HTML pages - MDN Web Docs
These tips are based on common knowledge and experimentation.
Read more >
javascript - ChunkLoadError: Loading chunk ... - Stack Overflow
I had this error after removing files from the /public folder. How I fixed it: Remove your /.next folder. Launch your project again....
Read more >
Code splitting in webpack with dynamic imports - Medium
So, this is one part of the problem solved. Now that we have the code for different pages in different bundles or chunks,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found