Skip to content

Using 'experimental-edge' runtime on NextJs pages breaks build on Vercel #7522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
jvidalv opened this issue Mar 20, 2023 · 6 comments
Closed
3 tasks done
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@jvidalv
Copy link

jvidalv commented Mar 20, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/nextjs

SDK Version

7.43.0

Framework Version

13.2.4

Link to Sentry event

No response

SDK Setup

import * as Sentry from '@sentry/nextjs'

Sentry.init({
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
  environment: process.env.NEXT_PUBLIC_VERCEL_ENV ?? 'development',
  tracesSampleRate: 1.0,
  beforeSend(event) {
    if (event.user) {
      // Don't send user's IP address
      delete event.user.ip_address
    }
    return event
  },
  ignoreErrors: []
})

Steps to Reproduce

Having configured:

export const config = {
  runtime: 'experimental-edge'
}

On any given page seems to make sentry crash on build time.

Expected Result

To not crash on build.

Actual Result

image

@AbhiPrasad
Copy link
Member

Looks like @lforst will help take a look, so backlogging for now!

@AbhiPrasad AbhiPrasad added Package: nextjs Issues related to the Sentry Nextjs SDK Status: Backlog labels Mar 20, 2023
@fbjork
Copy link

fbjork commented Jun 23, 2023

Any update on this?

@AbhiPrasad
Copy link
Member

w/ the app directory you now export a runtime variable: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime

Is this still an issue? I guess for the pages directory it might still be. Does removing experimental help?

export const config = {
  runtime: 'edge'
}

@dima-kov
Copy link

hey team! Any updates on this?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Aug 14, 2023
@AbhiPrasad
Copy link
Member

@dima-kov mind opening a new GH issue and filling out the issue template? Going to close this one as experimental-edge is no longer supported/documented by Next.js - the docs use just edge.

export const config = {
  runtime: 'edge'
}

@lforst
Copy link
Contributor

lforst commented Aug 16, 2023

This should be fixed with version 7.64.0 of the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK
Projects
Archived in project
Development

No branches or pull requests

5 participants