[bug]: first load after an update shows raw translation keys (service worker serves stale locales)
I maintainer di solito rispondono entro 2 giorni
Una pull request collegata è già stata integrata.
- #9947 di @Pfannkuchensack — integrata
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Start with invokeai/frontend/webv2/src/platform/pwa/sw.js, especially the invokeai-runtime cache and LOCALES_PREFIX handling, then trace locale loading in invokeai/frontend/webv2/src/platform/i18n/client.ts. Reproduce the two-reload behavior after rebuilding and confirm that the first load no longer combines the new bundle with stale locale data. Done means updated locale files are used on the first load after an update while the existing offline behavior remains intact.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is there an existing issue for this problem?
- I have searched the existing issues
Install method
Manual (dev checkout)
Operating system
Windows
GPU vendor
Any (frontend)
Version number
main at de172fa768
Browser
Chromium 14x (Playwright), Chrome
What happened
After updating Invoke, the first page load shows new UI strings as raw translation keys. For example, an icon button's accessible name was models.workingMemory.aboutColumn instead of "About Measured". A second reload fixes it.
Cause (invokeai/frontend/webv2/src/platform/pwa/sw.js):
- The app shell and assets are versioned:
invokeai-shell-${MANIFEST.version}, andASSET_URLSfrom the build manifest. locales/*.jsonare served stale-while-revalidate from the unversionedinvokeai-runtimecache (respondStaleWhileRevalidate, used forLOCALES_PREFIX).src/platform/i18n/client.tsloads them from an unversioned URL (/locales/{{lng}}.json).activateclears old shell caches and stale assets, but not the runtime cache.
So the first load after an update runs the new JS bundle against the previous build's locale file. The background refresh puts the new file into the cache, and only the next load picks it up. The server sends cache-control: no-store for the locale file, but the service worker answers from its own cache before the network is consulted.
What you expected to happen
The first load after an update shows the new build's strings.
How to reproduce the problem
- Open the app once, so the service worker is installed and has cached
locales/en.json. - Add a key to
public/locales/en.jsonand use it in a component, then rebuild (pnpm build) and restart the server. - Reload the page once. The new string renders as its key.
- Reload again. The string is correct.
Additional context
Possible fixes:
- version the locale URL, e.g. a build hash in the file name or a
?v=from the manifest, so the runtime cache misses after an update; - or clear
locales/entries frominvokeai-runtimeinactivatewhen the shell version changes; - or serve locales network-first and fall back to the cache only when offline.
The release case matters most: every update that adds strings shows raw keys to every returning user on their first visit.
- Lingua principale
- TypeScript
- Stelle
- 28.6k
- Fork
- 3k
- Merge medio
- 3g 2h
- PR unite (30g)
- 133
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di invoke-ai/InvokeAI
-
[enhancement]: Bump PyPatchMatch to latestForse già presa @dunkeroni l’ha presa 4 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
invoke-ai/InvokeAI#9826 · 2 reazioni · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
extract_audio_pcm detects "no audio stream" by matching ffmpeg's stderr text, so a wording change turns silent clips into hard errorsForse già presa @wunianze666-netizen l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
[bug]: Sparse gallery can show old requeued images ahead of newer itemsForse già presa @joshistoast l’ha presa oggi. Apertabug
invoke-ai/InvokeAI#9953 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di invoke-ai/InvokeAI
Issue simili
-
DQ assisgnment closing at CRApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
equinor/prisma-decision-web#919 ·
I maintainer di solito rispondono entro 1 giorno
-
[DC] OneLogin sync imports a partial user list when an API request failsForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bitwarden/directory-connector#1276 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
home-assistant/installer#324 ·
I maintainer di solito rispondono entro 1 giorno
-
Mondriaan
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
knaw-huc/textannoviz#733 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno