#18772 closed defect (fixed)
JsonParsingException: Invalid token=EOF
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | blocker | Milestone: | 20.02 |
Component: | Core | Version: | |
Keywords: | template_report taginfo json geofabrik | Cc: |
Description (last modified by )
UPDATE TO JOSM 15937 OR NEWER
What steps will reproduce the problem?
- Windows installation 15927
- Start JOSM 15927
- Non expected exception
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-02-24 22:06:28 +0100 (Mon, 24 Feb 2020) Build-Date:2020-02-24 21:08:22 Revision:15927 Relative:URL: ^/trunk Identification: JOSM/1.5 (15927 cs) Windows 10 64-Bit OS Build number: Windows 10 Home 1909 (18363) Memory Usage: 247 MB / 989 MB (167 MB allocated, but free) Java version: 1.8.0_241-b07, Oracle Corporation, Java HotSpot(TM) Client VM Screen: \Display0 1366x768, \Display1 1920x1080 Maximum Screen Size: 1920x1080 Plugins: + FastDraw + buildings_tools + imagery_offset_db + mapathoner + markseen + measurement + scripting + terracer + todo + utilsplugin2 Last errors/warnings: - E: Handled by bug report queue: javax.json.stream.JsonParsingException: Invalid token=EOF at (line no=3, column no=49, offset=97). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL, SQUARECLOSE] === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: main (1) javax.json.stream.JsonParsingException: Invalid token=EOF at (line no=3, column no=49, offset=97). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL, SQUARECLOSE] at org.glassfish.json.JsonParserImpl.parsingException(JsonParserImpl.java:437) at org.glassfish.json.JsonParserImpl.getArray(JsonParserImpl.java:328) at org.glassfish.json.JsonParserImpl.getValue(JsonParserImpl.java:180) at org.glassfish.json.JsonParserImpl.getObject(JsonParserImpl.java:339) at org.glassfish.json.JsonParserImpl.getObject(JsonParserImpl.java:173) at org.openstreetmap.josm.tools.Territories.initializeExternalData(Territories.java:170) at org.openstreetmap.josm.tools.Territories.initialize(Territories.java:123) at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33) at org.openstreetmap.josm.spi.lifecycle.Lifecycle.runInitializationTasks(Lifecycle.java:99) at org.openstreetmap.josm.spi.lifecycle.Lifecycle.initialize(Lifecycle.java:71) at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:903) at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:276) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:703)
Attachments (4)
Change History (68)
comment:1 Changed 3 years ago by
comment:4 Changed 3 years ago by
Summary: | Non expected exception → JsonParsingException: Invalid token=EOF |
---|
comment:6 Changed 3 years ago by
Maybe an invalid file at Geofabrik? I see this error with the same stack trace:
2020-02-26 08:15:04.831 FINE: Contacting Server... 2020-02-26 08:15:05.083 INFO: GET https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json -> HTTP/1.1 200 (252 ms; 49 B) 2020-02-26 08:15:05.084 FINE: RESPONSE: {Keep-Alive=[timeout=5, max=100], null=[HTTP/1.1 200 OK], Server=[Apache/2.4.29 (Ubuntu)], Connection=[Keep-Alive], Last-Modified=[Wed, 26 Feb 2020 04:55:02 GMT], Date=[Wed, 26 Feb 2020 07:15:06 GMT], Accept-Ranges=[bytes], Strict-Transport-Security=[max-age=16070400; includeSubDomains], ETag=["31-59f73683ea4ad"], Content-Length=[49], Age=[7927], X-Clacks-Overhead=[GNU Terry Pratchett], Content-Type=[application/json]} 2020-02-26 08:15:05.084 FINE: Downloading data... 2020-02-26 08:15:12.405 SEVERE: Handled by bug report queue: javax.json.stream.JsonParsingException: Invalid token=EOF at (line no=3, column no=49, offset=97). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL, SQUARECLOSE] javax.json.stream.JsonParsingException: Invalid token=EOF at (line no=3, column no=49, offset=97). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL, SQUARECLOSE]
Changed 3 years ago by
file found in cache
comment:7 Changed 3 years ago by
Keywords: | taginfo added |
---|---|
Priority: | normal → blocker |
comment:9 Changed 3 years ago by
Some more information on this problem:
I installed JDK for the first time on this computer.
JOSM was also installed for the first time on this computer.
Both were the latest versions.
Error message.
I tried to run JOSM with the JDK, but it didn't work.
Deinstalled everything and installed JRE and JOSM again.
Same problem.
Deinstalled JOSM.
Tried an older version of JOSM. Same problem.
Changed 3 years ago by
possible replacement for the corrupted file in cache to make JOSM work.
comment:12 Changed 3 years ago by
@Dirk: Don't know how a .json should look like but the attached file is accepted by JOSM. Maybe serve this until we have a better version?
comment:13 Changed 3 years ago by
The location of the file GerdP linked above is "/home/..../.cache/JOSM/" on Linux.
Changed 3 years ago by
Attachment: | 18772.patch added |
---|
comment:14 Changed 3 years ago by
With the attached patch JOSM startup continues instead of waiting forever but the bug report popup is still shown, so it's not a fix, more a work around.
comment:16 Changed 3 years ago by
JOSM should start with a notice that this file is corrupt, not with a bug report. :-)
comment:21 Changed 3 years ago by
it was reported on Telegram by Branko Kokanović that downloading https://josm.openstreetmap.de/download/josm-snapshot-15871.jar and running it works
comment:22 follow-up: 44 Changed 3 years ago by
Temporary serve Gerd's fix so we don't get more and more reports, see also #18302.
comment:23 Changed 3 years ago by
Please do a checkin when you think that works fine. I'll release a hotfix then.
comment:25 follow-up: 31 Changed 3 years ago by
Is there a way to tell JOSM that the cached file should be updated?
comment:31 Changed 3 years ago by
Replying to GerdP:
Is there a way to tell JOSM that the cached file should be updated?
None that I'm aware of.
comment:36 follow-up: 50 Changed 3 years ago by
They are creating tickets faster than I can close them :-)
comment:38 follow-up: 40 Changed 3 years ago by
The file that is now served is also not ok. It contains html.
comment:39 Changed 3 years ago by
Content of my work around file looks like this
{ "type": "FeatureCollection", "features": [] }
I've just added the missing closing brackets.
comment:40 Changed 3 years ago by
Replying to GerdP:
The file that is now served is also not ok. It contains html.
Ahhhh. Took the wiki display, not the raw file. Fixed.
comment:42 follow-up: 43 Changed 3 years ago by
Ticket #18793 has been marked as a duplicate of this ticket.
comment:43 Changed 3 years ago by
comment:44 Changed 3 years ago by
comment:45 follow-up: 46 Changed 3 years ago by
Users should stop JOSM, remove the bad version of file mirror_https___josm.openstreetmap.de_remote_geofabrik-index-v1-nogeom.json
in the cache directory and start JOSM again. The correct file is needed for the local taginfo instances and is > 400.000 bytes in size.
comment:46 follow-up: 48 Changed 3 years ago by
Replying to GerdP:
Users should stop JOSM, remove the bad version of file
mirror_https___josm.openstreetmap.de_remote_geofabrik-index-v1-nogeom.json
in the cache directory and start JOSM again. The correct file is needed for the local taginfo instances and is > 400.000 bytes in size.
If it starts with the broken file there is no problem. Without this file, the links to national taginfo instances aren't displayed until the next time the file is fetched. That's no big issue in my eyes.
comment:48 Changed 3 years ago by
Replying to stoecker:
If it starts with the broken file there is no problem. Without this file, the links to national taginfo instances aren't displayed until the next time the file is fetched. That's no big issue in my eyes.
Yes, no problem as users can work. OTOH itis a new feature and it might not work for the next 7 days if I understand the comments in CachedFile
correctly. So, my hint was for those who are interested in this new feature.
comment:49 Changed 3 years ago by
Milestone: | → 20.02 |
---|
comment:50 Changed 3 years ago by
Replying to stoecker:
They are creating tickets faster than I can close them :-)
And we have a nice example of a ticket of priority blocker :-)
comment:52 Changed 3 years ago by
Keywords: | json geofabrik added |
---|
comment:53 Changed 3 years ago by
@Gerd: I would change the translated string from:
tr("Failed to parse taginfo data geofabrik-index-v1-nogeom.json")
to:
tr("Failed to parse taginfo external data: {0}", "geofabrik-index-v1-nogeom.json")
This way we can keep the translation if the filename changes, or if we add more external sources.
comment:54 Changed 3 years ago by
Yes, looks good. I just tried to find a quick fix without even knowing what the file contains normally.
I assume that there may be other possible exceptions as well.
Maybe we can setup a test on the JOSM server (or maybe at Geofabrik) to make sure that the file is valid?
comment:60 Changed 3 years ago by
Seems we have a problem again:
2020-03-02 11:26:34.832 WARNING: Failed to parse external taginfo data at https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json: Invalid token=EOF at (line no=6119, column no=2252, offset=359085). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL]
comment:61 Changed 3 years ago by
Downloaded file mirror_https___josm.openstreetmap.de_remote_geofabrik-index-v1-nogeom.json
is truncated.
comment:63 Changed 3 years ago by
Description: | modified (diff) |
---|
Ticket #18773 has been marked as a duplicate of this ticket.