ERR_TOO_MANY_REDIRECTS
Answered
LeonTM posted this in #help-forum
LeonTMOP
Yes I know I am posting about a browser error, but I keep having this error across multiple browsers. So firstly, my nextjs app in development mode is running on http://localhost:3000/ but since a few weeks it keeps getting this weird error: "ERR_TOO_MANY_REDIRECTS". This is just a chrome specific browser, but if try the Zen Browser which is based on Firefox not on Chrome I am getting a different error which says the page is not working properly. I tried fixing the error as the Google Chrome docs suggested but it did not fix it. For those who do not know it has something too do with website data and the docs tell you to remove all of which from Chrome, this is not helping. Does anyone know how to fix it or what the problem might or where I can get help for it, because due to this annoying error message I can check the front page of my app. Thanks
Answered by Southern rough shrimp
Show your package.json, and also if you have a middleware.ts, what does it look like.
10 Replies
LeonTMOP
For what?
@LeonTM For what?
for example for ddos protection. Are you using cloudflare?
LeonTMOP
No I am not using cloudflare in any kind of way
But what could be the cause of the problem then?
@LeonTM But what could be the cause of the problem then?
it may have to do with your middleware, translations, hostings, ... there can be many places where the issue comes from. Finding the cause of the issue is too much effort for me, sorry
American black bear
You are getting the same error, it's just that browsers report it differently.
Look for bugs in your middleware as it is the most common cause or some other redirect loop.
@LeonTM Yes I know I am posting about a browser error, but I keep having this error across multiple browsers. So firstly, my nextjs app in development mode is running on http://localhost:3000/ but since a few weeks it keeps getting this weird error: "ERR_TOO_MANY_REDIRECTS". This is just a chrome specific browser, but if try the Zen Browser which is based on Firefox not on Chrome I am getting a different error which says the page is not working properly. I tried fixing the error as the Google Chrome docs suggested but it did not fix it. For those who do not know it has something too do with website data and the docs tell you to remove all of which from Chrome, this is not helping. Does anyone know how to fix it or what the problem might or where I can get help for it, because due to this annoying error message I can check the front page of my app. Thanks
Southern rough shrimp
Show your package.json, and also if you have a middleware.ts, what does it look like.
Answer
LeonTMOP
It was my middleware, not it is working again. It had an old feature still being used. Thanks for you help