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

Invalid query does not return error, but spins forever #667

Open
mnalis opened this issue Oct 23, 2023 · 4 comments
Open

Invalid query does not return error, but spins forever #667

mnalis opened this issue Oct 23, 2023 · 4 comments

Comments

@mnalis
Copy link

mnalis commented Oct 23, 2023

When entering the query at wizard at http://overpass-turbo.eu/ which is not recognized, previously error was returned.

Now, it seems that it simply runs "running line" spinner forever, even when just build query is pressed (initially I was pressing build and run query and wondering why my seemingly simple/small query is taking so long to complete)

From example, entering in wizard "bicycle:repair" in Croatia and clicking build query just runs the spinner (I've waited for several minutes and given up so I do not know if it timeouts eventually):
Screenshot 2023-10-23 at 17-18-01 overpass turbo

Modifying that query to "bicycle:repair"=* in Croatia returns correctly in about a second for build and run query (and immediately for just build query)

Started happening in last few weeks (I guess in or about the same major update which also broke "save/load from OSM" functionality from #665)

Possibly related issue: #657 (comment)

@mnalis
Copy link
Author

mnalis commented Nov 13, 2023

For example, typing in wizard heritage in zagreb has the progress bar spinning forever, but in firefox console the error is thrown immediately.

IMHO, the error (at least a generic catch-all) should be returned to the user and operation aborted instead.

Uncaught TypeError: y is undefined
    Zl http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    I http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    P http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    fuzzy_search http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    Y http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:282
    __ http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:282
    __ http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:282
    Xl http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    __ http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:282
    update_ffs_query http://overpass-turbo.eu/assets/index-fd1ab5c5.js:763
    Gm http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:281
    Xl http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    Gm http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:281
    update_ffs_query http://overpass-turbo.eu/assets/index-fd1ab5c5.js:763
    onFfsRun http://overpass-turbo.eu/assets/index-fd1ab5c5.js:763
    onFfsBuild http://overpass-turbo.eu/assets/index-fd1ab5c5.js:763
    dispatch http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    handle http://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
urlParameters-314e2e15.js:274:1343

@hfs
Copy link

hfs commented Dec 13, 2023

Overpass Turbo tries to load this file: https://overpass-turbo.eu/assets/en-US-a78e4a15.js
but it’s empty:

const e={"en-US":{}};export{e as default};

When trying to build a query in the wizard for the first time this exception is logged:

Uncaught (in promise) Error: failed to load preset translations file: en-US
    f https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    Xl https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:274
    Gm https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:281
    update_ffs_query https://overpass-turbo.eu/assets/index-9bf03a2e.js:763
    onFfsRun https://overpass-turbo.eu/assets/index-9bf03a2e.js:763
    onFfsBuild https://overpass-turbo.eu/assets/index-9bf03a2e.js:763
    dispatch https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    handle https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    add https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    Bi https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    each https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    each https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    Bi https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    on https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    initClickHandler https://overpass-turbo.eu/assets/index-9bf03a2e.js:763
    each https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    each https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    initClickHandler https://overpass-turbo.eu/assets/index-9bf03a2e.js:763
    Qe https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    In https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    setTimeout handler*Deferred/then/J/< https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    N https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    fireWith https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    fire https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    N https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    fireWith https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    ready https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    setTimeout handler* https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    <anonymous> https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    <anonymous> https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:10
    <anonymous> https://overpass-turbo.eu/assets/urlParameters-314e2e15.js:13

When hitting the build query button a second time, the exception mentioned by @mnalis above is logged.

To me it seems there are two problems:

  1. The en-US .js file doesn’t seem to contain the content it is supposed to have?
  2. The wizard should be able to deal with this error and move on, or display a helpful error message, but not stay in the loading state forever.

@hfs
Copy link

hfs commented Jan 25, 2024

The preset translation files come from https://github.com/openstreetmap/id-tagging-schema/tree/main/dist/translations

To me it seems that the language-country variants are meant to be merged with the language-without-country.files.

E.g. en.json contains the English presets. en-AU.json seems to contain only the terms that differ from en.json. en-US.json is empty.

I think when the requested language is en-AU, one would need to load en.json, then load en-AU.json and merge it. Entries from en-AU should overwrite entries from en.

What should happen if a user requests a language without translated presets, such as ee? It seems best to use English as fall back. So load en, then the language, then the language-country if it exists and merge them on top of each other.

@mnalis
Copy link
Author

mnalis commented Apr 18, 2024

The wizard should be able to deal with this error and move on, or display a helpful error message, but not stay in the loading state forever.

Would just putting that language loading block in try...catch fix at least that part?

It is really making wizard quite annoying to use (i.e. I've by now had to train myself to never click on Build and execute but to always click first on Build query and only if that worked then move over the other side of screen to click Run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants