Page error: the sleep timer's control missing when the script ran #449
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
2026-11-10 21:25:56 UTC, jason@mcleods.me, Safari on a Mac, through the tunnel:
TypeError: null is not an object (evaluating '$("#sleep").onchange=e=>sleepIn(Number(e.target.value))'),app.js?v=41dfb7156edeline 114 (web/src/player.ts:222).#sleepcame with the sleep timer (#429, 2026-11-08), in index.html and player.ts together, so the script was newer than the page it ran in: an older index.html kept (the service worker's/from the PAGE cache when offline, or Safari's back-forward cache) with the new app.js. A throw at load stops the rest of the script, so the page is dead until reloaded. Trace 4e39b8244aafe90d628e415fe80b0bef. Once in the week; found by the prod check.Fixed in
373f862, deployed to ipx-web 2026-11-14. The service worker now checks a ?v= file it fetches against its name (the first 12 hex digits of its SHA-256, as web/build.mts names it). A page kept from before a deploy that asks for its script by the old hash is no longer given the new script: the worker keeps nothing under the wrong name and loads the page again from the network, at most once in 30 seconds. Test: offline.spec.ts, 'a page older than the script the server sends is loaded again'.