Next.js Discord

Discord Forum

Tracking down application error: client side error has occured

Unanswered
Hilsa shad posted this in #help-forum
Open in Discord
Hilsa shadOP
I'm running next 12.3 @ vercel with the pages directory, my website has around 50k users and all of a sudden a very small portion of users seem to be getting the classic "Application error: a client side exception occured". I had a bug previously where some browsers did not support certain datetime functions, but that ended up getting fixed. I can't for the life of me remember how I figured it out, but running google analytics made me realize again that some users are getting this error again.

Any suggestions on how I could track this down, besides perhaps using sentry?
I have:
Google Analytics (I can identify that the page is being shown from the "popular titles" tab)
Microsoft Clarity (which thus far I can't really figure out how to use for this purpose)
Vercel Web Analytics

But yeah, so far.. not easy. Didn't vercel analytics use to point out certain insights? I recall I used to be able to see info related to this, but I might be wrong.

1 Reply

Hilsa shadOP
As an alternative, would there be some try-catch-way of solving this, where I would be able to run a function whenever next wants to show the client side exception-page?
This is what the next docs say:
Exactly how would that be done?