Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last-saved file can sometimes result in InvalidStructureException #6358

Open
lognaturel opened this issue Aug 20, 2024 · 0 comments
Open

last-saved file can sometimes result in InvalidStructureException #6358

lognaturel opened this issue Aug 20, 2024 · 0 comments

Comments

@lognaturel
Copy link
Member

lognaturel commented Aug 20, 2024

Crashlytics (requires auth), reported happening many times by user on branded fork but only after making ~90 successful submissions

ODK Collect version

v2024.2.1

Android version

12

Device used

Tecno Transsion

Problem description

When users try to open a form with last-saved, they get the following in an error dialog:

Fatal Exception: org.javarosa.xform.parse.XFormParseException
Unable to parse external secondary instance: org.javarosa.xml.util.InvalidStructureException: Invalid XML Structure(END_DOCUMENT null@1:1167 in java.io.InputStreamReader@e3d0d3): Exception while trying to parse an XML Tree, got something other than tags and text Problem found at nodeset: /html/head/model[@xforms-version=1.0.0]/instance With element <instance id="__last-saved" src="jr://instance/last-saved"/> 

The Crashlytics event is from doing a bulk finalize. I wonder whether maybe the one on form open is not logged.

Steps to reproduce the problem

I can reproduce by manually changing the last-saved.xml file and then I can no longer open the form. I have no idea how that file can become corrupt.

Expected behavior

last-saved file does not get corrupt.

Additional information

I suspect it might have something to do with character encoding or special characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: not ready
Development

No branches or pull requests

1 participant