Closed abhi12299 closed 4 years ago
Not sure exactly, I can't reproduce the issue described.
Please follow the issue template.
https://github.com/zeit/next.js/issues/new/choose
https://github.com/zeit/next.js/issues/new?template=8.Question_about_next.md
# Question about Next.js
GitHub Issues are reserved for Bug reports and Feature requests. The best place to get your question answered is to post it on https://spectrum.chat/next-js.
Hi. If I knew how to reproduce the issue, I would have provided more details. But this happens randomly. Please read the issue description again. It just happens on production. On spectrum, the issue would be left unnoticeable. It's a big problem for me, that's why I raised this issue here.
Similar here any answers or links please?
@kodcuserkan I got this error for a few days without any knowledge of what happened wrong. But it was fixed without any code change after a couple of days.
Hi. If I knew how to reproduce the issue, I would have provided more details. But this happens randomly. Please read the issue description again. It just happens on production. On spectrum, the issue would be left unnoticeable. It's a big problem for me, that's why I raised this issue here.
I get the same error here, app works fine locally but when deployed ( I'm using Heroku as a simple test ) the app loads and yields a 500 on the index page without a stack trace or any other information attached to it.
Exactly on the same place, you get the error
I'm also using getInitialProps
on my Page, also the funny thing is I check the server logs and i cant see the 500 error in the logs.
The error seems to happen without stack trace and without being posted to the console on the client and on the server.
Not sure if it's relevant but I'm using webpackChunkName
when loading 1 of the files, but that's unrelated i guess cause that file loads perfectly.
Also, i can see the index page behaves differently locally and on the deployed server.
On the deployed version on heroku I get 500 error on the index page but on the client, i don't et that error.
Ok so turns out in my case NODE_ENV is being set to "production" even tough Heroku NODE_ENV is set to "staging".
I got to figure out what is messing this up.
@hems Did you find something regarding the issue? It was a real pain for me back then.
@hems Did you find something regarding the issue? It was a real pain for me back then.
I installed source maps and also found a weird error because as i said my NODE_ENV was always "production" even on my staging and production environment..
https://github.com/zeit/next-plugins/tree/master/packages/next-source-maps
Having a similar issue when deploying to Now, client side navigation works fine, but refreshing on certain pages causes a 500, this doesnt happen on heroku, so i assume theres something going on with the Now node environment thats causing this issue, but its hard to find any logs
After checking some more, i notice that the pages that throw a 500 are the ones that have nested/mulitple HOC's around the page. Im using apollo, so am wrapping pages in the withApollo hoc but then have a few layout HOC's as well sometimes.
export default withApollo(SomePage) // Works fine
export default withApollo(withSideBar(SomeOtherPage)) // 500
@JClackett yup, with multiple HOCs I too had this problem.. maybe it has something to do with my implementation but then again, a lot of people have this problem
experiencing this same problem and trying to determine if its cloudflare or next.js related but the error is very vague and no way to reproduce locally or on a QA/Staging environment
yeap, I'm on this boat too
I resorted to not using hocs now, bit annoying but it seems to be the cause
We recently faced this kind of random 500 internal error, it turned out our API server (laravel) triggered API rate-limiting (60 request per minute). Rate limiting response was not logged as an error which made difficult to track the real issue.
Hi, maybe this might help ! I create a file name : next.config.js in root folder (next to package.json) then in next.config.js file, I add : module.exports = { trailingSlash: true, } Hope this can help someone!
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.
Problem: In production build, I get a random 500 server error on production when I refresh a page. It stays there for around 5-10 reloads and then goes away. Client side routing works though. This occurs in my personal website https://iabhishek.dev randomly. On inspection, the following code gives errors randomly (line 290)
Code for my website can be found at https://github.com/abhi12299/website
The following is my code for getInitialProps in
/
page:The
getCookie
function:The
authenticate
function:The
getLatestPosts
function: