diff --git a/packages/web/src/main.ts b/packages/web/src/main.ts index b78f317..0ad479c 100644 --- a/packages/web/src/main.ts +++ b/packages/web/src/main.ts @@ -4,7 +4,14 @@ import * as Sentry from "@sentry/browser"; // Errors only — no tracing, no replay. Without a DSN baked at build time // (VITE_SENTRY_DSN in .env.production) this is entirely inert. if (import.meta.env.VITE_SENTRY_DSN) { - Sentry.init({ dsn: import.meta.env.VITE_SENTRY_DSN, environment: "production" }); + Sentry.init({ + dsn: import.meta.env.VITE_SENTRY_DSN, + environment: "production", + // Facebook's in-app browser injects its own scripts (iabjs://) and + // reports their failures as ours when the page unloads. + denyUrls: [/^iabjs:\/\//], + ignoreErrors: ["Java object is gone"], + }); } // A page loaded before a deploy may ask for a chunk the deploy retired.