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

After version 4.5.0 requests with 404 are not emitted in map.on('error') #4613

Open
ElGreeno opened this issue Aug 27, 2024 · 5 comments
Open
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed

Comments

@ElGreeno
Copy link

maplibre-gl-js version: 4.6.0
browser: Chrome

Steps to Trigger Behavior

  1. Create a MapLibre map with vector tiles that have data only up to a certain zoom level (e.g., zoom level 16).
  2. Attach an event listener to capture errors:
map.on('error', (e) => {
    console.log('ERROR', e);
});

  1. Zoom in past the available tile data (e.g., zoom beyond level 16 where 404 responses are expected for missing tiles).

Expected Behavior

  • When a tile request results in a 404 response due to missing data at higher zoom levels, the map.on('error') event should emit the error as it did in versions prior to 4.5.0.
  • This allowed overzooming tiles and keeping the previous zoom level’s data visible.

Actual Behavior

  • In version 4.6.0, map.on('error') no longer emits any error when tile requests result in 404 responses.
  • This causes tiles with no data at certain zoom levels to disappear.
@HarelM
Copy link
Collaborator

HarelM commented Aug 27, 2024

Can you please create a jsbin with the relevant example?
I don't see anything in the changelog after 4.5 that could've introduce this regression, so this is strange...

@HarelM HarelM added the need more info Further information is requested label Aug 27, 2024
@ElGreeno
Copy link
Author

Zoom beyond level 15 to see the difference.

4.4.0: https://jsbin.com/wuzivoc/1/edit?html,output

4.6.0: https://jsbin.com/puwuwob/2/edit?html,output

@HarelM
Copy link
Collaborator

HarelM commented Aug 27, 2024

I'm having a hard time finding the diffs. Can you please create a minimal reproduction with as little layer and code as possible?

@ElGreeno
Copy link
Author

@HarelM
Copy link
Collaborator

HarelM commented Aug 27, 2024

Ah, so the version that "stopped" working is 4.5.0.
In this case the following PR is probably the cause of this, and it also looks like something related to this issue about ajax error serialization:

The above PR solves a different issue, which we should avoid breaking again.
Feel free to look into it.

@HarelM HarelM added bug Something isn't working PR is more than welcomed Extra attention is needed and removed need more info Further information is requested labels Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants