Error ocurring while trying to acces to my recently deployed NextJs App

I successfully been able to deploy my NextJs app but I’m not able tp get into the page.

It’s showing this when I get into it

On the logs, it says this:

Dec 12, 05:37:43 PM: c532c6c6 ERROR  SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
    at successSteps (node:internal/deps/undici/undici:6636:27)
    at node:internal/deps/undici/undici:1236: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)Dec 12, 05:37:43 PM: c532c6c6 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.] {
  digest: '299492576'
}

Any ideas of what is going on?

By default, our functions run for 10 seconds. Your function is timing out which is why it’s crashing.

Our functions can run for a max of 26 seconds. They are intended to be used in live browser pages, but also, our infrastructure cuts off the connection at 26 seconds, so that is the practical max.

If you think that would be useful, you’d need to upgrade your team to a Pro plan and we can then update the timeout from 10 seconds to 26 seconds for you.

Otherwise, I’d recommend checking out this support guide for tips on optimizing your function:

1 Like

Thanks! I appreciate your help. I’ll update the plan and work around it.

1 Like

Hey,
So after I upgrade and re-deploy my website. I get the following error

Dec 20, 11:34:32 AM: 1b48d040 ERROR  SyntaxError: Unexpected token N in JSON at position 0
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
    at successSteps (node:internal/deps/undici/undici:6636:27)
    at node:internal/deps/undici/undici:1236: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)
Dec 20, 11:34:32 AM: 1b48d040 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.] {
  digest: '1258351392'
}
Dec 20, 11:34:32 AM: 1b48d040 INFO   [GET] /.netlify/functions/___netlify-handler (SSR)
Dec 20, 11:34:32 AM: 1b48d040 Duration: 94.65 ms	Memory Usage: 136 MB

whatever JSON you’re requesting is not a JSON. This is not a Netlify issue. You should check the JSON being requested.