Skip to content

Cannot create property 'sdk' on boolean 'false' #3518

Description

@edwh

Package + Version

  • @sentry/browser 6.2.5
  • @sentry/node 6.2.5
  • @nuxtjs/sentry: 5.0.3

(This is not quite the latest version of the Sentry modules, but I think it's the latest nuxt wrapping of them.)

Description

I see many errors like this:

Cannot create property 'sdk' on boolean 'false'

The error is in the sentry code, here:

function enhanceEventWithSdkInfo(event, sdkInfo) {
    if (!sdkInfo) {
        return event;
    }
    event.sdk = event.sdk || {
        name: sdkInfo.name,
        version: sdkInfo.version,
    };

I don't know why event should be false, but it doesn't look robust against that possibility. If it was, then I might find out more about the underlying error.

An example: https://sentry.io/organizations/freegle/issues/2379888684/

I don't have a standalone repro for this, but I see it about ten times a day on a live system, so I can test things fairly easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions