Select to view content in your preferred language

ERR_CONTENT_DECODING_FAILED with *-vector basemaps

463
4
01-19-2024 05:04 AM
JamesS1
Occasional Contributor

I was asked to update the basemaps on an old application running the 3.x JavaScript API. Example, switch from streets to streets-vector and topo to topo-vector. When I made the change, the basemaps didn't load and I started receiving ERR_CONTENT_DECODING_FAILED in the console in the Edge and Chrome browsers (it did not error in Firefox, but it also didn't display the basemap). I am using a proxy: http://localhost:49501/proxy.ashx?https://www.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f...

It also does not work when published to a valid https serving environment.

Any thoughts?

0 Kudos
4 Replies
Noah-Sager
Esri Regular Contributor

Hi @JamesS1, thanks for posting your question here. So this is a 3x app, with just updated vector basemaps? What version of 3x are you using?

Googling that error message didn't reveal much, other than clearing your browser cache and updating to the latest version of the browser. Do you get the same error with all browsers?

There was a similar issue reported, also with using a proxy, so maybe removing the proxy would help:
https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-3-7-proxy-ashx-fails-for-r...

0 Kudos
JamesS1
Occasional Contributor

Hi @Noah-Sager, Thanks for the reply. I am using version 3.45. The issue appears to be with the proxy. If the proxy is removed, the basemaps render. But we need the proxy because of secure map services. We are using version 1.1.2 of the proxy. And we get the same error in all browsers.

0 Kudos
Noah-Sager
Esri Regular Contributor

@JamesS1 - I think it would be better to not use a proxy anyway. I would recommend trying an alternative way to working with secure map services:
https://developers.arcgis.com/javascript/3/jshelp/ags_secureservices.html

Or, this might be a good opportunity to update to 4x, the latest and greatest version is 4.28:
https://developers.arcgis.com/javascript/latest/migrating/
https://developers.arcgis.com/javascript/latest/secure-resources/

 

0 Kudos
JamesS1
Occasional Contributor

Unfortunately, this is a client application, and the funding is not available to upgrade to 4.x. Also, we do not have Portal (Server only) and we can't use OAuth instead of a Proxy. Not sure what options are left to us aside from sticking with the non-vector, deprecated basemaps (which are now inaccurate no longer maintained).

Thanks for the replies so far.

0 Kudos