You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The companion app is a WKWebView with no service worker (App-Bound Domains are not configured), so it relies entirely on WKWebView's HTTP cache. After an HA update it can load a stale index.html that imports the previous build's hashed JS, which is now deleted → 404 → broken / white screen. Because there's no SW and the frontend bundle failed to load, the frontend can't self-heal on its own here.
Today's native mitigations are reactive (serverVersionDidChange) and time-based (the ~3-day cleanFrontendAssetCacheIfNeeded purge). They can lose the cold-start race — e.g. when the app and core update together and the new version was already recorded, no version-delta fires and the stale HTML loads first. (Matches #3738.)
Change
Proactively purge the frontend asset cache before the first WKWebView load whenever the stored server version differs from the last-seen version, closing the cold-start race (rather than reacting after the stale HTML has already loaded).
Part of the epic: home-assistant/epics#113 (home-assistant/frontend)
Problem
The companion app is a WKWebView with no service worker (App-Bound Domains are not configured), so it relies entirely on WKWebView's HTTP cache. After an HA update it can load a stale
index.htmlthat imports the previous build's hashed JS, which is now deleted →404→ broken / white screen. Because there's no SW and the frontend bundle failed to load, the frontend can't self-heal on its own here.Today's native mitigations are reactive (
serverVersionDidChange) and time-based (the ~3-daycleanFrontendAssetCacheIfNeededpurge). They can lose the cold-start race — e.g. when the app and core update together and the new version was already recorded, no version-delta fires and the stale HTML loads first. (Matches #3738.)Change
frontend/reload_and_clear_cache) that clears the WKWebView caches and reloads, so the frontend's boot-recovery guard can delegate cache clearing to the native app. (Frontend side tracked under Frontend can fail to load after an update (stale cached index.html → deleted hashed JS 404) epics#113.)Acceptance criteria