Using overpass turbp, I often - but quite irregularly - receive this error message:

alt text

It says that the request is rejected due to "e.g. server not found, request blocked by browser addon, request redirected, internal server errors, etc." I checked browser settings, the query itself, ran it on different devices, checked the status of Overpass etc. Sometimes, it affects even the smallest queries, e.g. the default one when loading overpass turbo.

Here, some more information, there seems to be issues with both XML and Java. The messages are from the browser's debugging tool (F12):

alt text

Has someone experienced the same problem (No 'Access-Control-Allow-Origin' header present, Cannot read property 'getBaseLayer')? How did you solve it? It seems always to be related to turbo.4decdd916893e57ee8ff.js. Thanks for all hints!

Below, all details of the debugging messages in text format:

Access to XMLHttpRequest at 'https://overpass.openstreetmap.fr/api/interpreterinterpreter' from origin 'https://overpass-turbo.eu' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
turbo.4decdd916893e57ee8ff.js:66 Uncaught TypeError: Cannot read property 'getBaseLayer' of undefined
    at Object.j.a.handlers.onDone (turbo.4decdd916893e57ee8ff.js:66)
    at e (turbo.4decdd916893e57ee8ff.js:40)
    at Object.error (turbo.4decdd916893e57ee8ff.js:40)
    at u (turbo.4decdd916893e57ee8ff.js:24)
    at Object.fireWith [as rejectWith] (turbo.4decdd916893e57ee8ff.js:24)
    at i (turbo.4decdd916893e57ee8ff.js:24)
    at XMLHttpRequest.<anonymous> (turbo.4decdd916893e57ee8ff.js:24)
j.a.handlers.onDone @ turbo.4decdd916893e57ee8ff.js:66
e @ turbo.4decdd916893e57ee8ff.js:40
error @ turbo.4decdd916893e57ee8ff.js:40
u @ turbo.4decdd916893e57ee8ff.js:24
fireWith @ turbo.4decdd916893e57ee8ff.js:24
i @ turbo.4decdd916893e57ee8ff.js:24
(anonymous) @ turbo.4decdd916893e57ee8ff.js:24
error (async)
send @ turbo.4decdd916893e57ee8ff.js:24
ajax @ turbo.4decdd916893e57ee8ff.js:24
run_query @ turbo.4decdd916893e57ee8ff.js:40
(anonymous) @ turbo.4decdd916893e57ee8ff.js:66
(anonymous) @ turbo.4decdd916893e57ee8ff.js:66
e.parse @ turbo.4decdd916893e57ee8ff.js:58
(anonymous) @ turbo.4decdd916893e57ee8ff.js:58
(anonymous) @ turbo.4decdd916893e57ee8ff.js:82
(anonymous) @ turbo.4decdd916893e57ee8ff.js:66
success @ turbo.4decdd916893e57ee8ff.js:66
u @ turbo.4decdd916893e57ee8ff.js:24
fireWith @ turbo.4decdd916893e57ee8ff.js:24
i @ turbo.4decdd916893e57ee8ff.js:24
(anonymous) @ turbo.4decdd916893e57ee8ff.js:24
load (async)
send @ turbo.4decdd916893e57ee8ff.js:24
ajax @ turbo.4decdd916893e57ee8ff.js:24
t @ turbo.4decdd916893e57ee8ff.js:66
e.get @ turbo.4decdd916893e57ee8ff.js:66
e.getBest @ turbo.4decdd916893e57ee8ff.js:66
s @ turbo.4decdd916893e57ee8ff.js:82
e.parse @ turbo.4decdd916893e57ee8ff.js:58
getQuery @ turbo.4decdd916893e57ee8ff.js:66
update_map @ turbo.4decdd916893e57ee8ff.js:66
onRunClick @ turbo.4decdd916893e57ee8ff.js:66
dispatch @ turbo.4decdd916893e57ee8ff.js:24
_.handle @ turbo.4decdd916893e57ee8ff.js:24
turbo.4decdd916893e57ee8ff.js:24 POST https://overpass.openstreetmap.fr/api/interpreterinterpreter net::ERR_FAILED

asked 13 Sep '21, 16:52

G%C3%A5seborg's gravatar image

Gåseborg
2816914
accept rate: 50%

edited 14 Sep '21, 13:51


Thanks to mmd-osm, it works fine now! As explained on https://github.com/osm-fr/infrastructure/issues/324, the main problem was that I had multiple data sources in the code including two incorrect ones and one that is running on an older release. Instead of:

// Alternative API
//{{data:overpass,server=https://overpass.kumi.systems/api/}}
//{{data:overpass,server=https://overpass-api.de/api/interpreter}}
//{{data:overpass,server=https://overpass.openstreetmap.fr/api/interpreter}}

it should have been:

// Alternative API
//{{data:overpass,server=https://overpass.kumi.systems/api/}}
//{{data:overpass,server=https://overpass-api.de/api/}}

Even though all these lines were commented out, overpass turbo still works with them and that caused problems. Might be better to use the settings menu of overpass turbo instead and not to add them in the code at all.

permanent link

answered 30 Sep '21, 12:27

G%C3%A5seborg's gravatar image

Gåseborg
2816914
accept rate: 50%

edited 01 Oct '21, 09:45

This answer describes what solved my problem. Unfortunately, I cannot mark it as "accepted answer"; could one of the admins please do so, thanks! I hope that marking this question as "answered" can help others that have the same problem and spare those that want to help solving a problem to put more time on this one. Thanks!

(30 Sep '21, 12:38) Gåseborg

I have marked it as accepted.

(30 Sep '21, 13:27) scai ♦

The request is made on http://overpass-turbo.eu which seems to contact https://overpass.openstreetmap.fr for executing the query. As both servers belong to a different domain, the CORS policy has to allow this. This means that the server on openstreetmap.fr has to allow requests from servers from another domain. Such a CORS policy is typically in place to avoid front-ends with bad intentions from using a back-end server.

In case this does not work, it is a server configuration error. There is nothing you can do as a user of the system. Of course, you can contact the maintainers of that server to inform them about the problem.

permanent link

answered 16 Sep '21, 14:03

escada's gravatar image

escada
19.0k16161302
accept rate: 20%

Thanks for your answer @escada! I am wondering whether and how one can specify the server which overpass turbo is contacting. I tried {{data:overpass,server=}} with each of the following: https://overpass.kumi.systems/api/, https://overpass-api.de/api/interpreter, https://overpass.openstreetmap.fr/api/interpreter which I found on https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances, but the query always ends up with https://overpass.openstreetmap.fr/. Funny thing is that the same query on another laptop gets processed by another server and there it works.

(17 Sep '21, 07:39) Gåseborg
1

Also added the question on the issue reporting page of the French OSM team: overpass.openstreetmap.fr https://github.com/osm-fr/infrastructure/issues/324#issue-998580758.

(17 Sep '21, 07:46) Gåseborg
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×459
×210

question asked: 13 Sep '21, 16:52

question was seen: 552 times

last updated: 01 Oct '21, 09:45

powered by OSQA