question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Edge runtime giving 500 error on vercel with route groups

See original GitHub issue

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.2.0: Sun Oct 16 18:11:16 PDT 2022; root:xnu-8792.60.32.0.1~11/RELEASE_ARM64_T8103 Binaries: Node: 16.17.1 npm: 8.15.0 Yarn: 1.22.18 pnpm: 7.1.0 Relevant packages: next: 13.0.2-canary.0 eslint-config-next: N/A react: N/A react-dom: N/A

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Vercel

Describe the Bug

When deploying with vercel, every page within a group gives a 500 error, in my app i’m using group to provide an error boundary in root pages.

I also tried to see this on the app-dir example provided by nextjs, and it seems to bug on the route groups.

The logs in vercel show this :

2022-11-02T21:52:33.790Z	4e64120d-d3e0-4fa3-9cb5-a32e7802f79b	ERROR	ReferenceError: self is not defined
    at Object.<anonymous> (/var/task/webapp/.next/server/app/(root)/page.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.requirePage (/var/task/node_modules/.pnpm/next@13.0.1-canary.1_yh4i277f6ufllgtdszlodalmum/node_modules/next/dist/server/require.js:88:12)
    at /var/task/node_modules/.pnpm/next@13.0.1-canary.1_yh4i277f6ufllgtdszlodalmum/node_modules/next/dist/server/load-components.js:37:73
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  page: '/'
}
RequestId: 4e64120d-d3e0-4fa3-9cb5-a32e7802f79b Error: Runtime exited with error: exit status 1
Runtime.ExitError

Expected Behavior

It should not throw an error… (i think ?)

Link to reproduction

https://github.com/Fredkiss3/nextjs-13-react-router-contacts

To Reproduce

Go to the the website, you can deploy to your vercel account or go to the website url (you will only the 500 error though). Or go to this example : http://app-directory-next-13.vercel.app/ then go to the route groups you will see the same error.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
spencerbeggscommented, Nov 19, 2022

Please accept my sincerest apologies for trying to help.

1reaction
Fredkiss3commented, Nov 19, 2022

@Winwardo yes the problem is that the issue was about route groups and not i18n and i don’t see what is the relation between those two, and like you i didn’t use i18n.

Right now it isn’t a pain for me since i don’t really use vercel to deploy my nextjs projects, but feel free to open another issue. Maybe that one will be picked by nextjs core team.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors – Vercel Docs
500: Internal Server Error Code: EDGE_FUNCTION_INVOCATION_FAILED. A common cause for this issue is when the application contains an unhandled exception.
Read more >
Vercel causes 500: Internal Server Error (works on localhost)
Mine works locally and gives me a 500 on Vercel as well. I have deduced that my issue is coming from a 413...
Read more >
500 Internal Server Error on Vercel Deploy - Reddit
Hi all, I deployed an app to Vercel and it built successfully. However, when I go to the URL, it just says "500...
Read more >
504 Gateway Timeout from Backend Server | Apigee Edge
This error response indicates that the client did not receive a timely response from Apigee Edge or the backend server during the execution ......
Read more >
next.config.js: Redirects
Redirects are not applied to client-side routing ( Link , router.push ), unless Middleware is present and matches the path. When a redirect...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found