Platform: IOS
Mapbox SDK version: 3.6.0
We have client's who will work only in offline for more than 2 days. In that case the offline packs should work , but it's not working. I think the tiles are expiring every day.
Please download the video file from dropbox for further reference of this issue,
https://www.dropbox.com/s/sdfs2y05ivrz9q3/mapbox%20offline%20pack%20issue.mov?dl=0
But, I have checked the same scenario using the older SDK v3.5.4, it's working there.
@ThiyagarajanShivSankaran thanks for reporting this bug
@ThiyagarajanShivSankaran it's hard to see this from the video; are you using raster tiles or vector tiles?
@kkaefer we are using vector tiles. Sorry for the video clarity can you download and check. Thanks.
This looks like https://github.com/mapbox/mapbox-gl-native/issues/9211
I think the expires timestamps in the database are expired after some days.
I think we fixed the bulk of this problem with a simple change, in src/mbgl/tile/tile_loader_impl.hpp
template <typename T>
void TileLoader<T>::loadedData(const Response& res) {
if (res.error && res.error->reason != Response::Error::Reason::NotFound) {
- tile.setError(std::make_exception_ptr(std::runtime_error(res.error->message)));
+ if (!(tile.isComplete() && tile.isRenderable())) {
+ tile.setError(std::make_exception_ptr(std::runtime_error(res.error->message)));
+ }
} else if (res.notModified) {
resource.priorExpires = res.expires;
// Do not notify the tile; when we get this message, it already has the current
Can I know what is the status of this issue. We need this to be fixed immediately. Thanks.
@kkaefer @friedbunny @boundsj Status please ???
@ThiyagarajanShivSankaran There鈥檚 been no change in the status of this issue 鈥斅爓hen someone has the opportunity to investigate further, they will post an update here. In the meantime, any additional information (or testing of proposed fixes) is much appreciated.
@andrewljohnson is this fix in the latest release of mapbox sdk? 3.6.2? we will test this and get back to you
@arethasamuel not AFAIK
@andrewljohnson @kkaefer @friedbunny @boundsj
this issue still exists in mapbox 3.6.2
1) Turn on wifi --> Download all the offline packs.
2) change the date time in device to tomorrow
3) Open the device in airplane mode --> open the app again and the tiles are no longer showing
So i opened up the cache.db sqlite database and found out that the table: tiles has a column called expires and the value of the expires column has a date 12 hours After the offline pack was installed.
Is there a way to increase this time? (like at least by a year or something?)
Hi @friedbunny yeah the above fix is working.
@kkaefer do you think that the fix @andrewljohnson proposed in https://github.com/mapbox/mapbox-gl-native/issues/9705#issuecomment-322931885 should be pulled into the SDK?
There are several underlying issues:
I attempted a refactor of our tile state system in https://github.com/mapbox/mapbox-gl-native/tree/make-stale-resources-renderable, but it's incomplete.
This should be fixed by https://github.com/mapbox/mapbox-gl-native/pull/10012 and 3.6.4, which will be available imminently.