Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

255
Vistas
React Sentry TypeError: Cannot read properties of undefined (reading 'componentStack')

I am trying to use the ErrorBoundry component of Sentry in my react project so that I can contain the errors reported to sentry just for my React app as it lives on many different websites and I don't want to pick up every JS error on every web page and website.

However, every error that is bubbling up from my react app into the ErrorBoundry produces a very obscure and uninformative error such as TypeError: Cannot read properties of undefined (reading 'componentStack')

The actual error without the ErrorBoundry component should be TypeError: Cannot read properties of undefined (reading '0')

It seems like the componentStack is overriding and preventing any useful reporting as per these two images with the ErrorBoundy disabled and enabled respectively. These images are taken from my dev environment and I am the CRACO version.

ErrorBoundry component added enter image description here

ErrorBoundry component removed enter image description here

Code references.

ReactDOM.render(
    <Sentry.ErrorBoundary fallback={<ErrorFallback />}>
      <ApolloProvider client={client}>
        <App shop={shop} customiserId={customiserId} />
      </ApolloProvider>
    </Sentry.ErrorBoundary>,
    customiser
  );

with a fallback component that looks like

const ErrorFallback = () => {
  return (
    <div>An error has occurred</div>
  )
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda