Strange Locale Switching Behavior with NEXT_LOCALE Cookie - Need Help with Debugging
Unanswered
Skipjack tuna posted this in #help-forum
Skipjack tunaOP
Hello everyone,
First, let me share the repository structure:
https://github.com/FrontLeejonghun/next-intl-replace-bug
Current Issue:
Unfortunately, this issue cannot be reproduced in the repository above, but it consistently occurs in my production application. The next-intl and Next.js versions are identical between both environments.
Steps to Reproduce (in my production app):
1. Access the root path
2. Automatically redirects to
3. User switches locale to
4.
Environment Details:
- The issue occurs only in my production application
- Cannot reproduce in a clean repository with identical versions
- next-intl configuration is 100% identical between both environments
- Next.js and next-intl versions match exactly
Important Note:
The application works perfectly fine with
Question:
Has anyone experienced similar behavior with locale switching where the
Any insights into what might cause this discrepancy between environments would be greatly appreciated. I'm particularly curious about what could cause the cookie to flip back and forth and generate those unusual redirect URLs.
Additional Context:
- The behavior is consistent and reproducible in the production environment
- Clean reproduction case works as expected
- Works fine with next-intl v3.11.3
- Looking for debugging strategies or known issues that might cause this
Thank you for your time and any suggestions you might have!


First, let me share the repository structure:
https://github.com/FrontLeejonghun/next-intl-replace-bug
Current Issue:
Unfortunately, this issue cannot be reproduced in the repository above, but it consistently occurs in my production application. The next-intl and Next.js versions are identical between both environments.
Steps to Reproduce (in my production app):
1. Access the root path
/
2. Automatically redirects to
/ko
based on locale detection3. User switches locale to
en
using the locale switcher4.
NEXT_LOCALE
cookie changes: ko
→ en
→ ko
, and in the Network tab, I see a 307 redirect
→ /ko_rsc111
Environment Details:
- The issue occurs only in my production application
- Cannot reproduce in a clean repository with identical versions
- next-intl configuration is 100% identical between both environments
- Next.js and next-intl versions match exactly
Important Note:
The application works perfectly fine with
next-intl: ^3.11.3
, but this issue appears with newer versions.Question:
Has anyone experienced similar behavior with locale switching where the
NEXT_LOCALE
cookie oscillates between values and generates unexpected redirect URLs with suffixes like _rsc111
?Any insights into what might cause this discrepancy between environments would be greatly appreciated. I'm particularly curious about what could cause the cookie to flip back and forth and generate those unusual redirect URLs.
Additional Context:
- The behavior is consistent and reproducible in the production environment
- Clean reproduction case works as expected
- Works fine with next-intl v3.11.3
- Looking for debugging strategies or known issues that might cause this
Thank you for your time and any suggestions you might have!

