Sentry-javascript: "Cannot read property 'name' of null" in 5.6.1

Created on 12 Aug 2019  路  8Comments  路  Source: getsentry/sentry-javascript

Package + Version

  • [x] @sentry/browser
  • [ ] @sentry/node
  • [ ] raven-js
  • [ ] raven-node _(raven for node)_
  • [ ] other:

Version:

5.6.1

Description

Error caught in production. I don't have any way to reproduce.

Error:

TypeError: Cannot read property 'name' of null
  at _computeStackTrace(./node_modules/@sentry/browser/esm/tracekit.js:763:22)
  at _traceKitWindowOnUnhandledRejection(./node_modules/@sentry/browser/esm/tracekit.js:208:30)

Source:

     }
        }
        catch (e) { }
        return {
            original: ex,
>>>         name: ex.name,
            message: ex.message,
            mode: 'failed',
        };
    }
    computeStackTrace._augmentStackTraceWithInitialElement = _augmentStackTraceWithInitialElement;

Link to the event: https://sentry.io/share/issue/a9e9f18d850148f8bf4ef445be0840b0/

Needs Triage

Most helpful comment

raven-js v3 has been changed/evolved/fixed in the timeframe of over 3 years and it had very small API surface, providing not even half of the features we have in the new version. Not to mention support for typescript, es6 modules, multiple builds and so on, so on. That's why it was battle-tested.

Also, it was mostly used in pre-2018 (when we started to migrate toward v4+). JS changed a lot since then, and it in itself cases more and more troubles.

Anyway, this bug is not even caused by our piece of code, but that's totally fine, as we depend on it. I'll patch it and release on Monday.

Cheers!

All 8 comments

Also experiencing this issue with latest version of @sentry/browser

Having the same issue on production builds only, happens once after a build/deployment. Refreshing fixes it - except on safari.

My issue is very similar to the 2 above! Just updated and now get this issue continuously.

/OT/

I have to say I'm flabbergasted with bugs/release ratio since raven-js - which was production-proven piece of stack, which could be plugged-in and forgotten for months or years to come. These days there are practically no stable releases anymoar, despite approaching v6.0 pretty soon if current trend continues...

What happened to Sentry? Did fancy illustrations become more important than well-thought, quality-driven code?

raven-js v3 has been changed/evolved/fixed in the timeframe of over 3 years and it had very small API surface, providing not even half of the features we have in the new version. Not to mention support for typescript, es6 modules, multiple builds and so on, so on. That's why it was battle-tested.

Also, it was mostly used in pre-2018 (when we started to migrate toward v4+). JS changed a lot since then, and it in itself cases more and more troubles.

Anyway, this bug is not even caused by our piece of code, but that's totally fine, as we depend on it. I'll patch it and release on Monday.

Cheers!

Thanks @kamilogorek!

The issue was caused by rejecting null/undefined values in promises, eg. Promise.reject(null).
Fix pending: https://github.com/getsentry/sentry-javascript/pull/2207

Released in 5.6.2

Was this page helpful?
0 / 5 - 0 ratings