-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Package: browserIssues related to the Sentry Browser SDKIssues related to the Sentry Browser SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/browser
SDK Version
8.12.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
import * as Sentry from '@sentry/browser';
Sentry.init({
dsn: "[redacted]"
});
Steps to Reproduce
- Create a NW.js app.
- Install Sentry in it.
Expected Result
Sentry loads and functions normally.
Actual Result
Chromium devtools console shows error "You cannot run Sentry this way in a browser extension". Sentry doesn't load. Modifying the function shouldShowBrowserExtensionError() in sdk.js causes Sentry to function normally.
For example, replacing the last line in that function with this code causes Sentry to work:
// Running in NW.js, which appears like a browser extension but isn't
const isNWjs = (typeof nw !== "undefined");
return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;Reactions are currently unavailable
Metadata
Metadata
Labels
Package: browserIssues related to the Sentry Browser SDKIssues related to the Sentry Browser SDK
Projects
Status
No status