NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

When I go here:

many times I receive this kind of error: net::ERR_TUNNEL_CONNECTION_FAILED (Chrome)

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS request did not succeed). (Firefox)

It depends on my proxy or it is a temporary problem on the server?

P.S. I am doing a test with an HTML on my machine copying the code on the example


asked 28 Feb '20, 13:46

gf_eu's gravatar image

accept rate: 0%

Actually the problem is also when I load this example: But it doesn't happen always, just sometime.

Now for example I am having this ok: via: 1.1 (squid/4.10) x-cache: MISS from

and this other on error

And this cause me problem in viewing the map in some point. And yes, looks I have the same problem with codesanbox, here for example: x-cache: MISS from

Now I am noticing that I don't have any problem with ARCGis Tiles (either on the example, either on my local file) and I replaced this:

source: new ol.source.OSM()

with this:

source: new ol.source.XYZ({ attributions: 'Tiles © ArcGIS', url: '' + 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}' })

What do you suggest? To do some investigation or keep going with ARCGis Tiles that work well for me?

(02 Mar '20, 09:16) gf_eu

Ok, I have some information more, I am going to update that ticket, maybe we can find (and give help). And It looks I have the same problem with ARCGis Tiles.

Basically when I open the HTML (before the map is loaded), sometime the page ask me for the proxy credentials, sometimes not (I don't know what's the logic but it's about cache). When the page ask for proxy credentials and I insert them everything works fine otherwise I have that error (Open Layer Engine seems to be "offline", piece of the map are shown sometime depending on what there is in the cache I guess).

But also, even when is "offline" (and not working) sometime (but rarely) doing "Zoom In" and "Zoom out" the browser (not always) ask me for proxy credentials and the Open Layer Engine come "back online" and start to work again. workaround maybe I can think about do a "request on the Internet" before loading everything or I don't know "skip the cache" (I tried with the meta tag but nothing). Any idea?

Thanks again.

(04 Mar '20, 10:48) gf_eu

I'm not sure I understand your problem.

When you say that a proxy ask for credentials, it's a proxy on your side ? Not the tile cache server ?

Maybe there a problem with chaining proxies...

Does work with your setup ?

Could you give a bit more details ?


(04 Mar '20, 15:23) H_mlet

I guess the "Cross-Origin Request Blocked" error might because you're loading your HTML via http, and the tiles via https. Unfortunately the main OSM servers don't provide http anymore. The problem should only happen in the reverse situation...

I tried with leafletjs, it works fine. I won't install npm to try the OpenLayer code, but it should be similar.

Did you try with "codesanbox" ? (the Edit button at top right of your example page) It also works fine for me.

For the server status, you can check, to get the name of your tile server, then on you'll find a munin link, with all the stats.

You can also check the Headers (x-cache) to find the tile cache server (proxy) that served you, and check it the same way.

Hope this helps.

permanent link

answered 28 Feb '20, 22:32

H_mlet's gravatar image

accept rate: 13%

It might be a problem with your connection, but I notice on that trogdor and necrosan are not the most stable tile cache servers.

On the other hand, there is a ticket at the OSM Operation Team that looks like your problem, maybe you could help them with more data. First try on to check that you can reproduce the problem.

Of course if you're happy with ArcGIS license and data, please use them...

permanent link

answered 02 Mar '20, 18:43

H_mlet's gravatar image

accept rate: 13%

Answer to H_mlet.

Yes, there is a proxy on my side. And also using ARCGis Tiles I am having ERR_TUNNEL_CONNECTION_FAILED, even I am not sure yet it's the exact same error as with OSM Tiles.

What I did now, my workaround, is to "force a Internet request" before everything (I chose to use the same ARCGIS Map url but I could use everything on the web):

   type : "GET",
   url : '',
   success : function(data) {

Only after this request is done I initialize the map (method init):

function init(){
   layer = new ol.layer.Tile({
   source: new ol.source.XYZ({
   attributions: 'Tiles ' +
   url: '' +
   map = new ol.Map({
      target: 'map',
      layers: [layer, vector],
      view: new ol.View({
      center: ol.proj.fromLonLat([...]),
      zoom: 5

What happen now: when I open the HTML first thing the browser does is to ask me the proxy credentials, after the map is loaded and the map works correctly. I am not having any ERR_TUNNEL_CONNECTION_FAILED. If this is a workaround can work also with OSM Tiles and outside of proxy connection I can't say yet....If I do a test I will tell you.

I suppose that there is a problem in the Open Layer Javascript but It can be I will be happy with this workaround...

Hope this can help...and can make any sense for you.

(04 Mar '20, 16:25) gf_eu

Well I don't really understand, but I'm glad you found a workaround, and thanks for sharing. :-)

Anyway it looks more like a bug of OpenLayers, you might want to report it to them :


(04 Mar '20, 16:29) H_mlet

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 28 Feb '20, 13:46

question was seen: 4,014 times

last updated: 04 Mar '20, 16:29

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum