Next.js Discord

Discord Forum

Where to lookup error digests

Answered
Polar bear posted this in #help-forum
Open in Discord
Avatar
Polar bearOP
I have an issue that only surfaces when my app is deployed and not in development. I get the following error:
Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.


That error occurs when using a next link to navigate to some of my pages. If I hard reload after the error the page loads properly.

I don't see any errors in my runtime logs. Also the digest is not printed along with the error message. I managed to get a debugger placed in the browser and can inspect the error and get the digest property. But now that I have the error digest I can't figure out how to decode it or where to look for corresponding logs in the vercel runtime logs. Any pointers are appreciated. Feel like I'm missing something obvious at this point. Been trying for hours to get an actual error message
Answered by Polar bear
I never ended up figuring out what the root cause was here, but after trying various things, the issue resolved when I removed a route group that was wrapping the pages that were failing client side navigation
View full answer

9 Replies

Avatar
Clown
Doesn't the error digest get printed in your browser console? Or on the server logs?
Also a custom error.js file would probably recieve the digest and error itself too
Avatar
Polar bearOP
the client gets the sanitized version pasted above when deployed and I can't reproduce locally. I've been scouring the runtime logs and can't find any errors that correlate. Hoping I can map the error digest to something meaningful but haven't found any resources to do that
Avatar
Clown
Thing is, the digest is basically something that can be used to find the related logs to the problem in the server side logs. So you have to copy and match the digest hash to the logs in the server side.
I don't know why exactly nothing is being logged tho
(server side logs are NOT your browser console logs)
Avatar
Polar bearOP
yup understand that they are distinct. but don't see where the digests are in the server logs. My suspicion is its blowing up somewhere in the next routing / layout machinery which is why I'm not seeing error logs from my server functions
Avatar
Polar bearOP
I never ended up figuring out what the root cause was here, but after trying various things, the issue resolved when I removed a route group that was wrapping the pages that were failing client side navigation
Answer
Avatar
risky
good to hear you solved it eventually, even if you didn't find the root cause