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

Next 12.2.0 breaks middleware support #4806

Closed
EvHaus opened this issue Jul 1, 2022 · 2 comments
Closed

Next 12.2.0 breaks middleware support #4806

EvHaus opened this issue Jul 1, 2022 · 2 comments
Labels
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@EvHaus
Copy link

EvHaus commented Jul 1, 2022

Environment

System:
OS: Linux 5.10 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish)
CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
Memory: 26.90 GB / 31.32 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 17.8.0 - ~/.nvm/versions/node/v17.8.0/bin/node
Yarn: 3.2.1 - ~/.nvm/versions/node/v17.8.0/bin/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v17.8.0/bin/npm
npmPackages:
next: 12.2.0 => 12.2.0
next-auth: 4.7.0 => 4.7.0
react: 18.2.0 => 18.2.0

Reproduction URL

Will add shortly

Describe the issue

After upgrading to Next 12.2.0, following the upgrade guide and reviewing the next-auth docs I'm seeing the following warning when running my Next app with next-auth middleware installed:

You're using a Node.js API (process.versions at line: 6) which is not supported in the Edge Runtime that Middleware uses.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

It seeems like perhaps some of the internals of next-auth aren't supported in the new Edge Runtime that Next 12.2.0 middleware uses.

How to reproduce

  • Clone the next-auth boilerplate example
  • Add a middleware.ts file to the root
  • Insert this in the middleware.ts file:
export { default } from "next-auth/middleware"
  • Run the app and visit a restricted route. Check the terminal output.

Expected behavior

No warnings in the console related to next-auth.

@EvHaus EvHaus added the triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. label Jul 1, 2022
@EvHaus
Copy link
Author

EvHaus commented Jul 1, 2022

Can't reproduce anymore (not sure why). Closing...

@EvHaus EvHaus closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2022
@belgattitude
Copy link
Contributor

@EvHaus I've been hit too. Opened a P/R here: #5372.

Can't reproduce anymore (not sure why). Closing...

I guess you've recreated a new lock file and updated jose lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

2 participants