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
{{ message }}
Repository navigation
[Bug]: Android app crashes - createPack() throwing error while downloading and app crashes on getPacks() #4230
For offline usage, we create and download regions using MapboxGL.offlineManager.createPack(), and then access the downloaded regions using MapboxGL.offlineManager.getPacks() to display the map and calculate routes in offline mode.
This flow works correctly on iOS — the region downloads successfully, and we can view the map offline without issues. However, on Android, createPack() throws an error during the download process, and the offline packs are not downloaded completely. Because of this incomplete download, the app crashes when getPacks() is called while trying to open the downloaded region.
Steps to Reproduce
Integrate rnmapbox/maps into a React Native project
Configure Mapbox access token and initialize the Mapbox map
Define a region (bounds, zoom levels, style URL) for offline download
Call MapboxGL.offlineManager.createPack() to start downloading the offline region
Observe that the download starts but fails or throws an error on Android
Navigate to the screen where offline regions are loaded
Call MapboxGL.offlineManager.getPacks() to retrieve downloaded packs
App crashes on Android because the offline pack is partially downloaded
Expected behavior
createPack() should successfully download the offline region on Android
getPacks() should return only fully downloaded packs
Offline maps and route calculation should work without crashes
changed the title [-][Bug]: Android app crashes on getPacks() and createPack() throwing error while downloading[/-][+][Bug]: Android app crashes - createPack() throwing error while downloading and app crashes on getPacks()[/+]on Jun 17, 2026
Thanks for the report. We tried to reproduce this on Android and were not able to trigger the crash on the current version.
What we tested (Android emulator, @rnmapbox/maps current main (d4452ff), using your exact params — StyleURL.Street, bounds [[73.90, 18.45], [74.05, 18.55]], minZoom: 10, maxZoom: 15):
Happy path: createPack() downloaded all resources to 100% (complete), no error. getPacks() afterwards returned the pack fine, no crash.
Interrupted download: we started a large uncached region and cut the network mid-download. The createPackerror callback fired (this matches your "createPack throws an error during download"), leaving a partial/errored region in the tile store.
getPacks() on that partial/errored pack: returned the packs cleanly — no crash, app stayed alive.
A couple of things worth noting:
A failed/aborted download surfacing via the errorListener callback is expected — that's the third argument to createPack, it's how download errors are reported. It isn't itself the crash.
We could not reproduce a crash in getPacks() even with a partially-downloaded pack present.
You're on 10.1.45, which is quite old. Could you:
Upgrade to the latest 10.3.x and re-test — there's a good chance this is already resolved.
If it still crashes, we really need the actual error and crash trace to diagnose, since neither is in the report:
the error object passed to your errorListener (or logged by your console.error('Failed to download region', err))
the full native crash stacktrace from adb logcat at the moment getPacks() crashes.
Reproducer we used, in case you want to check it against your setup:
Closing as we couldn't reproduce this on current main and haven't heard back. If you still see the crash on the latest release, please reopen with a standalone reproducer.
Activity
[-][Bug]: Android app crashes on getPacks() and createPack() throwing error while downloading[/-][+][Bug]: Android app crashes - createPack() throwing error while downloading and app crashes on getPacks()[/+]mfazekas commentedon Jul 5, 2026
Thanks for the report. We tried to reproduce this on Android and were not able to trigger the crash on the current version.
What we tested (Android emulator,
@rnmapbox/mapscurrentmain(d4452ff), using your exact params —StyleURL.Street, bounds[[73.90, 18.45], [74.05, 18.55]],minZoom: 10,maxZoom: 15):createPack()downloaded all resources to 100% (complete), no error.getPacks()afterwards returned the pack fine, no crash.createPackerror callback fired (this matches your "createPack throws an error during download"), leaving a partial/errored region in the tile store.getPacks()on that partial/errored pack: returned the packs cleanly — no crash, app stayed alive.A couple of things worth noting:
errorListenercallback is expected — that's the third argument tocreatePack, it's how download errors are reported. It isn't itself the crash.getPacks()even with a partially-downloaded pack present.You're on
10.1.45, which is quite old. Could you:10.3.xand re-test — there's a good chance this is already resolved.errorListener(or logged by yourconsole.error('Failed to download region', err))adb logcatat the momentgetPacks()crashes.Reproducer we used, in case you want to check it against your setup:
Issue4230Repro.tsx
mfazekas commentedon Oct 12, 2026
Closing as we couldn't reproduce this on current main and haven't heard back. If you still see the crash on the latest release, please reopen with a standalone reproducer.