-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
locales getting mixed on simultaneous requests #1219
Comments
Thanks for reporting! I just bumped into the same issue while playwright testing using concurrent workers. I'm happy to provide more details if it helps to debug and fix this issue |
Any solution you found? Any updates? @cassus |
Hi, the workarounds I found was adding retries to our playwright tests or using the built version of our app to run the tests instead of the dev server |
Any one else faced? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of this package are you using?
2.0.1
What operating system, Node.js, and npm version?
node 16.20.0
npm 8.19.4
next 13.4.19
What happened?
locales of pages getting mixed. This issue could be also replicated in demo project(next-vernac)clone git@github.com:aralroca/next-translate.git
Make a server component and add any promise to it as below
import useTranslation from "next-translate/useTranslation";
export default async function Title() {
const { t, lang } = useTranslation("common");
const res = await delay();
return (
<>
{t("title")}
</>
);
}
function delay() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(1);
}, 0.8);
});
}
Now call this title in page.js.
Simultaneously hit two locales of this page(localhost:3000 and localhost:3000/es) fastly. To hit 2 request at same time on local i did following
one request from browser and one using script, the lcoales will get mixed on english page spanish will be visible
What did you expect to happen?
The locales should remain same.
Are you willing to submit a pull request to fix this bug?
no
The text was updated successfully, but these errors were encountered: