-
Notifications
You must be signed in to change notification settings - Fork 87
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
Node.js exits with error after adding new locale to PWA #1646
Comments
Hi, I used the following setup but the mentioned error cannot be reproduced:
I'm able to switch to nl_NL and all errors in the console are related to REST requests that return a 500 status because the referenced ICM server does not have product or categories data for nl_NL. Remarks:
|
Hi @andreassteinmann |
Hi @gorpet I'm still trying to figure out what might cause the issue. |
Hi @gorpet, I created a temporary branch https://github.com/intershop/intershop-pwa/tree/tmp/new-locale-nl_NL with the changes I made for the new locale nl_NL so you can have a look at it and test it on your side. I used
Changes:
|
If the described error persists, you can try to change the code in src\app\core\utils\translate\icm-translate-loader.ts to use ofType(routerNavigationAction),
first(),
switchMap(() =>
this.localizations.getServerTranslations(lang).pipe(
tap(data => {
this.transferState.set(SSR_TRANSLATIONS, data);
})
)
), to ofType(routerNavigationAction),
take(1),
switchMap(() =>
this.localizations.getServerTranslations(lang).pipe(
tap(data => {
this.transferState.set(SSR_TRANSLATIONS, data);
})
)
), |
Hi @andreassteinmann Thank you again and kind regards, |
@gorpet Maybe we need to change it in the code as well. I need to check this with my colleagues. But until then, you may work with the code changes to Kind regards, |
Hi @andreassteinmann, Kind regards, |
Hi @gorpet, I'm going to delete the temp branch this afternoon. In case you need to keep the changes, just create a backup ;) |
The PR #1652 is created. |
After adding new locale to PWA and backend and try to switch to new locale, error 'no elements in sequence' is thrown and Node.js processes exits.
Actual Behavior
Error 'no elements in sequence' and Node.js process exits
Expected Behavior
Page is loaded with configured and selected locale (e.g. nl_NL)
Steps to Reproduce the Bug
Steps to reproduce the behavior:
Environment Details
Latest PWA 5.1.0
ICM 7.10.41.0 or any version, also this Mock REST response for /configuration endpoint can be used:
Additional Context, like Screenshots, Log File Snippets etc.
AB#96210
The text was updated successfully, but these errors were encountered: