Skip to content

Standalone Feedback CDN bundle doesn't export feedbackIntegration #13080

Closed
@Lms24

Description

@Lms24

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser via CDN + Feedback integration CDN bundle

SDK Version

8.20.0

Framework Version

N/A

Link to Sentry event

N/A

Reproduction Example/SDK Setup

<script src="https://browser.sentry-cdn.com/8.20.0/bundle.js"></script>
<script src="https://browser.sentry-cdn.com/8.20.0/feedback.js"></script>
<script>
  Sentry.init({
    dsn: "https://[email protected]/4504689757257728.",
    integrations: [
      Sentry.feedbackIntegration({
        // Additional SDK configuration goes in here, for example:
        colorScheme: "system",
      }),
    ],
    debug: true,
  });
</script>

Steps to Reproduce

  1. Add non-feedback SDK CDN bundle
  2. Add standalone/addon feedback integration CDN bundle
  3. Register feedbackIntegration in Sentry.init as instructed in the docs
  4. Observe warning in browser console

Expected Result

Feedback integration should work as expected

Actual Result

This was originally reported by @stayallive in Discord but I can reproduce it as well in a simple test app.

It seems like the feedback addon bundle is missing the feedbackIntegration export as we only define this export in the browser package to differ between which SDK artifact should get sync (npm) and async (cdn SDK bundle) versions by default.

This causes the shim class on window.Sentry.feedbackIntegration to not be overwritten by the addon bundle as in the other integrations. Instead, the shim warning is thrown in the console:

You are using feedbackIntegration() even though this bundle does not include feedback.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions