javascript - What is a digest property? - Stack Overflow

I am new to using NextJS and am trying to get my first project up in production. But I am seeing this e

I am new to using NextJS and am trying to get my first project up in production. But I am seeing this error:

Application error: a client-side exception has occurred (see the browser console for more information).
Digest: 4266806755

It seems to me like this digest property should be able to be inspected in some way, but I cannot find information on how to do this.

What is this digest property and how would I go about using it to troubleshoot my issue?

Of course it works perfectly well when testing locally using my localhost. But when I am running my code in production I saw the above error. Upon inspection of the container running my code, I see

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)
    at successSteps (node:internal/deps/undici/undici:6545:27)
    at node:internal/deps/undici/undici:1211:60
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)
    at successSteps (node:internal/deps/undici/undici:6545:27)
    at node:internal/deps/undici/undici:1211:60
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[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.] {
  digest: '4266806755'
}

I am expecting to see no errors. But since I see this one, I would like to be able to inspect the error.

I am new to using NextJS and am trying to get my first project up in production. But I am seeing this error:

Application error: a client-side exception has occurred (see the browser console for more information).
Digest: 4266806755

It seems to me like this digest property should be able to be inspected in some way, but I cannot find information on how to do this.

What is this digest property and how would I go about using it to troubleshoot my issue?

Of course it works perfectly well when testing locally using my localhost. But when I am running my code in production I saw the above error. Upon inspection of the container running my code, I see

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)
    at successSteps (node:internal/deps/undici/undici:6545:27)
    at node:internal/deps/undici/undici:1211:60
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)
    at successSteps (node:internal/deps/undici/undici:6545:27)
    at node:internal/deps/undici/undici:1211:60
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[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.] {
  digest: '4266806755'
}

I am expecting to see no errors. But since I see this one, I would like to be able to inspect the error.

Share Improve this question edited Aug 20, 2023 at 17:13 j08691 208k32 gold badges269 silver badges280 bronze badges asked Jul 18, 2023 at 14:13 Sam GriffithSam Griffith 851 silver badge5 bronze badges 1
  • The error's pretty clear in what you need to do: The specific message is omitted in production builds to avoid leaking sensitive details so run the same steps on your development/staging instance to see the real error. – Mike 'Pomax' Kamermans Commented Aug 20, 2023 at 17:24
Add a ment  | 

1 Answer 1

Reset to default 3

Here is your answer in the NextJS docs. Other than that, I don't know what or where the problem is in your code. Time to debug :)

https://nextjs/docs/app/building-your-application/routing/error-handling#handling-server-errors

But in case you don't understand, you need to go through your server-side logs, and match the digest hash that is in the error message with the same hash in the logs, to find where the error happened at exactly.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744857973a4597521.html

相关推荐

  • javascript - What is a digest property? - Stack Overflow

    I am new to using NextJS and am trying to get my first project up in production. But I am seeing this e

    2天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信