Mapbox-gl-js: Failed to fetch -- ERR_CONTENT_DECODING_FAILED

Created on 29 Mar 2019  路  10Comments  路  Source: mapbox/mapbox-gl-js

Suddenly tiles stopped loading while traffic layer is loading fine.
I tried various styles too, doesn't work.

Tried:
"mapbox-gl": "0.53.1" and "mapbox-gl": "0.53.0"
Chrome and Safari

bug

Most helpful comment

Thanks for the test case @leigeber!

This is an issue on our end for cases where the timestamp in the individual tile request does not match the most recently modified date of the style you are optimizing with (this happens under the hood when you include optimize=true). Here are some docs on the shape of those requests for the curious. In this case, we aren't returning a gzipped tile.

I'm rolling out a fix and will update here asap.

All 10 comments

After I copy it as Curl and do it from terminal I get:

curl: (61) Error while processing content unencoding: invalid distance too far back

But with a removal of --compressed it seems to work. Is this some sort of gzip issue?

Seeing the same issue here with 0.53.0 and the new 0.54.0 beta. Resolve temporarily by removing the optimize querystring since every map was breaking otherwise.

Can you provide a minimal live example (e.g. on JSFiddle) that reproduces this?

Thank you @leigeber

Changing the Mapbox URL optimize parameter to false fixed the issue

optimize=false

Here's an example with one of our custom styles https://jsfiddle.net/c0as4yLm/1/

Just throwing optimize=true on a default example doesn't throw the same error so it may be specific to the style somehow. https://jsfiddle.net/dovLezuc/

Thank you for the test case! Investigating...

Thanks for the test case @leigeber!

This is an issue on our end for cases where the timestamp in the individual tile request does not match the most recently modified date of the style you are optimizing with (this happens under the hood when you include optimize=true). Here are some docs on the shape of those requests for the curious. In this case, we aren't returning a gzipped tile.

I'm rolling out a fix and will update here asap.

@vitaliyhayda @leigeber fix is rolled out and confirmed your JSFiddle is loading tiles again. Can you confirm you are seeing the same?

Confirmed, thanks @mapsam!

Terrific. Apologies for the headache! Appreciate the ticket - and thanks @mourner for escalating 馃檹

Was this page helpful?
0 / 5 - 0 ratings