Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 Beta App Router returns 500 Error #1246

Closed
6 tasks done
jalvarado91 opened this issue Jun 12, 2023 · 3 comments
Closed
6 tasks done

V3 Beta App Router returns 500 Error #1246

jalvarado91 opened this issue Jun 12, 2023 · 3 comments
Labels
needs investigation This needs to be investigated further before proceeding

Comments

@jalvarado91
Copy link

jalvarado91 commented Jun 12, 2023

Checklist

Description

After installing the v3 beta in an fresh nextjs app and setting up the api handlers I'm consistently receiving a 500 HTTP Error when visiting any of the handler routes (e.g. /api/auth/login). App only has app router routes, no pages directory. Not using any middleware either.

Nothing is getting logged to the console either. So it's hard to debug.

Seems I'm not the only one. Same error reported here and here.

Screenshot of browser error and console
image

image

Reproduction

  1. I started a new fresh nextjs app with all the defaults (app router checked)
  2. Installed the beta npm i @auth0/nextjs-auth0@beta
  3. Added env vars for my Regular Web Application to .env.local
  4. Set up the auth0 api handler route under app/api/auth/[auth0]/route.ts
  5. Added the UserProvider in the root layout
  6. Add the client component sample from the read me to page.tsx
  7. Start the app and go to http://localhost:3000/api/auth/login and saw the error above

Additional context

N/A

nextjs-auth0 version

3.0.0-beta.0

Next.js version

13.4.5

Node.js version

v16.14.2

@adamjmcgrath
Copy link
Contributor

Thanks for sharing those steps @jalvarado91

This is also failing for me with Node 16 (it's working with Node 18)

I'll investigate and get back to you

@adamjmcgrath adamjmcgrath added the needs investigation This needs to be investigated further before proceeding label Jun 13, 2023
@adamjmcgrath
Copy link
Contributor

ok, I understand the issue and will work on a fix. In the meantime, you can use the Beta with Node 18 & 20

@adamjmcgrath
Copy link
Contributor

fixed in https://github.com/auth0/nextjs-auth0/releases/tag/v3.0.0-beta.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation This needs to be investigated further before proceeding
Projects
None yet
Development

No branches or pull requests

2 participants