-
Notifications
You must be signed in to change notification settings - Fork 0
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
Some errors are not reported to sentry #1491
Comments
Take another look at Sentry nextjs integration. See if we can use the default integration/configuration. |
I reproduced the error locally by visiting http://localhost:3000/Parts/MacBook_Pro/Display_Components?p=-1%20OR%203%2B947-947-1%3D0%2B0%2B0%2B1 The error showed up in Sentry: https://ifixit.sentry.io/share/issue/745ff599eeaa4e808e025e86d9ae2ee7/ |
That means this issue only happens on Vercel. I turned on debug logging when we initialize sentry with Sentry.init({
debug: true,
...
}); and it gave a hint:
I don't think edge.config was available when we first installed Sentry. Pull incoming! |
FYI I've also seen this when an invalid Algolia filter is specified in a ProductList. #1399 |
Nice find. Yea I think any invalid algolia param has the potential to tank the app react-commerce/frontend/components/common/InstantSearchProvider.tsx Lines 231 to 235 in bd710d8
|
This seems very similar to our case, where errors in |
Made an issue on sentry's repo: getsentry/sentry-javascript#7602 @danielbeardsley's hunch was right, the errors are reported on Vercel for synchronous errors, but not async ones. |
FYI we do our best to handle this ourselves in PHP: We wrap all sentry integration logic with a try-catch: If we get an error while trying to report an error. We push the new error into the same sentry event: In case it is unclear: Sentry allows more than one error per single |
After a bit of experimentation (#1504, #1522), I'm loosing hope that we can do anything in our app code to catch unhandled promise rejections before vercel terminates the process. Hopefully the Sentry team takes this on soon, since it affects everyone using Next.js data fetching methods on Vercel (getsentry/sentry-javascript#7602). |
I'm gonna play with this a bit. |
Oh boy... I had always wondered how they possibly could capture scope in an async environment... but it turns out they ..... don't. There's a lot going on in this thread: getsentry/sentry-javascript#4071 with lots of ideas, discussions, experimentation, ... but it's not a solved problem (issue has been open for years). Update:
|
I've done more experimentation and can say that yes vercel terminates the next.js process (or at least the request) immediately and our rejection handler never runs. I've opened a case with vercel:
I see this message at the end of the logs when an unhandled rejection happens:
Generated by this branch |
2 weeks later Vercel gets back to me and doesn't even read the content of my short message to them. This is there reply (from a "Senior Customer success engineer").
Sooo... I don't have much hope that they'll actually respond nor even address the problem... |
I've created a data-dog "monitor" to watch for error logs: https://app.datadoghq.com/monitors/119860918 This should alert us if we get these type of errors (that aren't reported to Sentry) |
Go figure... vercel responded with:
|
Some errors like those below aren't being repoted to sentry.
Bad url params resulted in a 500 (#1492 -- issue to fix that bug), but it wasn't reported to sentry. What else are we missing?
Do This
Ensure all errors are reported to sentry.
The text was updated successfully, but these errors were encountered: