excalidraw: ChunkLoadError: Loading chunk 6 failed.

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.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (20 by maintainers)

Most upvoted comments

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.

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?