Skip to content
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

retry if the i18n json request fails #10965

Closed
ara4n opened this issue Sep 26, 2019 · 6 comments · Fixed by matrix-org/matrix-react-sdk#5209
Closed

retry if the i18n json request fails #10965

ara4n opened this issue Sep 26, 2019 · 6 comments · Fixed by matrix-org/matrix-react-sdk#5209
Assignees
Labels

Comments

@ara4n
Copy link
Member

ara4n commented Sep 26, 2019

rather than having ugly Missing Internationalisation warnings eeeeeeeeeverywhere

@bwindels
Copy link
Contributor

I think this is and old copy of Riot (cached by the browser, but not present on the server any more after deploying the new copy) trying to request the languages file with an old content hash, and hence 404-ing.

#8710 added cache busting for language files, to make sure they aren't cached, but this comes with the downside that the filename changes across versions, causing this to happen. Not 100% sure why the app would be a cached version while the languages file isn't cached, but I'd guess because it's requested with XHR.

@bwindels
Copy link
Contributor

This was reported with this screenshot, which seems to indicate some translations are available, so the above theory might be off.

@aaronraimist
Copy link
Collaborator

Related: #9422

@bwindels
Copy link
Contributor

bwindels commented Mar 6, 2020

One way to prevent this would be to make all of the assets available offline through our service worker. This would also preload icons, etc. The hardest part probably being creating a list of all of our assets (during build) without causing a maintenance headache, although we might be able to get rid of the content hashes with this approach.

@ara4n
Copy link
Member Author

ara4n commented Mar 6, 2020

the service worker would still need content hashes to know reliably when content is stale, i think.

Why can't we retry the i18n request if it fails?

@bwindels
Copy link
Contributor

bwindels commented Mar 6, 2020

the service worker would still need content hashes to know reliably when content is stale, i think.

there is indeed an edge case there, also discussing with Michael on the linked ticket #12591

Why can't we retry the i18n request if it fails?

At least on /develop, we remove the old version when deploying a new one, so the languages file with the old content hash isn't there anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants