#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 by , 5 years ago
comment:4 by , 5 years ago
Summary: | Non expected exception → JsonParsingException: Invalid token=EOF |
---|
comment:6 by , 5 years ago
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]
by , 5 years ago
file found in cache
comment:7 by , 5 years ago
Keywords: | taginfo added |
---|---|
Priority: | normal → blocker |
comment:9 by , 5 years ago
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.
by , 5 years ago
possible replacement for the corrupted file in cache to make JOSM work.
comment:12 by , 5 years ago
@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 by , 5 years ago
The location of the file GerdP linked above is "/home/..../.cache/JOSM/" on Linux.
by , 5 years ago
Attachment: | 18772.patch added |
---|
comment:14 by , 5 years ago
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 by , 5 years ago
JOSM should start with a notice that this file is corrupt, not with a bug report. :-)
comment:21 by , 5 years ago
it was reported on Telegram by Branko Kokanović that downloading https://josm.openstreetmap.de/download/josm-snapshot-15871.jar and running it works
follow-up: 44 comment:22 by , 5 years ago
Temporary serve Gerd's fix so we don't get more and more reports, see also #18302.
comment:23 by , 5 years ago
Please do a checkin when you think that works fine. I'll release a hotfix then.
follow-up: 31 comment:25 by , 5 years ago
Is there a way to tell JOSM that the cached file should be updated?
comment:31 by , 5 years ago
Replying to GerdP:
Is there a way to tell JOSM that the cached file should be updated?
None that I'm aware of.
follow-up: 50 comment:36 by , 5 years ago
They are creating tickets faster than I can close them :-)
follow-up: 40 comment:38 by , 5 years ago
The file that is now served is also not ok. It contains html.
comment:39 by , 5 years ago
Content of my work around file looks like this
{ "type": "FeatureCollection", "features": [] }
I've just added the missing closing brackets.
comment:40 by , 5 years ago
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.
follow-up: 43 comment:42 by , 5 years ago
Ticket #18793 has been marked as a duplicate of this ticket.
comment:43 by , 5 years ago
comment:44 by , 5 years ago
follow-up: 46 comment:45 by , 5 years ago
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.
follow-up: 48 comment:46 by , 5 years ago
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 by , 5 years ago
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 by , 5 years ago
Milestone: | → 20.02 |
---|
comment:50 by , 5 years ago
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 by , 5 years ago
Keywords: | json geofabrik added |
---|
comment:53 by , 5 years ago
@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 by , 5 years ago
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 by , 5 years ago
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 by , 5 years ago
Downloaded file mirror_https___josm.openstreetmap.de_remote_geofabrik-index-v1-nogeom.json
is truncated.
comment:63 by , 5 years ago
Description: | modified (diff) |
---|
Ticket #18773 has been marked as a duplicate of this ticket.