Modify

Opened 11 years ago

Closed 8 years ago

Last modified 8 years ago

#9167 closed defect (duplicate)

Problem with revert and deleted objects

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

I am sorry if this report is a little vague or lacks information, but it's already the second time that I see this problem:

I start reverting some changesets (with the reverter plugins), fix the conflicts and verify that everything is OK. Then click to upload the changeset and JOSM gives an error like this:

ResponseCode=412, Error Header=<Precondition failed: Relation with id 147180 cannot be saved due to Way with id 230858215>

I try everything that I can think: download the relation, download the way, undelete them (with the undelete plugin), try to update the modified data, but nothing solves this (it always gives the same error message while trying to upload the data).

Running the "Dataset consistency test" finds some issues (sorry that I didn't copy them).

On the console I can see things like this:

INFO: Deleted member 230,858,215 is used by relation 147,179
INFO: Deleted member 230,858,215 is used by relation 147,180
INFO: Deleted member 230,858,215 is used by relation 147,180
INFO: Deleted member 230,858,215 is used by relation 147,181
INFO: GET http://api.openstreetmap.org/api/0.6/user/details
INFO: GET http://api.openstreetmap.org/api/0.6/changesets?user=463507&open=true
PUT http://api.openstreetmap.org/api/0.6/changeset/18235457/close... INFO: OK
PUT http://api.openstreetmap.org/api/0.6/changeset/create... INFO: OK
POST http://api.openstreetmap.org/api/0.6/changeset/18235855/upload... INFO: Precondition Failed
ERROR: Error header: Precondition failed: Relation with id 147179 cannot be saved due to Way with id 134107343
WARNING: Error header "Precondition failed: Relation with id 147179 cannot be saved due to Way with id 134107343" did not match with an expected pattern
org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Relation with id 147179 cannot be saved due to Way with id 134107343>
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:701)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:571)
	at org.openstreetmap.josm.io.OsmApi.uploadDiff(OsmApi.java:519)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesInChunks(OsmServerWriter.java:172)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:214)
	at org.openstreetmap.josm.gui.io.UploadPrimitivesTask.realRun(UploadPrimitivesTask.java:249)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
INFO: GET http://api.openstreetmap.org/api/0.6/ways?ways=134107343
INFO: GET http://api.openstreetmap.org/api/0.6/way/134107343/relations
INFO: Undeleting [way 134107343]
INFO: GET http://api.openstreetmap.org/api/0.6/way/134107343/history
PUT http://api.openstreetmap.org/api/0.6/changeset/18235855... INFO: OK
POST http://api.openstreetmap.org/api/0.6/changeset/18235855/upload... INFO: Precondition Failed
ERROR: Error header: Precondition failed: Relation with id 147179 cannot be saved due to Way with id 134107343
WARNING: Error header "Precondition failed: Relation with id 147179 cannot be saved due to Way with id 134107343" did not match with an expected pattern
org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Relation with id 147179 cannot be saved due to Way with id 134107343>
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:701)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:571)
	at org.openstreetmap.josm.io.OsmApi.uploadDiff(OsmApi.java:519)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesInChunks(OsmServerWriter.java:172)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:214)
	at org.openstreetmap.josm.gui.io.UploadPrimitivesTask.realRun(UploadPrimitivesTask.java:249)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)

It's also possible to see that after trying to update the modified data it gives a very strange conflict: everything is green and it's not possible to change or select anything on the conflict screen. It's possible to give an OK. It dissapear from the conflict list but doesn't change anything on the data.

Updating the data again and the "empty" conflict reappears.

But the strange thing that makes me believe that it's something (internally) wrong with JOSM: if I save the data (an OSM file), close JOSM and open this file again, the error magically disappears (and JOSM nicely uploads the changeset).

JOSM is:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-10-07 01:35:18
Last Changed Author: Don-vip
Revision: 6311
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-10-07 01:49:19 +0200 (Mon, 07 Oct 2013)
Last Changed Rev: 6311

Identification: JOSM/1.5 (6311 en) Linux Debian GNU/Linux testing (jessie)
Memory Usage: 238 MB / 1667 MB (164 MB allocated, but free)
Java version: 1.7.0_21, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u21-2.3.9-5
VM arguments: [-Djava.net.useSystemProxies=true, -Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugin: Create_grid_of_ways (29854)
Plugin: OpeningHoursEditor (29854)
Plugin: PicLayer (29854)
Plugin: SimplifyArea (29854)
Plugin: buildings_tools (29854)
Plugin: contourmerge (1007)
Plugin: editgpx (29854)
Plugin: geotools (29767)
Plugin: jts (29854)
Plugin: log4j (29853)
Plugin: merge-overlap (29854)
Plugin: opendata (29938)
Plugin: pdfimport (29913)
Plugin: reverter (30008)
Plugin: scripting (30540)
Plugin: turnrestrictions (29854)
Plugin: undelete (29854)
Plugin: utilsplugin2 (30002)

Attachments (0)

Change History (2)

in reply to:  description comment:1 by skyper, 11 years ago

Replying to naoliv@…:

I am sorry if this report is a little vague or lacks information, but it's already the second time that I see this problem:

I start reverting some changesets (with the reverter plugins), fix the conflicts and verify that everything is OK. Then click to upload the changeset and JOSM gives an error like this:

ResponseCode=412, Error Header=<Precondition failed: Relation with id 147180 cannot be saved due to Way with id 230858215>

I try everything that I can think: download the relation, download the way, undelete them (with the undelete plugin), try to update the modified data, but nothing solves this (it always gives the same error message while trying to upload the data).

I had luck by downloading last valid version of these objects with "open location". But I did not try last nights updated version that much.

Similar to #8085

Last edited 11 years ago by skyper (previous) (diff)

comment:2 by skyper, 8 years ago

Resolution: duplicate
Status: newclosed

Closed as duplicate of #11010.
This is a problem of upload order. You can solve it by first uploading all modified nodes, then ways and last relations. Works at best if you keep the changeset open after upload in order to upload all changes in one changeset.

Last edited 8 years ago by skyper (previous) (diff)

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.