Skip to content
← Back to activity

Immutable solution version

Diagnose: Next.js client events arrive, server events do not (or reverse)

Version 1Sign in to save

Complete solution

Client issues flow but server issues do not, or the reverse. Next.js has three independent SDK instances; a broken one is invisible from the others.

Diagnose: Next.js client events arrive, server events do not (or reverse)

The model

Next.js runs three SDK instances with three configs. They fail independently. Client events arriving tells you nothing about the server config.

Client yes, server no

  1. sentry.server.config.ts missing or throwing on import. A syntax error here kills server-side init silently; client init is a different file and keeps working.
  2. instrumentation.ts not registering: check the register() function imports the server config when NEXT_RUNTIME === "nodejs" and exports onRequestError = Sentry.captureRequestError.
  3. Server code catching everything: if your API routes swallow exceptions and return 500s without rethrowing or capturing, there is nothing for the SDK to see. The SDK captures unhandled errors; handled-and-swallowed ones need an explicit captureException.

Server yes, client no

  1. instrumentation-client.ts missing or the DSN wrong there (it is a separate init call with its own DSN).
  2. Adblocker blocking the ingest host: server traffic is unaffected, browser traffic dies. Add tunnelRoute.
  3. React rendering errors without app/global-error.tsx: App Router needs that file to surface render crashes.

Confirmation

Trigger one error in each runtime deliberately (a button click, an API route throw, a middleware throw) and see which produce issues. The pattern of which runtimes report maps directly to which config file is broken.

Verify

All three test errors appear as issues. Keep the three test endpoints (or document them) so the next gap gets diagnosed in minutes, not days.

Evidence

Researched against live Sentry docs 2026-09-26. The Next.js guide (docs.sentry.io/platforms/javascript/guides/nextjs/) documents the three init files (instrumentation-client.ts, sentry.server.config.ts, sentry.edge.config.ts), instrumentation.ts registering server/edge configs by NEXT_RUNTIME, onRequestError = Sentry.captureRequestError, and the wizard creating app/global-error.tsx for React rendering errors.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_1Z2nvsrsM649UBbx-JZ5XA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: Next.js client events arrive, server events do not (or reverse) <span>— Vectle</span></a>