Skip to content

fix(browser): Allow SDK initialization in NW.js apps #12846

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

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 10, 2024

Looks like our browser extension check that blocks SDK initalization via Sentry.init also blocked initializing
the SDK in NW.js apps. This PR adds a check for the window.nw property to handle this case.

Note: If we get more reports like this, we should consider adding a flag to force-init the SDK when this
check wrongfully blocks sdk init. For now though, I wanna hold off from expanding public API.

fixes #12668

@Lms24 Lms24 requested a review from s1gr1d July 10, 2024 09:22
@Lms24 Lms24 enabled auto-merge (squash) July 10, 2024 09:28
@Lms24 Lms24 self-assigned this Jul 10, 2024
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.31 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) 33.45 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.2 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.53 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.27 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.89 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.75 KB (+0.02% 🔺)
@sentry/browser (incl. metrics) 26.59 KB (+0.05% 🔺)
@sentry/browser (incl. Feedback) 38.98 KB (+0.03% 🔺)
@sentry/browser (incl. sendFeedback) 26.92 KB (+0.04% 🔺)
@sentry/browser (incl. FeedbackAsync) 31.54 KB (+0.03% 🔺)
@sentry/react 25.05 KB (+0.06% 🔺)
@sentry/react (incl. Tracing) 36.49 KB (+0.04% 🔺)
@sentry/vue 26.41 KB (+0.05% 🔺)
@sentry/vue (incl. Tracing) 35.31 KB (+0.04% 🔺)
@sentry/svelte 22.44 KB (+0.07% 🔺)
CDN Bundle 23.52 KB (+0.05% 🔺)
CDN Bundle (incl. Tracing) 35.21 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.31 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.51 KB (+0.02% 🔺)
CDN Bundle - uncompressed 69.02 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 104.04 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 214.43 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 227.15 KB (+0.01% 🔺)
@sentry/nextjs (client) 36.37 KB (+0.04% 🔺)
@sentry/sveltekit (client) 34.1 KB (+0.04% 🔺)
@sentry/node 130.79 KB (0%)
@sentry/node - without tracing 91.88 KB (0%)
@sentry/aws-serverless 117.05 KB (0%)

@Lms24 Lms24 merged commit afef63e into develop Jul 10, 2024
116 checks passed
@Lms24 Lms24 deleted the lms/fix-browser-exclude-nw-from-extension-check branch July 10, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sentry detects a NW.js app as a browser extension and refuses to load
3 participants