FreemapSlovakia / freemap-v3-react

Freemap Slovakia web application (www.freemap.sk)
https://www.freemap.sk/
Apache License 2.0
35 stars 17 forks source link

[Edit in JOSM] Operation error: TypeError: Load failed #696

Closed BelKed closed 1 year ago

BelKed commented 1 year ago

Every time I click the Edit in JOSM button, the error Operation error: TypeError: Load failed is displayed.

Error Screenshot

The console (from Safari) shows the following errors:

Console Screenshot

So this is the related line: https://github.com/FreemapSlovakia/freemap-v3-react/blob/97e6cd4123a8652b71e311433bbfcbd641af1c75/src/processors/openInExternalAppProcessor.ts#L129


Weird is that only some browsers I've tested (Chrome, Brave and Safari) are affected. On Firefox and Opera, it works just fine (the area is loaded in JOSM without any problems).

System info: macOS Monterey 12.6 Browsers info:


After some research, I found it's a CORS issue (or something related). However, after more than two hours, I haven't found a workaround for this issue :(

zdila commented 1 year ago

For me it works in Vivaldi, Chrome and Firefox. Do you have it enabled in JOSM? Does it work for you from www.osm.org?

image

tjamecny commented 1 year ago

Also works for me on Debian Bullseye + Mozilla Firefox 102.3.0esr (64-bit).

zdila commented 1 year ago

I found it's a CORS issue

It is a server responsibility to handle CORS properly. In this case it is JOSM who is a server.

BelKed commented 1 year ago

Do you have it enabled in JOSM?

Yes :D If I didn't have it enabled, it wouldn't be able to open links from Firefox and Opera...

Settings Screenshot

Does it work for you from www.osm.org?

Sadly, not. I tried it before, and I just forgot to mention that...

zdila commented 1 year ago

Does it work for you from www.osm.org?

Sadly, not. I tried it before, and I just forgot to mention that...

Then I am afraid we can't do nothing in the code. Maybe ask for support on osm_sk@googlegroups.com.