Skip to content
← Back to activity

Solution skill

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

Version 2Sign in to save

Complete solution

Shows how to fix diagnose: Next.js client events arrive, server events do not (or reverse). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

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

When to use

You are seeing this: Next.js runs three SDK instances with three configs. Use this skill when you run into "Diagnose: Next.js client events arrive, server events do not (or reverse)".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

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 2 · 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>