Skip to content

fix(docs): ignore LIDNotifyId, Picture-in-Picture, and XBrowser bridge errors in Sentry - #430

Merged
nickvigilante merged 3 commits into
mainfrom
vigilante/sentry-ignore-lidnotifyid
Dec 4, 2026
Merged

nickvigilante merged 3 commits into
mainfrom
vigilante/sentry-ignore-lidnotifyid

Conversation

@nickvigilante

@nickvigilante nickvigilante commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Merge order

Independent; merges in any order.

Summary

Stops four Sentry issues from alerting. All come from code outside this build and slip past allowUrls because the frame that threw has no URL:

  • DOCS-ENGINE-13: ReferenceError: LIDNotifyId is not defined, 1 event at 2026-12-01 06:45 UTC on /docs/code-server/install.
  • DOCS-ENGINE-14: NotAllowedError: The request is not triggered by a user activation., 1 event at 2026-12-01 09:16 UTC on /docs/ai-coder/agents.
  • DOCS-ENGINE-16: ReferenceError: xbrowser is not defined, 3 events at 2026-12-04 14:41 UTC on /docs/install.
  • DOCS-ENGINE-17: ReferenceError: swbrowser is not defined, 1 event at 2026-12-04 14:41 UTC on /docs/install (same page view and trace as DOCS-ENGINE-16).

Fix

DOCS-ENGINE-13 arrives through global_handlers.onerror with a single frame, <anonymous>:1:1: a host app or browser evaluates a snippet in the page that calls its own undefined LIDNotifyId global. LIDNotifyId appears nowhere in Coder's code, and other sites report the same error (for example exercism/website#12415).

DOCS-ENGINE-14 arrives through onunhandledrejection with a single frame, [native code] requestPictureInPicture: a browser feature or extension asked for Picture-in-Picture on a video in the page without a user gesture. This build never calls requestPictureInPicture, and the existing NotAllowedError filter only covers refused clipboard writes.

DOCS-ENGINE-16 and DOCS-ENGINE-17 come from an Android in-app browser in the XBrowser family, which injects autofill and CSS scripts through evaluateJavascript that call its own missing bridge globals. DOCS-ENGINE-16 arrives through browserapierrors.setTimeout: the throw site is <anonymous> execute_auto_fill, and the only frame with a URL is Sentry's setTimeout wrapper in our chunk, so allowUrls passes. DOCS-ENGINE-17 arrives through global_handlers.onerror with only <anonymous> frames (needInjectCss). Neither global appears in Coder's code, and other projects filter the same errors (for example koala73/worldmonitor#9172 and onetimesecret/onetimesecret#4309).

Each gets an exact ignoreErrors pattern next to the other outside-error filters (one shared (?:sw|x)browser pattern for DOCS-ENGINE-16 and -17), so other undefined globals and other NotAllowedError rejections are still reported.

QA

Nothing to see on the site; the change only affects which client errors are sent to Sentry. After it deploys, DOCS-ENGINE-13, -14, -16 and -17 should get no new events, and other issues in the docs-engine Sentry project keep reporting as before.

Pages to compare

What to check Production Preview
Page loads normally (no visible change expected) https://coder.com/docs/code-server/install/ The branch preview alias for this PR (serves the latest deploy; needs a Vercel login)
Page loads normally, videos still play (no visible change expected) https://coder.com/docs/ai-coder/agents/ The branch preview alias for this PR (serves the latest deploy; needs a Vercel login)
Page loads normally (no visible change expected) https://coder.com/docs/install/ The branch preview alias for this PR (serves the latest deploy; needs a Vercel login)

Testing

New cases in apps/docs/scripts/sentry-filters.test.mjs run each event, with its real frames, through the SDK's own event filter. The LIDNotifyId error, the Picture-in-Picture rejection, and both XBrowser bridge errors are dropped. Other ReferenceErrors from an evaluated script (including near-miss names such as LIDNotifyIdx, zzbrowser and browser) and an unrelated NotAllowedError are kept. Every drop test fails without its filter. On top of current main, pnpm turbo run typecheck lint test --filter=@coder/docs-site passes, as do Oxfmt and Oxlint on the changed files.

Upstream

No. These are Coder-specific Sentry filters, not a Fumadocs change.

Links


🤖 Built with AI assistance.

Some host app or browser evaluates a snippet in the page that calls its own LIDNotifyId global before defining it, and the ReferenceError reaches Sentry through the global onerror handler. The snippet is evaluated rather than loaded, so the only frame is <anonymous>:1:1, which allowUrls skips, and the event passes. Nothing in this build defines or calls LIDNotifyId, and other sites report the same error. Drop that exact message with ignoreErrors; other undefined globals are still reported.

Assisted-by: AI
…in Sentry

A browser feature or extension called requestPictureInPicture on a video in the page without a user gesture, and the browser rejected it with "NotAllowedError: The request is not triggered by a user activation." The only frame is the native requestPictureInPicture, which has no URL for allowUrls to check, so the event passes. This build never calls requestPictureInPicture, and the existing NotAllowedError filter only covers refused clipboard writes. Drop that exact message; other NotAllowedError rejections are still reported.

Assisted-by: AI
@nickvigilante nickvigilante self-assigned this Dec 3, 2026
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
coder-docs Skipped Skipped Dec 4, 2026 3:53pm UTC

Request Review

Android in-app browsers in the XBrowser family inject autofill and CSS scripts via evaluateJavascript that call their own missing xbrowser/swbrowser globals (DOCS-ENGINE-16, DOCS-ENGINE-17). The throw site is <anonymous>, so allowUrls lets them through.
@nickvigilante nickvigilante changed the title fix(docs): ignore LIDNotifyId and Picture-in-Picture errors in Sentry fix(docs): ignore LIDNotifyId, Picture-in-Picture, and XBrowser bridge errors in Sentry Dec 4, 2026
@nickvigilante
nickvigilante marked this pull request as ready for review December 4, 2026 17:14
@nickvigilante
nickvigilante requested a review from a team as a code owner December 4, 2026 17:14

@Jesswinters Jesswinters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nickvigilante
nickvigilante merged commit f892f8d into main Dec 4, 2026
36 of 38 checks passed
@nickvigilante
nickvigilante deleted the vigilante/sentry-ignore-lidnotifyid branch December 4, 2026 17:30

This branch is waiting to be deployed

1 inactive and 1 waiting deployments
docs-preview — cf0e785a Waiting Dec 4, 2026 by nickvigilante via preview / deploy preview #156
Preview — cf0e785a Deployed Dec 4, 2026 by vercel[bot]
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.

2 participants