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
TypeError on production server (ERR_INVALID_ARG_TYPE) #31471
Comments
I am facing a similar error, though for me it happens even in development. #31478 Curious, do you have a custom |
@jackyef here's my And |
I also am getting this error on pages that have It only fails when running on elastic beanstalk, when I build the app and run it locally it works fine. The We're using next v12.0.0. Hope this is useful! |
Downgrading from next v12.0.0 to next v11.1.2 fixed this! There are quite a few google hits for this error and elastic beanstalk in a variety of contexts so I imagine it's really due to some quirk there. |
Having the same issue making a request to a serverless function on Vercel. We're running next v12.0.4. |
I also had same error, my error situation is in docker container. |
Summary: I built with 12.0.3 and served with 12.0.4, and that caused this problem for me. Upgrading my build environment to 12.0.4 fixes the issue. Details below. I have the exact same issue when attempting to use a production build. I'm not using a custom _document, but my pages all have a custom getServerSideProps method. I built everything using next 12.0.3, but I'm running the build artifacts using next 12.0.4, because of semver and my build pipeline. This is totally broken. Exactly the same code built and worked fine with next 12.0.3 both for building and for serving my nextjs site. Thus I can try two things:
It seems like there is a serious semver mistake in tagging 12.0.4 via semver as being compatible with 12.0.3. Technically, I guess it should be 13.0.0 :-). |
We have the same issue with our build where 12.0.4 and up is breaking our build. It seems like it will get patched in 12.0.8. |
PR #32247 might be related, which is part of @futurepastori could you give |
@balazsorban44 might be! Tried and can't reproduce the error anymore, even after running prod server on versions lower than build target. Closing, thanks! |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
12.0.4
What version of Node.js are you using?
14.17.6
What browser are you using?
Chrome (it doesn't matter)
What operating system are you using?
macOS
How are you deploying your application?
elastic beanstalk
Describe the Bug
Running
next start
after a successful build, the following error happens. Only happens on server-side rendered pages, as client-side rendered pages and navigation work as usual.First time after upgrading Next.js to 12.0.4.
Expected Behavior
Server-side rendering to work.
To Reproduce
Happened only after deployed to an EB environment and could reproduce locally from the exact artifacts generated on deploy time (so I'm afraid I may be the one to blame)
yarn install && yarn build
mkdir dist && zip dist/***.zip -r dist .next package.json yarn.lock next.config.js public
npm install && npm run start
The text was updated successfully, but these errors were encountered: