-
-
Notifications
You must be signed in to change notification settings - Fork 765
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
Translations failing when page is idle for couple of hours #2267
Comments
Hearing this for the first time... |
Yes, I can reproduce it locally. Similar comment was addressed here. Can you confirm if this is needed whenever we need to get translations from getServerSideProps |
seems the way Next.js handles this... yes |
@PreethiVS21 Have you figured out how to fix it? I have also encountered this issue.
|
I've found I can reproduce this locally fairly easily. In our case, we are using a custom Docker image. Simply rebuilding the image and redeploying it is enough to break the translations. Steps:
I can see that Next is fetching a translations file on every page transition. For instance, every time I navigate to Page A, it will fetch Anyways, it seems I need a way to detect that there's a new |
@PreethiVS21 @Sarawut-keng any updates guys? same issue on the same next version 13.5.6 (pages router) @adrai @jgregory-apogee |
@adrai getServerSideProps totally doesnt work after couple of hours, its ok with getStaticProps |
If that's the case you may ask the Next.js team... |
@BrilliantDecision after reviewing the case, I have figured out that @jgregory-apogee ’s comment was correct. After my CD re-deployment, the language broke. I am not sure if this occurs only on the page router. Right now, we do not have the best solution yet. We have just briefed users that we have updated to a new version and that they need to refresh the screen. |
@Sarawut-keng and how do you implement this notification, what do you use for this? how do you understand that you need to refresh the page? some error catcher? |
In my case; we are writing the files by reading from api with json streaming to file system. During writing process, if the file is not fully ready, the i18n instance were reading the broken JSON format. We ensured the write process finish before i18n read the file. |
🐛 Bug Report
in next-i18next version 13.2.2, When translations are rendered using getServerSideProps (next 13.5-pages router) , translations doesn't happen after couple of hours. I can only see key names .
To Reproduce
next-i18next.config.js
index.tsx
Expected behavior
Translations shouldn't fail intermittently
Your Environment
The text was updated successfully, but these errors were encountered: