Modify

Opened 2 months ago

Closed 2 months ago

#18982 closed defect (fixed)

Download Location with history should catch ResponseCode 404

Reported by: GerdP Owned by: team
Priority: normal Milestone: 20.03
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by GerdP)

What steps will reproduce the problem?

  1. Download URL (Ctrl+L) object that doesn't exist, e.g. https://api.openstreetmap.org/api/0.6/way/2/history
  2. Check console message

What is the expected result?

no traceback

What happens instead?

2020-03-26 11:15:51.007 INFO: GET https://api.openstreetmap.org/api/0.6/way/2/history -> HTTP/1.1 404 (207 ms)
2020-03-26 11:15:51.007 FINE: RESPONSE HEADERS: {Keep-Alive=[timeout=5, max=100], null=[HTTP/1.1 404 Not Found], Strict-Transport-Security=[max-age=31536000; includeSubDomains; preload, max-age=31536000; includeSubDomains; preload], Cache-Control=[no-cache], Server=[Apache/2.4.29 (Ubuntu)], Connection=[Keep-Alive], Content-Length=[0], Date=[Thu, 26 Mar 2020 10:15:51 GMT], Content-Type=[text/html; charset=utf-8], Expect-CT=[max-age=0, report-uri="https://openstreetmap.report-uri.com/r/d/ct/reportOnly", max-age=0, report-uri="https://openstreetmap.report-uri.com/r/d/ct/reportOnly"]}
2020-03-26 11:15:51.008 FINE: java.io.FileNotFoundException: https://api.openstreetmap.org/api/0.6/way/2/history. Cause: java.io.FileNotFoundException: https://api.openstreetmap.org/api/0.6/way/2/history
2020-03-26 11:15:51.009 FINE: Server did not return any body
2020-03-26 11:15:51.023 SEVERE: org.openstreetmap.josm.io.OsmApiException: ResponseCode=404
org.openstreetmap.josm.io.OsmApiException: ResponseCode=404
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:214)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:137)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:121)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:108)
	at org.openstreetmap.josm.io.OsmServerLocationReader$OsmParser.parse(OsmServerLocationReader.java:122)
	at org.openstreetmap.josm.io.OsmServerLocationReader$OsmParser.parse(OsmServerLocationReader.java:1)
	at org.openstreetmap.josm.io.OsmServerLocationReader.doParse(OsmServerLocationReader.java:60)
	at org.openstreetmap.josm.io.OsmServerLocationReader.parseOsm(OsmServerLocationReader.java:82)
	at org.openstreetmap.josm.io.OsmServerLocationReader.parseOsm(OsmServerLocationReader.java:77)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:462)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:470)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2020-03-26 11:15:51.031 SEVERE: Not Found - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]

Please provide any additional information below. Attach a screenshot if possible.

I see a similar problem in the HistoryLoadTask which is called by the Undelete plugin:

2020-03-26 11:22:49.219 INFO: GET https://api.openstreetmap.org/api/0.6/way/2/history -> HTTP/1.1 404 (163 ms)
2020-03-26 11:22:49.220 FINE: RESPONSE HEADERS: {Keep-Alive=[timeout=5, max=100], null=[HTTP/1.1 404 Not Found], Strict-Transport-Security=[max-age=31536000; includeSubDomains; preload, max-age=31536000; includeSubDomains; preload], Cache-Control=[no-cache], Server=[Apache/2.4.29 (Ubuntu)], Connection=[Keep-Alive], Content-Length=[0], Date=[Thu, 26 Mar 2020 10:22:49 GMT], Content-Type=[text/html; charset=utf-8], Expect-CT=[max-age=0, report-uri="https://openstreetmap.report-uri.com/r/d/ct/reportOnly", max-age=0, report-uri="https://openstreetmap.report-uri.com/r/d/ct/reportOnly"]}
2020-03-26 11:22:49.221 FINE: java.io.FileNotFoundException: https://api.openstreetmap.org/api/0.6/way/2/history. Cause: java.io.FileNotFoundException: https://api.openstreetmap.org/api/0.6/way/2/history
2020-03-26 11:22:49.223 FINE: Server did not return any body
2020-03-26 11:22:49.231 SEVERE: org.openstreetmap.josm.io.OsmApiException: ResponseCode=404
org.openstreetmap.josm.io.OsmApiException: ResponseCode=404
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:214)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:137)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:121)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:85)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:68)
	at org.openstreetmap.josm.io.OsmServerHistoryReader.parseHistory(OsmServerHistoryReader.java:65)
	at org.openstreetmap.josm.gui.history.HistoryLoadTask.loadHistory(HistoryLoadTask.java:202)
	at org.openstreetmap.josm.gui.history.HistoryLoadTask.realRun(HistoryLoadTask.java:185)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2020-03-26 11:22:49.243 SEVERE: Not Found - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
Build-Date:2020-03-26 11:11:40
Revision:16200
Is-Local-Build:true

Identification: JOSM/1.5 (16200 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1903 (18362)
Memory Usage: 725 MB / 1753 MB (565 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:55342, -ea, -javaagent:c:/josm/core/test/lib/jmockit.jar, -Dfile.encoding=UTF-8]
Program arguments: [--debug]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (35250)
+ PolygonCutOut (v0.7)
+ apache-commons (35362)
+ buildings_tools (35364)
+ continuosDownload (91)
+ ejml (35122)
+ geotools (35169)
+ jaxb (35092)
+ jts (35122)
+ merge-overlap (35248)
+ o5m (35248)
+ opendata (35330)
+ pbf (35248)
+ poly (35248)
+ reverter (35395)
+ undelete (35396)
+ utilsplugin2 (35384)

Last errors/warnings:
- W: Failed to parse external taginfo data at https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json: Invalid token=EOF at (line no=6882, column no=1932, offset=403684). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL]
- E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=404
- E: Not Found - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]

Attachments (0)

Change History (7)

comment:1 Changed 2 months ago by GerdP

Description: modified (diff)

comment:2 Changed 2 months ago by GerdP

It seems that the traceback is meant for debugging purposes?

comment:3 Changed 2 months ago by GerdP

In 16205/josm:

see #18982, #10783: allow to collect missing primitives instead of stopping on first error when loading history data

comment:4 Changed 2 months ago by Don-vip

Milestone: 20.03

comment:5 Changed 2 months ago by GerdP

Not sure if we should do more here. I wondered what

2020-03-26 11:22:49.243 SEVERE: Not Found - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]

means. The information about the HtmlPanel is rather missleading. I'd prefer to show the full url which caused the "Not found" message, something like

2020-03-29 08:58:39.019 SEVERE: Not Found - <html>The OSM server 'api.openstreetmap.org' does not know about an object<br>you tried to read, update, or delete. Either the respective object<br>does not exist on the server or you are using an invalid URL to access<br>it. Please carefully check the server's address 'api.openstreetmap.org' for typos.</html>

comment:6 Changed 2 months ago by GerdP

In 16217/josm:

see #18982: Improve log message, show content of panel instead of meaningless output of HtmlPanel.toString()

  • Don't create HtmlPanel in ExceptionDialogUtil (regression from #13777), create it in HelpAwareOptionPane instead when msg is a String

comment:7 Changed 2 months ago by GerdP

Resolution: fixed
Status: newclosed

I think this is fixed now. Reopen if I missed something.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.