mapbox-maps-ios
mapbox-maps-ios copied to clipboard
Failed to resolve tileset descriptors: database is locked when calling TileStore.default.loadTileRegion
Environment
- Xcode version: 14.2
- iOS version: 16
- Devices affected: iPhone XR
- Maps SDK Version: 10.9.0
Observed behavior and steps to reproduce
We randomly (random as in "we do not know how this can happen yet") the following error when calling TileStore.default.loadTileRegion
Failed to resolve tileset descriptors: database is locked
Here are the parameters we are passing:
tileStore.setOptionForKey(TileStoreOptions.diskQuota, value: 1)
tileStore.setOptionForKey("tile-region-max-tile-count", domain: TileDataDomain.maps, value: IOSMapboxConstants.maxTileCount)
let tilesetDescriptors: [TilesetDescriptor] = styleUrls.compactMap { styleUrl in
guard let styleUrl = StyleURI(rawValue: styleUrl) else { return nil }
return offlineManager.createTilesetDescriptor(
for: TilesetDescriptorOptions(
styleURI: styleUrl,
zoomRange: UInt8(Constants.Companion().offlineMapMinZoomLevel)...UInt8(Constants.Companion().offlineMapMaxZoomLevel)
)
)
}
let tileRegionLoadOptions = TileRegionLoadOptions(
geometry: metadata.boundingBox.asPolygon(),
descriptors: tilesetDescriptors,
acceptExpired: true,
networkRestriction: .none
)!
tileStore.loadTileRegion(
forId: metadata.id,
loadOptions: tileRegionLoadOptions
We sadly do not have anymore info for now. I have added some trace logs to our released app to gather more information but any assistance on how to gather more information would be appreciated.
Even better if you are already aware of this issue
Expected behavior
Not getting any database locker error 😅
+1 for this issue. We are still encountering this issue using Mapbox 10.10.1