Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Unhandled pouchDB promise rejection after this._db.getAttachment #45

Open
plarner30 opened this issue Nov 5, 2020 · 0 comments
Open

Comments

@plarner30
Copy link

plarner30 commented Nov 5, 2020

When loading the tiles from cache sometimes a CustomPouchError can arise after this._db.getAttachment, Error data:

status: 404, name: "not_found", message: "missing", error: true} This causes some tiles to fail to load, around 10% especially around the perimeter of the map after intitial loading.

Not sure if this relates to EPSG basemaps and the issue here: #25. I am having the issue with a UK OS basemap EPSG:3857. I am not using any variable access tokens in the request URLs as far as i can see they are consistent other than the standard &TileMatrix=EPSG:3857:{z}&TileRow={y}&TileCol={x}.

My (temporary) fix is adding a catch block after the this._db.getAttachment promise call and in that firing _onCacheMiss(tile, tileUrl, done); instead.

versions:

"leaflet": "^1.6.0",
"leaflet.tilelayer.pouchdbcached": "^1.0.0",
"pouchdb-browser": "^7.2.2",

Though i have tried with "pouchdb" and fixed to 7.0.0 instead

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant