Skip to content

Local variables issue: The inspector session is already connected #10278

@alfaproject

Description

@alfaproject

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

7.94.1

Framework Version

node 20.10

Link to Sentry event

https://the-mill-adventure.sentry.io/issues/4896658537/events/e2ccbd047eb44463ba3af8035a1ccd95/

SDK Setup

  init({
    dsn: getEnvString('SENTRY_DSN'),
    environment: appStage(),
    includeLocalVariables: appEnv() === 'dev',
    integrations: [new AWSServices(), new ExtraErrorData(), new Mongo()],
    normalizeDepth: 5,
    beforeSend(event, { originalException: error }) {
      if ((error as { skipReport?: boolean }).skipReport) {
        return null;
      }

      if (appEnv() === 'dev' && appStage() !== 'ci-master') {
        return limitRepetitiveSentryAlerts()(event);
      }

      return event;
    },
  });

Steps to Reproduce

Set includeLocalVariables to true in Sentry init as per blog post

Expected Result

Local variables work

Actual Result

Keep getting the error in the title and linked Sentry event

Metadata

Metadata

Assignees

Labels

Package: nodeIssues related to the Sentry Node SDK

Type

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions