Skip to content

Bug: old-bundle version skew breaks lazy routes after every demo deploy — no vite:preloadError handler, no recovery for removed-function calls #3089

Open

Description

@larryro

Problem

Every deploy replaces the hashed /assets/*.js chunks, so tabs still running an older bundle break when they lazy-load a route/component. Recurring since March, most recently 2026-08-25. With the current release cadence (0.4.13 → 0.4.15 within ~2 days) any long-lived demo tab hits this often.

Evidence (GlitchTip, demo.tale.dev)

  • TALE-PROJECT-11S — Failed to fetch dynamically imported module: …/assets/document-preview-markdown-EkkZh2dU.js, 2026-08-25 08:31, tab tagged release: 0.4.13 while demo was already on 0.4.14+ (proof of skew). User was on the tasks board opening a document preview → feature dead until manual reload.
  • TALE-PROJECT-OG / TALE-PROJECT-OF — same for agent-catalog and workforce-dashboard chunks (2026-07-06); TALE-PROJECT-NB (plan-pane, May); TALE-PROJECT-CF (vendor-core fetch failure, Mar–May).
  • Same class, API flavor: TALE-PROJECT-OV — Could not find public function for 'sso_providers/queries:isSsoConfigured', 9 events 2026-07-07 → 2026-08-22: old bundles keep calling a function removed in the sso_providers → enterprise_sso refactor.

Gaps at HEAD (verified 2026-08-25, a275aea)

  • No vite:preloadError listener anywhere in services/platform/app — Vite fires this exact event on dynamic-import failure and it goes unhandled, so the route just crashes.
  • No client recovery when the backend reports Could not find public function (stale bundle calling a removed/renamed Convex function).
  • Old-release assets are not retained, so a skewed tab has no chance of loading its chunks.

Proposed fix

  1. Global window.addEventListener('vite:preloadError', …) in the app entry: one-shot auto-reload (guard against reload loops, e.g. sessionStorage flag) or a "new version available — reload" toast. This is the standard Vite pattern and removes the user-facing breakage regardless of asset retention.
  2. Treat client-side Could not find public function Convex errors as the same signal → same reload prompt path.
  3. Optional hardening: retain the previous release's hashed assets in the served image (tale-proxy/platform static dir) so in-flight sessions keep working across one deploy.

Verification

After the next two deploys, the Failed to fetch dynamically imported module family and TALE-PROJECT-OV stop accruing events (or are replaced by clean reloads). Once quiet, resolve those GlitchTip groups.


Filed by the GlitchTip triage sweep of demo.tale.dev (2026-08-28). Tracked on the tale board as TAL-10 — "Old-bundle version skew breaks lazy routes after every demo deploy — handle vite:preloadError + removed-function calls" (status: todo).

Activity

  1. added
    priority: medium
    bug
    service: platform
    automated
    on Aug 28, 2026
  2. larryro commented on Aug 29, 2026

    @larryro
    ContributorAuthor

    GlitchTip freshness update (2026-08-29 sweep) — the removed-function flavor recurred today, superseding this issue's "no new skew events since filing (OV last 08-22)" note.

    TALE-PROJECT-OV Could not find public function for 'sso_providers/queries:isSsoConfigured' is now at 11 events, latest 2026-08-29T16:47:37Z — two fresh server-observed query calls today at 16:44:33Z and 16:47:37Z (request ids 77b10d5412a89f4f, e6e2ce59c6495618). The sampled event history shows a steady ~weekly trickle rather than a one-off: 08-11 ×3, 08-16, 08-22, 08-29 ×2 — stale clients keep calling a function removed in the sso_providers → enterprise_sso refactor seven-plus weeks on.

    Timing note: today's two OV events landed minutes before the 16:53:10Z same-second Unauthenticated burst across groups OK/OJ/11L (#3088's stale-session signature) — consistent with one very old client session reconnecting and replaying both its removed-function call and its dead-session subscriptions.

    Implication for the fix: a bundle this old can't be saved by retaining the previous release's assets (proposed hardening item 3) — the client-side recovery path for Could not find public function (fix item 2: same reload-prompt path as vite:preloadError) is what closes this flavor.

    Tracked as TAL-9's sibling task TAL-10 on the tale board (matching comment posted there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    automatedbugpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions