-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Chrome Extension using @sentry/browser or @sentry/react gets rejected #14891
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
Comments
Hello, We will look into this, ideally when using the feedbackIntegration from an NPM package like this it should not have references to the lazy loading code! |
Closes #14891 This PR updates the sync feedback integration to avoid it pulling in the `lazyLoadIntegration` code. This is not really needed and leads to some problems (and also bundle size increase). For this I updated the type signature of `buildFeedbackIntegration` to ensure that _either_ `lazyLoadIntegration` _or_ the getter functions are provided, so we can type-safely use this. We probably also want to backport this to v8 then.
the same issue |
@sankyutang We are usually not notified when comments on closed issues are added. Please consider opening a new issue with more details about your setup. Thank you |
I've just experienced this too |
Similar experince here, any solution so far? Using Parcel. |
I can't find the link, but I read a hack where someone used vite to remove the url or the remote code (CDN link). I did the same with a webpack plugin. It's a hacky solution though |
I fixed it by importing import { captureException } from "@sentry/browser" like this instead of * as sentry. |
Can you add context around this solution? I'm looking to implement this in the short-term. |
@austinulfers you can try this piece of code from my attached sandbox code. |
Thank you. Was able to port this over to webpack in order to get it approved in the chrome store.
Usage:
|
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
8.47.0
Framework Version
18.3.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
As you kindly asked in the previous issue, #14010 (comment), I created a small repo with a reproduction to build a Chrome Extension for the side panel:
https://github.com/FedorT22/sandbox-chrome-extension
Steps to Reproduce
feedbackIntegration
function using@sentry/browser
or@sentry/react
. You can followREADME.md
file in the project./dist/sidePanel.js
anddist/sidePanel.js.map
the piece of code wtih CDN link:const baseURL = (options && options.cdnBaseUrl) || 'https://browser.sentry-cdn.com';\n\n return new URL(`/${SDK_VERSION}/${bundle}.min.js`, baseURL).toString();\n
Expected Result
Extension is approved by the reviewers.
Actual Result
Extension is rejected by the reviewers
The given reason:
The current work-around:
Clear up @sentry CDN links during the build process with a help of patch-package. See more info in the previous issue.
The text was updated successfully, but these errors were encountered: