You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "DataStrategistTeam (via GitHub)" <gi...@apache.org> on 2026/06/21 14:16:39 UTC

[I] Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle [superset]

DataStrategistTeam opened a new issue, #41266:
URL: https://github.com/apache/superset/issues/41266

   ### Bug description
   
   
   Superset displays an "Unexpected error" page with the following error:
   
   ChunkLoadError: Loading chunk 4169 failed.
   
   The application fails while attempting to load a lazily loaded frontend bundle, resulting in a broken UI and preventing access to the affected page.
   
   
   ```
   Unexpected error
   ChunkLoadError: Loading chunk 4169 failed.
   
   Lazy
   l@http://127.0.0.1:8088/static/assets/8115.ef2c25320df8c6b15d8a.entry.js:1116:190
   98837/g/<@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:58:7054
   main
   2672/h1<@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:340:4725
   98837/g/<@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:58:7054
   div
   2672/h2<@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:340:4989
   Suspense
   t@http://127.0.0.1:8088/static/assets/8706.6dfab372988d20453152.entry.js:6:20127
   t@http://127.0.0.1:8088/static/assets/8706.6dfab372988d20453152.entry.js:6:20770
   tD@http://127.0.0.1:8088/static/assets/spa.72ab05fb3acc832bdf24.entry.js:301:8750
   R@http://127.0.0.1:8088/static/assets/8706.6dfab372988d20453152.entry.js:7:873
   n@http://127.0.0.1:8088/static/assets/8706.6dfab372988d20453152.entry.js:6:93148
   x@http://127.0.0.1:8088/static/assets/8706.6dfab372988d20453152.entry.js:7:1072
   e3@http://127.0.0.1:8088/static/assets/8115.ef2c25320df8c6b15d8a.entry.js:1501:3086
   c@http://127.0.0.1:8088/static/assets/8115.ef2c25320df8c6b15d8a.entry.js:1412:2136
   79551/s<@http://127.0.0.1:8088/static/assets/2290.4aef28ca85361c2fdbd3.entry.js:273:13694
   C@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:554:29987
   rd@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:103:8092
   rv@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:103:9872
   rb@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:103:13885
   y@http://127.0.0.1:8088/static/assets/vendors.6f4ecbc3d2e23e236060.entry.js:58:7234
   SupersetThemeProvider@http://127.0.0.1:8088/static/assets/8115.ef2c25320df8c6b15d8a.entry.js:1:3726
   i@http://127.0.0.1:8088/static/assets/8115.ef2c25320df8c6b15d8a.entry.js:1541:18426
   tH@http://127.0.0.1:8088/static/assets/spa.72ab05fb3acc832bdf24.entry.js:301:9615
   t@http://127.0.0.1:8088/static/assets/8706.6dfab372988d20453152.entry.js:6:17228
   t@http://127.0.0.1:8088/static/assets/8706.6dfab372988d20453152.entry.js:6:8222
   tW
   See less
   
   
   
   ```
   
   I verified that Superset is serving static assets correctly.
   
   For example, opening the following asset directly in the browser returns the JavaScript file successfully:
   
   http://127.0.0.1:8088/static/assets/8115.ef2c25320df8c6b15d8a.entry.js
   
   The file is accessible and downloads/loads without error.
   
   Despite this, the application still throws:
   
   ChunkLoadError: Loading chunk 4169 failed.
   
   
   <img width="951" height="797" alt="Image" src="https://github.com/user-attachments/assets/78a2e29c-75b9-41f0-85d9-e3834e77d117" />
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #41266: Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle
URL: https://github.com/apache/superset/issues/41266


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle [superset]

Posted by "rudra1337-dev (via GitHub)" <gi...@apache.org>.
rudra1337-dev commented on issue #41266:
URL: https://github.com/apache/superset/issues/41266#issuecomment-5032531417

   I spent some time digging into this and prototyped a possible fix — wanted to
   check the approach with maintainers before turning it into a formal PR.
   
   Worth noting up front: this addresses the missing recovery/UX path described
   here — it's not a fix for every possible trigger of a chunk load failure (e.g.
   it won't resolve a genuinely misconfigured Node build, or make a server stop
   returning 503s under load — see @Wetbikeboy2500's comment above). What it does
   address is what happens *after* a chunk fails to load, regardless of why.
   
   **Root cause**
   
   The existing `ErrorBoundary` (`src/components/ErrorBoundary/index.tsx`) catches
   every error uniformly and shows a generic "Unexpected error" alert — there's no
   special handling for `ChunkLoadError`, so a stale or missing lazy-loaded chunk
   gets the same dead-end treatment as any other bug, with zero recovery path.
   This matches what's noted in the linked #39219 as well: no built-in retry logic
   exists for failed chunk loads.
   
   **Repro (100% reproducible locally, no need for an actual redeploy)**
   
   1. Run the frontend dev server, load the app, navigate once so some chunks load.
   2. In Chrome DevTools → Network, right-click a lazy-loaded chunk (e.g.
      `SqlLab.[hash].chunk.js`) → "Block request URL".
   3. Navigate to the route that needs that chunk (e.g. SQL Lab).
   4. Console shows `Uncaught ChunkLoadError: Loading chunk SqlLab failed.`, and the
      UI falls back to the ErrorBoundary's generic alert.
   
   This also matches @Wetbikeboy2500's report that navigating away and back doesn't
   recover — currently nothing retries or recovers automatically, and the error
   persists even after the underlying resource becomes reachable again.
   
   **Prototyped approach**
   
   Detect `ChunkLoadError` specifically in `componentDidCatch` and trigger a
   one-time `window.location.reload()`, guarded by a short `sessionStorage`
   timestamp window so a persistently broken chunk doesn't cause an infinite
   reload loop — it falls through to the normal error UI after one attempt
   instead of retrying forever.
   
   - **Stale-chunk case** (redeploy happened): reload fetches a fresh
     `index.html` pointing at the new chunk hash → recovers silently, user never
     sees an error.
   - **Persistently broken case** (e.g. sustained 503s, network genuinely down):
     one reload attempt, then falls back to the existing error alert instead of
     an infinite loop — strictly better than today's no-recovery-at-all
     behavior, though it doesn't address the underlying cause of sustained 503s.
   
   **Verified locally:**
   - Added test coverage in `ErrorBoundary.test.tsx` for: reload-on-chunk-error,
     guard-window preventing a second reload, and `onError` still firing before
     reload. All 6 tests pass (3 existing + 3 new).
   - `npm run lint` — 0 errors
   - `npm run type` — clean
   - Manually verified both outcomes: (a) persistently blocked chunk → reload
     once, then shows the normal error alert instead of looping forever;
     (b) chunk becomes available again after the reload → target page loads
     successfully with no error shown to the user at all.
   
   This is a prototype, not a polished PR yet — if this direction seems
   reasonable, I'll clean it up, open the PR, and add whatever else you'd want
   (more test cases, a different guard window, etc.). If it's not the right
   direction, happy to hear why before I put more time into it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #41266:
URL: https://github.com/apache/superset/issues/41266#issuecomment-4762261845

   <!-- Answer -->
   This is a known issue that has been reported before (see [#39219](https://github.com/apache/superset/issues/39219)). `ChunkLoadError` is almost always caused by **stale cached assets** — the browser holds a reference to a JS/CSS chunk from a previous build after a deploy or version change [[1]](https://github.com/apache/superset/issues/39219).
   
   A **hard refresh** (Ctrl+Shift+R / Cmd+Shift+R) or clearing the browser cache typically resolves this.
   
   However, there are two things worth noting for your environment:
   
   1. **Node version mismatch**: You're using Node 16, but the current master branch requires **Node ^20.16.0** (recommended v20.18.3 per the `.nvmrc` file) [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/package.json#L354-L357) [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/.nvmrc). Building the frontend assets with an unsupported Node version can produce broken or incompatible chunks. This is very likely the root cause of your issue.
   
   2. **No built-in retry logic**: Superset does not currently implement any retry mechanism for failed chunk loads — it relies on standard React `ErrorBoundary` and `Suspense` patterns [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/components/ErrorBoundary/index.tsx#L37-L40).
   
   **Recommended fix**: Upgrade to Node 20 (specifically v20.18.3), rebuild your frontend assets (`npm ci && npm run build`), clear your browser cache, and try again.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
   
   ---
   
   Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
   
   [![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=4ba18750-3418-4ca4-a6f4-06741525f26a) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIg
 NC45ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjQyODQ0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48bWFzayBpZD0iZG9zdS1kLWN1dG91dCIgZmlsbD0id2hpdGUiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBk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tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #41266:
URL: https://github.com/apache/superset/issues/41266#issuecomment-4770905846

   I think the bot is right that this might just not be something we can fix... but if you can pinpoint a Superset bug rather than a config/version problem in your implementation, we can try to address it. Let us know.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle [superset]

Posted by "Wetbikeboy2500 (via GitHub)" <gi...@apache.org>.
Wetbikeboy2500 commented on issue #41266:
URL: https://github.com/apache/superset/issues/41266#issuecomment-4844489288

   I have been occasionally running into this issue even though I force the index.html to never be cached.
   
   The issue I am seeing is that sometimes when it loads in these assets, there can be a 503 error and it fails to load one of the assets.
   
   > (anonymous) @ /superset/welcome/:106
   >0c6261d99b353a397746.chunk.js:1  Failed to load resource: the server responded with a status of 503 ()
   > ChunkLoadError: Loading chunk 3377 failed.
   
   The error bubbles up as a ChunkLoadError and, even when navigating away and coming back to the dashboard page, it will maintain that chunk load error. You can simulate this using Chrome DevTools to block the URL from loading for the asset and then hard refreshing and going back to the dashboard. It will fail the request and maintain the chunk load error even if you unblock the request. It does not retry loading the asset.
   
   Why the request 503s is a bit more difficult to assume, could be the dozens of requests sent at once for assets and dashboard resources causing some instability. The thing that I can find is there are response time spikes around 5-6 seconds which correlate with 503s.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Bug Report: ChunkLoadError when loading lazy-loaded frontend bundle [superset]

Posted by "Wetbikeboy2500 (via GitHub)" <gi...@apache.org>.
Wetbikeboy2500 commented on issue #41266:
URL: https://github.com/apache/superset/issues/41266#issuecomment-4892895075

   > Hello affected folks, are your Superset installation deployed as production? Or they're being developed and tested locally?
   
   I am running the lean docker image on AWS ECS Fargate. I am seeing these intermittent 503 errors there. I am using the default gunicorn config.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org