Skip to content

Performance is not defined - sentry with NextJS #17343

Closed

Description

@jlkravitz

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

10.2.0

Framework Version

14.0.4

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Ran npx @sentry/wizard@latest -i nextjs --saas --org <ORG> --project <PROJECT>
  2. Ran npm run dev
  3. Opened browser

Expected Result

No error.

Actual Result

I keep getting a performance is not defined error

Image

Activity

  1. linear commented on Aug 6, 2025

    @linear
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 6, 2025
  3. Lms24 commented on Aug 6, 2025

    @Lms24
    Member

    Hey @jlkravitz thanks for writing in! Are you using any Opentelemetry packages or something like @vercel/otel?

    Looks like browser code is imported into the edge build on first glance.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 6, 2025
  5. jlkravitz commented on Aug 6, 2025

    @jlkravitz
    Author

    Hey @Lms24 ! We're not on vercel at all. That said, I tried upgrading to Next 15.x and everything seems OK now? Happy to provide additional details if you'd like to try to debug, but I should be OK for now, despite the continued mystery...

  6. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 6, 2025
  7. Lms24 commented on Aug 7, 2025

    @Lms24
    Member

    hmm, NextJS 14 should still be supported by our SDK in v10. So if there's a bug we should fix it. I'll try to repro this myself for now, just to be sure this doesn't happen on every project. In case I can't reproduce, we either need a reproduction from you, or, if you're happy with the current state on Next 15, I'd rather close this for now (and reopen if anyone else comes across this issue).

    We're not on vercel at all

    Can you tell me more about your build and deployment setup? Are you doing anything special when building?
    UPDTAE: I realized you reported this happening in dev mode already, so likely it's not related to your build.

  8. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 7, 2025
  9. 12 remaining items

  10. andreiborza commented on Aug 14, 2025

    @andreiborza
    Member

    Thanks, that'll help us narrow it down better.

  11. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 14, 2025
  12. khanprog commented on Aug 26, 2025

    @khanprog

    Is there any update on this issue?

  13. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 26, 2025
  14. andreiborza commented on Aug 26, 2025

    @andreiborza
    Member

    Hi, we're still looking into it. cc @chargome

  15. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 26, 2025
  16. chargome commented on Aug 26, 2025

    @chargome
    Member

    Did someone try nuking node_modules and go with a fresh install already?

  17. andreiborza commented on Aug 26, 2025

    @andreiborza
    Member

    Thanks again for the reproduction, can confirm it happens when adding middleware. Look like the edge instrumentation somehow ends up with browser-related imports. Need to dig deeper.

  18. self-assigned this
    on Aug 27, 2025
  19. added a commit that references this issue on Sep 11, 2025
    4f38b4b
  20. github-actions commented on Sep 16, 2025

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #17488, which was included in the 10.12.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions