How can I debug "An error occurred in the Server Components render."?
Answered
South Polar Skua posted this in #help-forum
South Polar SkuaOP
Client Logs:
This error occurs only on Vercel and not locally. How can I debug such errors?
Vercel server error logs are empty and the client logs are omitted.
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.This error occurs only on Vercel and not locally. How can I debug such errors?
Vercel server error logs are empty and the client logs are omitted.
Answered by Arinji
well its 2 things if you get a error, a normal prod error or something weird with vercel itself
1) Normal Prod Error can be found in the vercel logs or doing a local prod build
2) Something weird with vercel can be found in the vercel logs
For 2 if that dosent work + the local prod build.. only other thing you can do is log out errors till you find whats breaking vercel
1) Normal Prod Error can be found in the vercel logs or doing a local prod build
2) Something weird with vercel can be found in the vercel logs
For 2 if that dosent work + the local prod build.. only other thing you can do is log out errors till you find whats breaking vercel
13 Replies
Dwarf Hotot
Hey my friend @South Polar Skua , have you solved this problem?
I'm facing a strange behavior with error.tsx ... when I run the project with yarn dev it works perfectly, I can get the error message and display the correct error ui depending on the type of error, but when I yarn build && yarn start, I only get a generic error message like "an error occurred in a server component ...." and I lost the hability to display the correct message based on the type of the message ... is it maybe that error boundaries are no meant to be used like this ?
I'm facing a strange behavior with error.tsx ... when I run the project with yarn dev it works perfectly, I can get the error message and display the correct error ui depending on the type of error, but when I yarn build && yarn start, I only get a generic error message like "an error occurred in a server component ...." and I lost the hability to display the correct message based on the type of the message ... is it maybe that error boundaries are no meant to be used like this ?
@Dwarf Hotot Hey my friend <@812808333999996968> , have you solved this problem?
I'm facing a strange behavior with error.tsx ... when I run the project with yarn dev it works perfectly, I can get the error message and display the correct error ui depending on the type of error, but when I yarn build && yarn start, I only get a generic error message like "an error occurred in a server component ...." and I lost the hability to display the correct message based on the type of the message ... is it maybe that error boundaries are no meant to be used like this ?
i am having the same issue
something strange going on inside error.tsx
i got the same problem
and when i click on the "Homepage" button which is a Link component, which directs to the index page
i am showed a complete white page
did some research, couldnt find the solution, if u did, please tell
something strange going on inside error.tsx
i got the same problem
and when i click on the "Homepage" button which is a Link component, which directs to the index page
i am showed a complete white page
did some research, couldnt find the solution, if u did, please tell
------the main headache is
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.now idea how to fix this
i removed the digest property off the props
but it didnt work
South Polar SkuaOP
I haven't found a solution, but also didn't need to investigate further. However, my next step would've been to use vercel's cli to simulate a vercel env on my machine.
@South Polar Skua vercel is just prod
you can do a prod build locally
npm run build
npm run start
South Polar SkuaOP
Nope, that didn't raise the error. I think it had something to do with caching or a race-condition of some kind.
hm yea probably something with vercel's edge network then.. if you cant find the issue on the vercel logs, the best bet is to console log around till you find whats breaking
@South Polar Skua Nope, that didn't raise the error. I think it had something to do with caching or a race-condition of some kind.
Would you consider your question solved?
South Polar SkuaOP
So, if I understand correctly:
It's not possible to somehow debug such errors and get the real error that was hidden if deployed in Vercel? Only with console logs?
It's not possible to somehow debug such errors and get the real error that was hidden if deployed in Vercel? Only with console logs?
@South Polar Skua So, if I understand correctly:
It's not possible to somehow debug such errors and get the real error that was hidden if deployed in Vercel? Only with console logs?
well its 2 things if you get a error, a normal prod error or something weird with vercel itself
1) Normal Prod Error can be found in the vercel logs or doing a local prod build
2) Something weird with vercel can be found in the vercel logs
For 2 if that dosent work + the local prod build.. only other thing you can do is log out errors till you find whats breaking vercel
1) Normal Prod Error can be found in the vercel logs or doing a local prod build
2) Something weird with vercel can be found in the vercel logs
For 2 if that dosent work + the local prod build.. only other thing you can do is log out errors till you find whats breaking vercel
Answer