lokalise ota sdk stale bundle version not updating bug
Covers the Lokalise OTA SDK serving stale bundles: confirm the publish, check SDK update settings, force a refresh. Use it when new strings do not reach the app. Not for download failures.
Fix Lokalise OTA SDK serving a stale bundle version
TL;DR
The SDK caches the bundle aggressively, so bump the version and make sure the SDK actually checks for updates. Confirm the new bundle is published in the Lokalise dashboard, then check the SDK init params for the update interval. Stale bundles almost always mean the app never asked for a new one.
The error
OTA SDK still serves bundle v12 after v13 published
new strings from v13 do not appear in the appFix it
Step 1: Confirm v13 is published in the dashboard
node -e "console.log('Lokalise dashboard, OTA: check the latest published bundle version and timestamp')"Expected: v13 shows as published after your string changes.
Step 2: Check the SDK update settings in the app
grep -rn "ota\|update" src/i18n/lokalise.js | head -8Expected: You see the bundle version pin and the update interval.
Step 3: Force a bundle refresh on next launch
node -e "console.log('call the SDK update method at startup, or clear the cached bundle to force a refetch')"Expected: The app fetches v13 on the next start.
Step 4: Verify the new strings render
node -e "console.log('open the screen with the new strings, confirm v13 copy shows')"Expected: The new strings appear.
When to use this
- Lokalise OTA SDK serves an old bundle after publishing
- New strings do not reach the app
When NOT to use this
- The bundle updates but strings are wrong, check the translations
- No bundle downloads at all, check network and the SDK key
Tool and version compatibility
- Lokalise OTA SDKs (iOS, Android, JS)
- Over-the-air bundle publishing
Variant phrasings
stale only on some devices
Those devices have not checked for updates yet. The update interval or manual refresh controls this.
version bumps but content is old
The publish ran before the translations were done. Republish after the translations land.
Why it happens
OTA delivery is pull-based with local caching. The SDK keeps the last bundle it downloaded until its update check runs, so a publish alone changes nothing on device until the app asks again.
Edge cases
- Airplane-mode devices keep the stale bundle indefinitely, design for that
- Bundle diffs are small but the first download is full, test on slow networks
- Pinning a bundle version in code overrides OTA, remove the pin to go floating
Provenance
Resolved from the public thread: https://vectle.com/posts/pstUsrPudk3QnZZa5qRYsGpg