-
Notifications
You must be signed in to change notification settings - Fork 59
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.js middleware not running on 13.4.13 #1266
Comments
I have the same issue here. |
I have same issue nexauth middleware doesn't work with 13.4.19 downgrading to 13.4.12 didn't solve the issue. |
I still have this problem. I have a call with Azure support this evening. Per the documentation at https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-nextjs-hybrid I tried this on Next.js 12.3.2 to no avail. |
Any updates after your call with Azure support? |
I guess it should come as no surprise that support was not helpful. I have been trying to communicate with them for the last 36 hours. The gist was that Next.js support for Azure Static Web Apps is in preview so they can't and won't assist in any way. Including suggesting another best practice for this type of deployment on Azure. I'm working on retooling this for Vercel currently. |
I have this issue as well, and downgrading to 13.4.12 Seems like a caching problem to me, very inconsistent. Logs in app insights don't offer many clues. |
Might be related to these |
It's limited to the edge runtime API but will run in node. I'm using next-auth's middleware, no node APIs. It's working okay for me with 13.4.12 or earlier except on cached SSG pages |
Hi guys, The root cause for middleare to be broken seems to be: Would like to get an update on this from the Azure Statitc Web App Team as middleware is still broken on Azure using Next.js with version greater than 13.4.12. |
Rechecked on 13.5.4 and still an issue. |
I would also suggest this is still an issue since 13.4.13 as well. I've deployed a standalone version of NextJS @ 13.4.12 to Azure SWA - this works fine, however upgrading beyond this results in core JS files returning a 404 - in most cases this appears due to loading assets through /_next/static/chunks/[generated-file].js being proxied and loaded via our generic pages/[...slug].ts path (invoking getStaticProps and returning a 404 when realising it's not a legitimate page slug). This routing issue maybe related to middleware as above, but means we cannot upgrade beyond this point. We're using the 'pages' router for reference, and looking to test with a blank install of NextJS later today. |
Same issue here :( TBH I dont think that the middleware feature fits into the "preview" category. You may use it to work entirely with SSG and i18n all together with App Router and a headless cms at build. Also it is not stated that the middleware is not supported here. @thomasgauvin any suggestion to get this working with the latest version of next(13.5.4)? Thank you in advance :) May help: amplify-hosting It does works as expected for v13.4.11, but downgrading is just not nice :-/ |
It's specifically mentioned as a supported feature on this page. I had some trouble even on 13.4.11/12 using SSG and next-auth :( |
Still an issue with latest next.js 13.5.6. |
any news on this issue? |
As next.js 14 is announced and this is still an issue on azure side I am really considering if we need to move our Next.js web application to some other hosting provider than azure. 😢 |
indeed, this is really a showstopper ☹. |
Any updates? 😔 |
Same issue here :( |
Are there any updates or a roadmap for when this issue may be resolved by the team? I've seen in other threads that infrastructure changes may be required in Azure to more broadly support app based routing, indicating months, though it would be good to have an understanding of this so we can make a decision how to resolve. We've been holding off doing a NextJS upgrade due to the middleware issue in this ticket, however we may need to consider migrating to an alternative platform as a security vulnerability requires an upgrade (see GHSA-c59h-r6p8-q9wc). Please could anyone from the SWA team advise? |
For the preview, Next.js support is limited on Azure Static Web Apps for versions 13 and above, including the app router and React Server Components. We are actively working on our Next.js story and iterating, and expect to have a few updates in the first half of 2024. For the moment though, if a more reliable solution is needed, App Service or Container Apps may be possible solutions. |
It would be nice to have that disclaimer about version 13 before, like 3 months ago.... at least thank you for the feedback and making clear that at least Static HTML export is fully supported. |
Hi folks! This issue is now resolved with our improvements to Next.js support on Static Web Apps, with support for Next.js 13 & 14 and server features. I'll be closing this thread, please try out the newest improvements and let us know how it goes in the announcement thread: #1428 |
Describe the bug
I have a working middleware.ts in Next.js that stopped working when I updated Next.js to 13.4.13. I am deploying the app as a static web app. Downgrading to 13.4.12 resolves the issue.
The text was updated successfully, but these errors were encountered: