Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cacheEntryPossiblyAdded: TypeError Cannot read property 'send' of undefined #8705

Closed
javiergarciagonzalez opened this issue Aug 29, 2019 · 3 comments · Fixed by #8711
Closed

Comments

@javiergarciagonzalez
Copy link

Hi!

Since we bumped this morning to v1.3.0, we are getting production error that says "Cannot read property 'send' of undefined".

This is happening in the method cacheEntryPossiblyAdded from the file src/utils/tile_request_cache.js.
This method receives a dispatcher and that dispatcher has a method getActor() that it's sometimes returning undefined. That causes the error in the title of this issue.

I couldn't reproduce it locally, but I hope this can ring the bell for you mapbox team.

mapbox-gl-js version: 1.3.0

browser: Chrome 71.0.3578

Expected Behavior

Code doesn't give typeErrors

Actual Behavior

It does when dispatch.getActor() returns undefined

@mourner
Copy link
Member

mourner commented Aug 29, 2019

Thanks for the report! We'll try to find a solution, but it will be hard without a reproducible test case — if you do get to reproduce locally eventually, let us know.

@asheemmamoowala asheemmamoowala added this to the release-queso milestone Aug 29, 2019
@ansis
Copy link
Contributor

ansis commented Aug 30, 2019

@javiergarciagonzalez how often are you seeing this error reported? is it a couple errors here and there or something most users are hitting?

Also, are you using map.remove()? Do you have any raster tile sources on your map?

ansis added a commit that referenced this issue Aug 30, 2019
If a tile was reloaded shortly before a `map.remove()`, raster tiles
that were in the middle of being loaded would not be aborted leading to
an error when the tried to work with the removed map.

The problem applies to removing and reloading tile.
@ansis
Copy link
Contributor

ansis commented Aug 30, 2019

I was able to reproduce this error with raster map found in debug/satellite.html when forcing a reload (map.style._reloadSource('mapbox')) shortly before removing it (map.remove()). I opened a fix for that here: #8711

I don't really have a way of knowing if this is the exact issue you were seeing though.

ansis added a commit that referenced this issue Aug 30, 2019
If a tile was reloaded shortly before a `map.remove()`, raster tiles
that were in the middle of being loaded would not be aborted leading to
an error when the tried to work with the removed map.

The problem applies to removing and reloading tile.
mourner pushed a commit that referenced this issue Sep 4, 2019
If a tile was reloaded shortly before a `map.remove()`, raster tiles
that were in the middle of being loaded would not be aborted leading to
an error when the tried to work with the removed map.

The problem applies to removing and reloading tile.
mourner added a commit that referenced this issue Sep 4, 2019
If a tile was reloaded shortly before a `map.remove()`, raster tiles
that were in the middle of being loaded would not be aborted leading to
an error when the tried to work with the removed map.

The problem applies to removing and reloading tile.
stepankuzmin pushed a commit to stepankuzmin/mapbox-gl-js that referenced this issue Sep 9, 2019
If a tile was reloaded shortly before a `map.remove()`, raster tiles
that were in the middle of being loaded would not be aborted leading to
an error when the tried to work with the removed map.

The problem applies to removing and reloading tile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants