[discuss] Improve UX when async chunks fail to load #163671
Labels
discuss
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Team:SharedUX
Team label for AppEx-SharedUX (formerly Global Experience)
UX: UI/UX Consultation
Requires UX lead input/consult before development and UX lead approval on PR before merge.
When running zero-downtime upgrades, users who currently have Kibana opened in their browser will encounter errors as the server rolls over to a new version because of the way that we serve static assets. The most likely scenario is that they will begin getting 404s as webpack attempts to load async chunks, since the URLs to the static bundles will have changed. The resulting error could look something like this:
To fix the issue, users need to simply refresh the page, but an error like this does not help them understand what to do. We should improve the UX so that users aren't seeing an ugly stack trace.
These errors are coming from an
EuiErrorBoundary
, which handles uncaught exceptions in a portion of the React tree. Unfortunately, there is no centralized place where we are controlling such errors as they could appear anywhere in the UI where we are doing an async import. A quick grep of the codebase shows about 78 different (non-test) files that are usingEuiErrorBoundary
. Changing the UX would require updating each of those instances with special error handling logic, sinceEuiErrorBoundary
is only capable of rendering the actualError
that's thrown.Ultimately we need to address two questions here:
EuiErrorBoundary
and sharing it as a component for all apps to use so we could control it globally, but I'm sure there are other options we could consider.--
Looping in a few folks who I think will care about this: @clintandrewhall @ryankeairns @sophiec20 @rayafratkina
The text was updated successfully, but these errors were encountered: