mapbox / mapbox/mapbox-search-android

Offline Search not working — TileStore fails to load tiles (erroredResourceCount = 10), OfflineIndexChangeListener not triggered

Open
#369 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Kotlin
Stars
39
Forks
10
PR merge metrics
No merged PRs in 30d

Description

## Environment

- Search SDK Component:
- [ ] Core Search SDK (`SearchEngine`)
- [X] Offline Search SDK (`OfflineSearchEngine`)
- [ ] Address Autofill SDK
- [ ] Search UI SDK
- Android OS version: **(add here)**
- Devices affected: **(add here)**
- Search SDK Version: **(add here)**
- Maps SDK/Nav SDK versions (if used): **(add here)**

---

## Description

I am implementing **Offline Search** using the Mapbox Search SDK for Android, but the TileStore does not load the tiles for the offline region.

Even when using the sample polygon coordinates from the official SDK documentation, tile loading consistently fails.

As a result:
- All tiles show **erroredResourceCount = 10**
- **completedResourceCount = 0**
- The offline index is never created
- `OfflineIndexChangeListener.onIndexReady()` does not trigger
- Offline Search remains non-functional

---

## Expected Behavior

- Tiles should download successfully
- Offline index should be built
- `onIndexReady()` should be triggered
- Offline search queries should return results

---

## Actual Behavior

The TileStore load completes with all tiles in error state:

```
requiredResourceCount: 10
completedResourceCount: 0
erroredResourceCount: 10
completedResourceSize: 0
```

Since no tiles are downloaded, the offline search index never initializes.

---

## Steps to Reproduce

1. Create a TileStore instance
2. Install an offline region using the sample polygon coordinates
3. Observe the tile loading results (all fail)
4. Add an `OfflineIndexChangeListener`
5. Note that `onIndexReady()` never triggers

---

## Additional Notes

Please confirm:
- Whether the sample offline region tiles are still available
- Whether the polygon area requires updated coordinates
- Or if this is a regression in TileStore tile loading

This issue blocks offline search implementation in the project.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TileStore offline-region installation with the sample polygon coordinates and inspect the reported resource counts. Verify whether tiles load, the offline index is created, and OfflineIndexChangeListener.onIndexReady() is triggered; the issue provides no source files or tests to inspect.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.