Skip to content

Next.js package does not report server and some client errors #3869

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
jsakas opened this issue Aug 4, 2021 · 3 comments
Closed

Next.js package does not report server and some client errors #3869

jsakas opened this issue Aug 4, 2021 · 3 comments
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@jsakas
Copy link

jsakas commented Aug 4, 2021

Package + Version

  • @sentry/nextjs@^6.10.0

Description

I am finding that the Next.js plugin does not report server side errors and some client side errors.

Using create-next-app and @sentry/wizard I have set up the most basic project which is deployed to Vercel. You can find my source code here: https://github.com/jsakas/sentry-next-test

I have three routes:

Only the third example, throwing on button click, works as expected. However this is the most unlikely use case for us. We recently had a unhandled server side exception (in getServerSideProps) which caused our site to crash. This error was not reported by Sentry and our customers ended up notifying our support team of the issue.

Here is the test project: https://sentry.io/organizations/guesthouse/issues/?project=5893235

@onurtemizkan
Copy link
Collaborator

Hi @jsakas. At the moment; a custom _error page is needed to capture both cases you provided.
Tested your project on Vercel with that, and can confirm all three cases are working on @sentry/nextjs: 6.11.0 and next: 11.0.1.

It doesn't seem to be mentioned in the docs, though. I'll open a PR to add a note about those workarounds.

@jsakas
Copy link
Author

jsakas commented Aug 18, 2021

Hi @onurtemizkan thank you for looking at that. I updated our _error page based on the example provided and it works now.

I agree about the docs, I think it should be added possibly on this page: https://docs.sentry.io/platforms/javascript/guides/nextjs/

A high order component wrapper would be cool too to minimize set up.

@github-actions
Copy link
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

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
None yet
Development

No branches or pull requests

2 participants