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

Running NextJS dev with auth0 fails with cryptic error #1414

Closed
6 tasks done
alexng353 opened this issue Sep 4, 2023 · 2 comments
Closed
6 tasks done

Running NextJS dev with auth0 fails with cryptic error #1414

alexng353 opened this issue Sep 4, 2023 · 2 comments

Comments

@alexng353
Copy link

alexng353 commented Sep 4, 2023

Checklist

Description

I'm getting the error

[0] CallbackHandlerError: Callback handler failed. CAUSE: access_denied (Cannot find module 'request@2.56.0'
[0] Require stack:
[0] - /data/io/node18/d96ddb4d-b67e-4d90-bf5b-788cda40d4b0/webtask.js)
[0]     at eval (webpack-internal:///(rsc)/./node_modules/@auth0/nextjs-auth0/dist/handlers/callback.js:60:19)
[0]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[0]     at async eval (webpack-internal:///(rsc)/./node_modules/@auth0/nextjs-auth0/dist/handlers/auth.js:59:24)
[0]     at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:236:37) {
[0]   code: 'ERR_CALLBACK_HANDLER_FAILURE',
[0]   cause: IdentityProviderError: access_denied (Cannot find module 'request@2.56.0'
[0]   Require stack:
[0]   - /data/io/node18/d96ddb4d-b67e-4d90-bf5b-788cda40d4b0/webtask.js)
[0]       at NodeClient.callback (webpack-internal:///(rsc)/./node_modules/@auth0/nextjs-auth0/dist/auth0-session/client/node-client.js:133:23)
[0]       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[0]       at async eval (webpack-internal:///(rsc)/./node_modules/@auth0/nextjs-auth0/dist/auth0-session/handlers/callback.js:40:29)
[0]       at async eval (webpack-internal:///(rsc)/./node_modules/@auth0/nextjs-auth0/dist/handlers/callback.js:57:13)
[0]       at async eval (webpack-internal:///(rsc)/./node_modules/@auth0/nextjs-auth0/dist/handlers/auth.js:59:24)
[0]       at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:236:37) {
[0]     error: 'access_denied',
[0]     errorDescription: 'Cannot find module '[email protected]'\n' +
[0]       'Require stack:\n' +
[0]       '- /data/io/node18/d96ddb4d-b67e-4d90-bf5b-788cda40d4b0/webtask.js',
[0]     status: 400,
[0]     statusCode: 400,
[0]     openIdState: { returnTo: 'http://localhost:3000' }
[0]   },
[0]   status: 400
[0] }

Every time I try to log in on dev mode in any nextjs application on my computer (generic windows pc). This error also occurs on my laptop (macbook air m2)

image

Reproduction

  1. Try to log in
  2. Login fails with cryptic error

Additional context

Nothing, the screen capture I took shows the sample project from the checklist failing in the exact same way, with a fresh install from npm.

nextjs-auth0 version

3.1.0

Next.js version

13.4.19

Node.js version

18.17.1, 16.20.1, 20.5.1

@adamjmcgrath
Copy link
Contributor

Hi @alexng353 - thanks for raising this

cause: IdentityProviderError: access_denied (Cannot find module '[email protected]'

This error means that you have a rule in Auth0 failing because it can't find the request module.

There is a known issue with the Auth0 account linking rule - more info, including a fix, here #1384

@alexng353
Copy link
Author

a fix, here #1384

Thank you so much for the information! I'm going to try your suggested fix now. Once again, thank you so much for the help, and sorry for the duplicate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants