Skip to content

NextJS SSR with Vercel not working #12619

@camillevingere

Description

@camillevingere

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

8.9.2

Framework Version

14.2.4

Link to Sentry event

No response

SDK Setup

// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;

Sentry.init({
dsn: SENTRY_DSN || 'DSN',

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,

integrations: [Sentry.prismaIntegration()],

// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.NODE_ENV === 'development',

});

Steps to Reproduce

  1. Take a NextJS project
  2. Deploy in production on Vercel
  3. Don't forget to put env variables

Expected Result

The errors should be logged in Sentry

Actual Result

The errors are logged in local development in CSR and SSR but in production on VERCEL only the CSR is working. All that is an server side error is not logged in Sentry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions