map on error evented does not catch every tile network failures
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
We're facing two main problems with Mapbox GL JS:
1. No Retry for Failed Tiles: If a tile fails to load (e.g., due to a network glitch), Mapbox doesn’t retry it. This leaves blank areas on the map even after the issue is resolved.
2. Incomplete Error Reporting: The map.on("error", ...) event doesn’t catch all tile load errors, so we can't detect or handle them properly.
**Steps to Reproduce:**
1. Load a map with vector or raster tiles.
2. Cause some tile load failures (e.g., via CORS errors or network issues).
3. Notice failed tiles stay blank and no retry happens, even after the connection is restored.
4. map.on("error", ...) is not triggered for these failures.
**Expected Behavior:**
- Failed tile loads should retry automatically or provide a way to trigger retries.
- All tile errors should trigger the error event
**Actual Behavior:**
- Failed tiles are not reloaded after temporary errors.
- Errors are not consistently reported via the event handler.
**Environment:**
Mapbox GL JS: 3.8
Browser: Chrome 137.0.7151.55 (arm64)
OS: macOS 15.0.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the problem in Mapbox GL JS 3.8 with vector or raster tiles, using temporary network or CORS failures as described. Trace the tile failure and map.on("error", ...) behavior; done means failed tiles retry or can be retriggered and every tile error reaches the event handler.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100