Skip to content

SDK throws Exception if integration is undefined #7200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
lucas-zimerman opened this issue Feb 16, 2023 · 1 comment · Fixed by #7204
Closed
3 tasks done

SDK throws Exception if integration is undefined #7200

lucas-zimerman opened this issue Feb 16, 2023 · 1 comment · Fixed by #7204
Labels
Package: core Issues related to the Sentry Core SDK

Comments

@lucas-zimerman
Copy link
Contributor

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/angular

SDK Version

7.37.1

Framework Version

Tested with Sentry Angular and Sentry React

Link to Sentry event

There's no error captured since it happened during the SDK Initialization

SDK Setup

Sentry.init({
  dsn: 'https://[email protected]/5522756',
  replaysOnErrorSampleRate: 1.0,
  integrations: [ 
    new Replay({ stickySession: true, sessionSampleRate: 1.0, blockAllMedia: true }),,
  ],
});

Steps to Reproduce

add ,, into the integration list

Expected Result

  • Sentry may not work but doesn't affect the website loading.

Issue originally appeared by removing some integrations and I didn't notice there was an additional comma on the integration list and I was just wondering why the website wasn't loading.

Actual Result

Website doesn't load, error shows on console:

bootstrap:27 
        
       Uncaught TypeError: Cannot destructure property 'name' of 'currentInstance' as it is undefined.
    at integration.ts:30:1
    at Array.forEach (<anonymous>)
    at filterDuplicates (integration.ts:29:1)
    at getIntegrationsToSetup (integration.ts:66:1)
    at Module.init (sdk.ts:123:1)
    at ./src/index.js (index.js:10:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at startup:7:1
    at startup:7:1

Error seems to be throwing here: https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/integration.ts#L30

@mydea
Copy link
Member

mydea commented Feb 16, 2023

Hey,

we'll take a look if we can handle this more gracefully, thanks for writing in!

@AbhiPrasad AbhiPrasad added Package: core Issues related to the Sentry Core SDK and removed Status: Untriaged labels Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: core Issues related to the Sentry Core SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants