ODK Central upload error: A submission already exists with this ID, but with different XML


we have had (in a couple of cases already) a problem when submitting forms from ODK collect 1.30.1 to ODK Central 1.1.2.

The forms should be finalized (and submitted) automatically, but sometimes this does not happen immediately (due to connection), and when the enumerator tries to force the submission, he/she got the error message:

Generic Exception: Error: A submission already exists with this ID, but with different XML. Resubmissions to attach additional multimedia must resubmit an identical xml_submission_file.

It seems to be related to this this post but it has a slightly different error message.

One possible explanation (that I can think of) is that the submission process was somehow interrupted during the upload, so that ODK Central received some metadata, but not the complete form. Is it possible?

Thank you!

Here's what is happening...

The server is successfully receiving the submission, but the mobile gets confused and thinks the submission has failed. This usually happens on very poor connections.

This is usually not a problem because the mobile will eventually retry the failed submission, and once the server confirms receipt, the mobile will mark the submission as successful.

The problem with this campaign seems to be that when the submission fails, data collectors are opening or editing the failed submission.

Once they do that, the data inside the submission on the mobile will not match the data inside the submission on the server, so the server will reject the mobile's submission as invalid.

These are the error messages the data collectors are seeing. The best current fix for this issue is:

  1. Tell the data collectors that if a submission fails with this specific error, they should ignore it. The mobile will retry eventually and all will be well. They should NOT open or edit these failed submissions because it will change the submission and make it very difficult for us to do step #2.

  2. At the end of the campaign, gather all the phones with this problem and make certain that all failed submissions are indeed on the server. In unlikely case that they are not, you can manually upload them at that time.

Thank you @yanokwa, this might be the case (for sure we have already seen that connection in some cases is poor).
What I am not sure (but I will check from our side) is whether the enumerators can edit the form (completed, but not submitted), even if the QR code setting are thought to mark forms as finalized automatically.

Thanks again.

As long as forms are not sent, they can be edited. To fix the issue that you've run into, we'll likely change this behavior to prevent editing once a submission has been attempted. The issue has been filed at https://github.com/getodk/collect/issues/4589 and is under consideration.