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.

ChunkLoadError: Loading chunk 6 failed.

See original GitHub issue

Sentry Issue: FRONTEND-36

ChunkLoadError: Loading chunk 6 failed.
(error: https://excalidraw.com/static/js/6.c8222ad6.chunk.js)
  at None (https://excalidraw.com/:1:6601)
  at None (/static/js/2.54383af4.chunk.js:2:49476)
  at a (https://excalidraw.com/:1:6138)
  at None (/static/js/main.62852b85.chunk.js:1:146849)
  at a (https://excalidraw.com/:1:6138)
...
(5 additional frame(s) were not displayed)

I would assume that this is due to our frequent releases that are changing the chunk hashes.

What I am not sure at though, is at what point Webpack will attempt to reload a chunk and fail. Unless uses are loading the app much more frequent than we release.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (20 by maintainers)

github_iconTop GitHub Comments

23reactions
vjeuxcommented, Apr 6, 2020

Let’s not over fixate on this. It only happened 5 times. I believe that somebody has excalidraw opened for a while, we push a new version in the meantime and when they get back, they try to load some lazy chunk and it is no longer there.

The way we solve this at Facebook is that we keep the previous chunks on our CDN for a week and we force refresh the app for people if the bundle is more than a week old. This way we don’t need to care about very old versions.

1reaction
j-f1commented, Apr 5, 2020

Maybe hard code the build date into the bundle, then expose a route like /version that returns that date, so the JS can prompt the user to reload if we re-deploy the site?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Solve the Chunk Load Error in JavaScript - Rollbar
If you are encountering this error as a user of an application, the most simple way to resolve it is to clear your...
Read more >
Webpack Code Splitting 'Loading chunk failed' error wrong file ...
When you use code splitting with React.lazy, sometimes a 'chunk load error loading chunk 4 failed in react' error will occur.
Read more >
React + Webpack: ChunkLoadError: Loading chunk X failed.
This looks random, right? It is not. You get this error when React attempts to lazy load a file — eg. a component...
Read more >
Analytics ChunkLoadError: Loading chunk 6 failed.
Analytics ChunkLoadError: Loading chunk 6 failed. · Temporarily switch your theme to Storefront · Disable all plugins except for WooCommerce · Repeat the...
Read more >
How to fix ChunkLoadError in your ReactJS application
What can cause the chunk load error? One of the main reasons for a ChunkLoadError , and the one I will focus on...
Read more >

github_iconTop Related Medium Post

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