Offline Packaging Risks

"/home/yossef/notes/git/projects/maplibra/risks/Offline Packaging Risks.md"

path: maplibra/risks/Offline Packaging Risks.md

- **fileName**: Offline Packaging Risks
- **Created on**: 2026-06-16 00:48:42

Offline Packaging Risks

Purpose: Offline-specific bugs and drift points for packaged maps.

Related: ../Home.md, ./Risk Map.md, ../modules/Service Worker and Offline.md, ../modules/Android Bridge.md, ../decisions/Caching Strategy.md

Migrated from: obs_vault

Key Risks

Common Failure Modes

  1. Package opens but routing fails → derived assets missing or stale
  2. Offline basemap blank → PMTiles URL wrong or tiles not cached
  3. Theme drift in offline → static JSON style vs dynamic style mismatch (see ./Offline Basemap Theme Drift.md)
  4. Cache clear doesn't fully reset → service worker still serves stale data

Debugging

  1. Check offline-assets.json matches the build output
  2. Verify sw.js install handler caches the right files
  3. Test with ?clear to force a clean state
  4. Check IndexedDB for stale derived asset entries
  5. Verify CACHED_MVF_SCHEMA_VERSION matches current app version

Important Files