-
Notifications
You must be signed in to change notification settings - Fork 115
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
Nextjs ^13.4.0 500 errors #3466
Comments
I also am experiencing this with app id: |
I'm having the same problem too. With a fresh installation using Nextjs 13.4.1 and got error 500 from server. |
I am having the same error whether I use the pages router (supported by AWS Amplify) or App router (not supposed to be supported at this time by AWS Amplify) - TypeError: handler is not a function 2023-05-07T17:22:15.936-07:00 START RequestId: 81f2ee95-f6a5-404a-a48e-f09629d615bd Version: $LATEST 2023-05-07T17:22:15.937-07:00 [x-amplify-log][WARN] Skipping duplicate span name=RuntimeTotal 2023-05-07T17:22:15.937-07:00 [x-amplify-log][INFO] TRACING RequestId: 81f2ee95-f6a5-404a-a48e-f09629d615bd TraceId: Root=1-645840b7-70ab5d08110208c8005ad833 2023-05-07T17:22:15.937-07:00 [x-amplify-log][INFO] handling request host=127.0.0.1 port=3000 path_and_query=/ headers=x-forwarded-for: 174.72.31.68, 64.252.71.210, x-forwarded-proto: https, x-forwarded-port: 443, host: main.d3ugeayt2y6c7h.amplifyapp.com, x-amzn-trace-id: Root=1-645840b7-70ab5d08110208c8005ad833, user-agent: Amazon CloudFront, x-amz-cf-id: vHOkZ7XXtrKsT-CCBXyZFmsIa7kYfokuQ9hGGbiT6dhdyXKnvBXrdA==, accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7, via: redacted (64), accept-encoding: gzip, sec-ch-ua: redacted (66), sec-ch-ua-mobile: redacted (2), sec-ch-ua-platform: redacted (7), upgrade-insecure-requests: redacted (1), sec-fetch-site: redacted (10), sec-fetch-mode: redacted (8), sec-fetch-user: redacted (2), sec-fetch-dest: redacted (8), cloudfront-viewer-country: US 2023-05-07T17:22:15.996-07:00 TypeError: handler is not a function 2023-05-07T17:22:15.996-07:00 at Server. (/tmp/app/server.js:29:11) 2023-05-07T17:22:15.996-07:00 at Server.emit (node:events:513:28) 2023-05-07T17:22:15.996-07:00 at parserOnIncoming (node:_http_server:998:12) 2023-05-07T17:22:15.996-07:00 at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) 2023-05-07T17:22:16.000-07:00 [x-amplify-log][INFO] app response status_code=500 Internal Server Error headers=date: Mon, 08 May 2023 00:22:15 GMT, connection: keep-alive, keep-alive: redacted (9), content-length: 21, x-amplify-internal-request-id: 81f2ee95-f6a5-404a-a48e-f09629d615bd, x-amplify-internal-metrics: CustomerServerReadinessCheck;dur=177, RuntimeTotal;dur=258, RuntimeInitialization;dur=191, CustomerServerCall;dur=62 2023-05-07T17:22:16.016-07:00 REPORT RequestId: 81f2ee95-f6a5-404a-a48e-f09629d615bd Duration: 80.30 ms Billed Duration: 81 ms Memory Size: 1024 MB Max Memory Used: 74 MB In |
Got the same issue. Tried downgrading the Next.js packages, but it will still not work. |
I downgrading next because I was thinking this was related to next@13.4.1. So I went back to next@13.3.5 which was working before and I got the same results as @espenbye has already pointed out, internal error is present on next versions that were working just fine a couple of days ago. Seems like error is happening also on next@13.2 as you can find here #3467 and #3468. |
What's your package manager ? Using pnpm with symlinks broke our apps. We're now using another mode to avoid symlinks as a hot fix #3467 |
Tried downgrading to |
off topic: IMO 13.2.4 was the last solid nextjs release, been buggy since then (talking about core nextjs, not including beta stuff like fonts, app dir, metadata, swc). I assume it's because of the edge stuff they're pushing. |
Hi folks, thanks for opening/engaging on this issue. We are currently working on root causing this behavior and determining next steps. If you haven't already done so, please provide your App IDs so that we can investigate further. We will update this issue shortly. Thank you! |
🙌🏼 AppId: d3pgmzdoktuvon |
drk0c55ymjt56 Thanks! |
👋🏽 Just giving an update here. We have reproduced this behavior with version 13.4.1. Downgrading to 13.2.4 mitigated the issue, but we see that did work for some folks though. We are continuing to root cause and determine mitigation steps. |
This issue is reproducible with Next.js versions 13.4.0 and 13.4.1. The latest release of Next.js where this issue does not occur is 13.3.4. If you haven't tried already, please downgrade to 13.3.4 or an early version of Next.js as a workaround. |
@abepuentes I see you tried to downgrade to 13.3.5, can you try version 13.3.4 instead? |
@espenbye you can try another method of downgrading. Please follow these steps to add a package version override to your Amplify application: https://docs.aws.amazon.com/amplify/latest/userguide/custom-build-image.html#setup-live-updates Be sure to select |
Thanks! Will try that. Also, I just downloaded the artifacts from the last build (where my package.json has next set to 13.2.4) and had a look at node_modules/next - package.json there still says 13.4.1 👀 Seems to be cached somewhere - is there a way to invalidate it? |
@espenbye I see. Try removing that path from your build settings:
|
@hloriii Strange.. Tried both removing that and also specifying Next.js version under "Live package updates". Build artifact has the correct version in the root ( Edit: My bad. I thought I just could update the version number in package.json and run npm install. But that did not result in the correct version in package-lock.json. Pushed a new build now with the downgraded version, so hopefully that will fix it. 🤞🏼Thanks! |
Can confirm downgrading worked. 👍🏻 With |
My last build with 13.3 worked perfectly fine. Now wth 13.4.1 it stopped working. App ID: d3q4rozm6753hp By when will this issue be fixed? |
Same Issue, I have tried with 13.2.3, 13.2.4, 13.3.4 and 14.x.x App ID: d3m86055xwbko8 // reproduced Internal Server Error continuously. App ID: d3g1kvlu663ue6 // randomly occuring This issue mainly occurs when deploying a new build. working perfectly fine on older deployed projects. |
@hloriii thanks for the info, 13.3.4 its working fine with some minor issues. About 13.4.1, could be this related? vercel/next.js#49536 |
Hi, this issue is indeed related vercel/next.js#49536 . Looks like a regression was introduced on Next.js v13.4.0 on this commit: vercel/next.js@83b774e. We have submitted a PR with a recommended fix: vercel/next.js#49548. |
@ferdingler thanks for your comment and PR, let's hope some of the owners at next like @shuding could have some time to review it soon. Also seems like this vercel/next.js#49338 is related |
Downgrade for me also works, I use "next": "^13.2.4". I have had a talk with AWS support they say: Due to the Next latest version 13.4.X was just released 6 days ago, is facing some incompatibility issues, they don't have a date to solve this, so I chose to downgrade the NextJS version. |
vercel/next.js#49548 is approved so it should likely come out in 13.4.2 (or 13.5.0, whatever it ends up being) |
Hi everyone, next 13.4.2 canary 6 has the fix of this, thanks again to @ferdingler for his PR. |
works! big thanks to the Amplify team, very impressive response |
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Next.js 13.4.2 is now released and fixes this isssue. Thank you @ferdingler ! |
Before opening, please confirm:
App Id
d3vbomo5vhow60
AWS Region
us-east-1
Amplify Hosting feature
Deployments
Describe the bug
Updating the nextjs dependency from 13.3.4 to 13.4.0 or 13.4.1 results in 500 error responses
Expected behavior
I'd expect amplify-hosted sites to function like it does with 13.3.4
Reproduction steps
Build Settings
No response
Log output
Additional information
I see it failing for all 6 apps. Runs fine locally and in github actions.
The text was updated successfully, but these errors were encountered: