Skip to content

[Next.js]: Sentry should not catch trackDynamicDataAccessed #11969

Closed

Description

@typeofweb

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

When Partial Prerendering (PPR) is enabled, using APIs that opt into Dynamic Rendering like cookies, headers, or fetch (such as with cache: 'no-store' or revalidate: 0) will cause React to throw a special error object to know which part of the page cannot be statically generated - while still letting the rest of it be partially static. If you catch this error, it is not safe for us to generate any static data, and your build will fail.

https://nextjs.org/docs/messages/ppr-caught-error

Expected Result

This error is not caught and not reported to Sentry.

Actual Result

This error is caught and reported in Sentry

Product Area

Other

Link

No response

DSN

https://3fe190d9390c9209bdd921874ff01078@o4507230795923456.ingest.us.sentry.io/4507230797955072

Version

No response

Activity

  1. getsantry commented on May 10, 2024

    @getsantry

    Assigning to @getsentry/support for routing ⏲️

  2. transferred this issue fromgetsentry/sentryon May 10, 2024
  3. moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 3on May 10, 2024
  4. lforst commented on May 10, 2024

    @lforst
    Contributor

    Thanks for reporting. We'll look into it! Would you mind sharing your Next.js version, and how to reproduce this? (Normally our issue template asks for this but you opened this in the Sentry product repo instead of the SDK repo) Thanks!

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 10, 2024
  6. typeofweb commented on May 10, 2024

    @typeofweb
    Author

    Next.js version is 14.3.0-canary.53 (only canary versions support PPR).

    To reproduce, enable PPR and create a page that uses params and searchParams. See: https://github.com/typeofweb/sentry-nextjs-bug-repro

  7. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 10, 2024
  8. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 14, 2024
  9. AbhiPrasad commented on May 27, 2024

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions