Skip to content
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

Standalone Feedback CDN bundle doesn't export feedbackIntegration #13080

Closed
3 tasks done
Lms24 opened this issue Jul 29, 2024 · 0 comments · Fixed by #13081
Closed
3 tasks done

Standalone Feedback CDN bundle doesn't export feedbackIntegration #13080

Lms24 opened this issue Jul 29, 2024 · 0 comments · Fixed by #13081
Assignees
Labels

Comments

@Lms24
Copy link
Member

Lms24 commented Jul 29, 2024

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://33f3f99d7064495b95ccacfb9225bbbf@o447951.ingest.us.sentry.io/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants