From 5c956c24bbb8ff900f7c3423a7f38ce45abcd9f6 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Mon, 7 Sep 2026 15:31:33 -0500 Subject: [PATCH] Sentry ignores the in-app browser's own scripts Facebook's Android browser injects a performance logger under iabjs:// and its bridge dies on unload; the error wore our name (WIZWAR-6). Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG --- packages/web/src/main.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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.