-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Next.js App Router support roadmap #6726
Comments
Are there any hacks that folks working with Next.js 13 "app directory"-based applications could use in the meantime? I tried something similar to what @fernandops26 reported in this issue, in addition to having a client component in |
Leaving a note to say we're super happy to test this out on our app, if you wanted someone to test-run any docs/feature-branches before you release it more widely! |
@mpereira The newest version of the SDK will track errors that happen on the client-side. The server-side is in progress but still needs some work. I haven't really experimented with a hack for the server-side but I think you can just call Sentry.init somewhere in a server component and it should start tracking errors that happen (haven't even tried that though). |
@lawrencejones We will happily take you up on that! Thanks! It's usually the biggest challenge to consider all the edge cases people have in their apps when pushing updates to the Next.js SDK which is admittedly quite deep reaching. We're planning on releasing server-side support soon. We can publish an alpha version for that and could ping you to try it out if that works for you. |
Just seen your replies: this all sounds great, very keen on the alpha! Since my last message I'd noticed a new patch version including the client side changes and upgraded our app to use them. I'm seen errors and traces reported to Sentry from the client, so looks like you've nailed that part (not seeing them from our production Vercel deployment but I think that's a config issue on our side). Just let me know when you have something ready and I'll get right on it. |
I'm seeing client side errors on my self hosted next.js deployment (not vercel). Thanks for the update! |
I'm seeing this error actually, since pulling in the latest version: #5667 Anyone know of a fix? edit: I should add, I'm seeing it on the client, in the browser console. On both dev and prod. |
@switz in version 7.33.0? |
yeah
|
@switz hm, can you share your Sentry.init calls? Thanks! |
@lawrencejones We just released a new beta version of the SDK with server-side While shouldn't capture any errors happening in server components automatically yet, it should allow you to call the Sentry API (like |
Hey team 👋 getting back on the next.js/webpack/Sentry train this afternoon, so going to give the beta version a whirl and let you know how things go. |
Just upgraded and tried this out. I don't know if I'm doing this wrong, but adding this to my server component isn't creating new Sentries:
Curiously, just throwing the error in the SSR component does trigger a Sentry:
This is all running in dev mode. Will test it with a production build now, see if that makes any difference. |
@lawrencejones Yeah that's just how Next.js is propagating server component errors to the frontend. May I ask for the error that's not reported ('what a pretty pig'), do you happen to have an error boundary in place? |
@lawrencejones weird, on my end captureException works but just throwing doesn't :D wondering what might be going on here... |
Is there any guidance as to how to set up the new |
@StevenLangbroek We have yet to build proper instrumentation for it. It's being tracked here: #7181 In the meanwhile you should just be able to call |
@mo-u410 please open a separate issue with reproduction steps. Thanks! |
Will do! Opened here |
app directory 0 config route handlers auto-instrumentation: https://changelog.getsentry.com/announcements/nextjs-sdk-now-supports-route-handlers |
How did you resolved it? |
This comment was marked as duplicate.
This comment was marked as duplicate.
It appears that |
Hey @nghiepdev, could you open a GitHub issue and fill out the template so we can start to investigate? Your next config + Next.js version is the biggest things we need to help here. Is this just a warning, or does it block builds as well? Do you notice anything about runtime with it? Thanks! |
@AbhiPrasad I'm seeing the same as @nghiepdev. Opened an issue here since it's been a while and I don't think another issue was opened: #9120 |
app
directory support roadmap
For the most part, the Next.js App Router is now fully supported. Thanks for your continuous feedback and support in trying out new features! There are still a few upstream shortcomings that we need to iron out with Meta and Vercel, namely:
Moving forward, if you spot any gaps in instrumentation, please let us know here, or feel free to open a new issue in this repository. Thanks! |
Note: You can already start using the Sentry Next.js SDK with Next.js 13 and the app directory. We add more features/fixes as time goes on.
For ideas, questions and discussions go here: #7999
What?
Relates to: #6290
We would like to provide first-class support for the Next.js 13
app
directory.How?
The following things need to be done to support the
app
directory, ordered by priority:Tasks
NEXT_REDIRECT
andNEXT_NOT_FOUND
errors in Next.js app dir #7641error.js
files #7181The text was updated successfully, but these errors were encountered: