Sanity Check Failed Error

Dear All,
I have a rather long form , and while training enumerators a number of
them saved their forms for their tea break. On coming back and
choosing to Edit Saved Form, they all get the same error "Sanity Check
Failed".

Does anyone have any idea what that could mean?

The same form also produced a different error this morning when people
tried to open forms they saved yesterday by going to Edit Saved Form,
they got the error "java.lang.Integer cannot be cast to
org.javarosa.core.model.data.helper.Selection".

Also not sure what that could mean.

Are there any user friendly ways to debug ODK forms, as some of the
errors are so vague that it sometimes feels like looking for a needle
in a haystack :-(. It may be that I am missing some debugging tricks?

Thanks in advance,
Tumaini

"Sanity Check Failed" typically means that the form definition has
changed. I.e., that the phones have received an updated form with the same
form Id and version, and that the new form definition has additional
questions than the earlier version, or perhaps has fewer questions.

When you go to edit a saved filled-in form based upon that form definition,
the labels and valued don't match -- they fail the sanity check.

In this case, given the other warning, it may be that an integer field was
changed to a select list.

Whenever you update a form definition, you should always change the form id
or version so that it is treated as a new form.

Mitch

··· On Fri, Apr 27, 2012 at 1:21 AM, Tumaini Kilimba wrote:

Dear All,
I have a rather long form , and while training enumerators a number of
them saved their forms for their tea break. On coming back and
choosing to Edit Saved Form, they all get the same error "Sanity Check
Failed".

Does anyone have any idea what that could mean?

The same form also produced a different error this morning when people
tried to open forms they saved yesterday by going to Edit Saved Form,
they got the error "java.lang.Integer cannot be cast to
org.javarosa.core.model.data.helper.Selection".

Also not sure what that could mean.

Are there any user friendly ways to debug ODK forms, as some of the
errors are so vague that it sometimes feels like looking for a needle
in a haystack :-(. It may be that I am missing some debugging tricks?

Thanks in advance,
Tumaini

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Ok thanks for the tip

··· On Apr 27, 8:09 pm, Mitch S wrote: > "Sanity Check Failed" typically means that the form definition has > changed. I.e., that the phones have received an updated form with the same > form Id and version, and that the new form definition has additional > questions than the earlier version, or perhaps has fewer questions. > > When you go to edit a saved filled-in form based upon that form definition, > the labels and valued don't match -- they fail the sanity check. > > In this case, given the other warning, it may be that an integer field was > changed to a select list. > > Whenever you update a form definition, you should always change the form id > or version so that it is treated as a new form. > > Mitch > > > > > > > > > > On Fri, Apr 27, 2012 at 1:21 AM, Tumaini Kilimba wrote: > > Dear All, > > I have a rather long form , and while training enumerators a number of > > them saved their forms for their tea break. On coming back and > > choosing to Edit Saved Form, they all get the same error "Sanity Check > > Failed". > > > Does anyone have any idea what that could mean? > > > The same form also produced a different error this morning when people > > tried to open forms they saved yesterday by going to Edit Saved Form, > > they got the error "java.lang.Integer cannot be cast to > > org.javarosa.core.model.data.helper.Selection". > > > Also not sure what that could mean. > > > Are there any user friendly ways to debug ODK forms, as some of the > > errors are so vague that it sometimes feels like looking for a needle > > in a haystack :-(. It may be that I am missing some debugging tricks? > > > Thanks in advance, > > Tumaini > > > -- > > Post: opendatakit@googlegroups.com > > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > > Options:http://groups.google.com/group/opendatakit?hl=en > > -- > Mitch Sundt > Software Engineer > University of Washington > mitchellsu...@gmail.com

Whats the common method of debugging ODK forms? I normally write the
form, transfer it via USB from my computer to the /odk/forms folder on
my device and try out the form, only to find an unhelpfull error
message which does not point me to any solution. Am sure I must be
missing something, how do others simplify the debugging process? I
happen to have a form which is just over 4000 lines of XML and it can
be extremely frustrating when the error messages are vague.

Thanks in advance,
Tumaini

··· On Apr 27, 8:09 pm, Mitch S wrote: > "Sanity Check Failed" typically means that the form definition has > changed. I.e., that the phones have received an updated form with the same > form Id and version, and that the new form definition has additional > questions than the earlier version, or perhaps has fewer questions. > > When you go to edit a saved filled-in form based upon that form definition, > the labels and valued don't match -- they fail the sanity check. > > In this case, given the other warning, it may be that an integer field was > changed to a select list. > > Whenever you update a form definition, you should always change the form id > or version so that it is treated as a new form. > > Mitch > > > > > > > > > > On Fri, Apr 27, 2012 at 1:21 AM, Tumaini Kilimba wrote: > > Dear All, > > I have a rather long form , and while training enumerators a number of > > them saved their forms for their tea break. On coming back and > > choosing to Edit Saved Form, they all get the same error "Sanity Check > > Failed". > > > Does anyone have any idea what that could mean? > > > The same form also produced a different error this morning when people > > tried to open forms they saved yesterday by going to Edit Saved Form, > > they got the error "java.lang.Integer cannot be cast to > > org.javarosa.core.model.data.helper.Selection". > > > Also not sure what that could mean. > > > Are there any user friendly ways to debug ODK forms, as some of the > > errors are so vague that it sometimes feels like looking for a needle > > in a haystack :-(. It may be that I am missing some debugging tricks? > > > Thanks in advance, > > Tumaini > > > -- > > Post: opendatakit@googlegroups.com > > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > > Options:http://groups.google.com/group/opendatakit?hl=en > > -- > Mitch Sundt > Software Engineer > University of Washington > mitchellsu...@gmail.com

Hello Mitch,
I followed your advice and changed both the form id AND version. I then
copied the forms into 20 or so devices, enumerators went out into the field
with them, and after filling out some forms when they attempted to Edit
Saved Form, they still got the "Sanity Check Failed" error... What could
be the problem?

Thanks again,
Tumaini

··· On Fri, Apr 27, 2012 at 8:09 PM, Mitch S wrote:

"Sanity Check Failed" typically means that the form definition has
changed. I.e., that the phones have received an updated form with the same
form Id and version, and that the new form definition has additional
questions than the earlier version, or perhaps has fewer questions.

When you go to edit a saved filled-in form based upon that form
definition, the labels and valued don't match -- they fail the sanity check.

In this case, given the other warning, it may be that an integer field was
changed to a select list.

Whenever you update a form definition, you should always change the form
id or version so that it is treated as a new form.

Mitch

On Fri, Apr 27, 2012 at 1:21 AM, Tumaini Kilimba tkilimba@ihi.or.tzwrote:

Dear All,
I have a rather long form , and while training enumerators a number of
them saved their forms for their tea break. On coming back and
choosing to Edit Saved Form, they all get the same error "Sanity Check
Failed".

Does anyone have any idea what that could mean?

The same form also produced a different error this morning when people
tried to open forms they saved yesterday by going to Edit Saved Form,
they got the error "java.lang.Integer cannot be cast to
org.javarosa.core.model.data.helper.Selection".

Also not sure what that could mean.

Are there any user friendly ways to debug ODK forms, as some of the
errors are so vague that it sometimes feels like looking for a needle
in a haystack :-(. It may be that I am missing some debugging tricks?

Thanks in advance,
Tumaini

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

For really large forms, I tend to split them into individual sections
that I can test (or comment out if buggy). I use a text editor that
makes sure I'm writing standards compliant XML. I also use ODK
Validate as I'm designing the form to catch syntax errors.

As far as runtime errors, there isn't really a great way to do that.
In ODK Collect (and ODK Validate), if we know what line in the form
caused the error, we try to report it. That said, there are lots of
corner cases that we can't catch -- XForms are complex.

··· On Fri, Apr 27, 2012 at 17:06, Tumaini Kilimba wrote: > Whats the common method of debugging ODK forms? I normally write the > form, transfer it via USB from my computer to the /odk/forms folder on > my device and try out the form, only to find an unhelpfull error > message which does not point me to any solution. Am sure I must be > missing something, how do others simplify the debugging process? I > happen to have a form which is just over 4000 lines of XML and it can > be extremely frustrating when the error messages are vague. > > Thanks in advance, > Tumaini > > On Apr 27, 8:09 pm, Mitch S wrote: >> "Sanity Check Failed" typically means that the form definition has >> changed. I.e., that the phones have received an updated form with the same >> form Id and version, and that the new form definition has additional >> questions than the earlier version, or perhaps has fewer questions. >> >> When you go to edit a saved filled-in form based upon that form definition, >> the labels and valued don't match -- they fail the sanity check. >> >> In this case, given the other warning, it may be that an integer field was >> changed to a select list. >> >> Whenever you update a form definition, you should always change the form id >> or version so that it is treated as a new form. >> >> Mitch >> >> >> >> >> >> >> >> >> >> On Fri, Apr 27, 2012 at 1:21 AM, Tumaini Kilimba wrote: >> > Dear All, >> > I have a rather long form , and while training enumerators a number of >> > them saved their forms for their tea break. On coming back and >> > choosing to Edit Saved Form, they all get the same error "Sanity Check >> > Failed". >> >> > Does anyone have any idea what that could mean? >> >> > The same form also produced a different error this morning when people >> > tried to open forms they saved yesterday by going to Edit Saved Form, >> > they got the error "java.lang.Integer cannot be cast to >> > org.javarosa.core.model.data.helper.Selection". >> >> > Also not sure what that could mean. >> >> > Are there any user friendly ways to debug ODK forms, as some of the >> > errors are so vague that it sometimes feels like looking for a needle >> > in a haystack :-(. It may be that I am missing some debugging tricks? >> >> > Thanks in advance, >> > Tumaini >> >> > -- >> > Post: opendatakit@googlegroups.com >> > Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> > Options:http://groups.google.com/group/opendatakit?hl=en >> >> -- >> Mitch Sundt >> Software Engineer >> University of Washington >> mitchellsu...@gmail.com > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en

If you have a phone that exhibits this behavior, if you are OK with me
seeing the answers in one of your problematic saved forms, then if you
could zip up the entire /sdcard/odk directory and send that to me (
mitchellsundt@gmail.com ) I will take a look at it. To minimize the extra
data in the zip, first delete any filled-in forms that are OK.

Note that you need to zip up the entire /sdcard/odk directory -- don't
pick-and-choose what to zip up. I need to have the entire contents of the
/sdcard/odk/metadata and /sdcard/odk/.cache directories, in addition to the
forms and instances directories.

To zip up a folder, after mounting it on your PC, you can right-click,
choose "Send To", and select "Compressed (zipped) folder" Mail that zip
directly to me ( mitchellsundt@gmail.com ) so as not to spam the list with
a large file.

I assume you are using ODK Collect 1.1.7.

What Android version are you using (shown on the Settings / About Phone
menu ).

Mitch

··· On Thu, May 3, 2012 at 2:55 AM, Tumaini Kilimba wrote:

Hello Mitch,
I followed your advice and changed both the form id AND version. I then
copied the forms into 20 or so devices, enumerators went out into the field
with them, and after filling out some forms when they attempted to Edit
Saved Form, they still got the "Sanity Check Failed" error... What could
be the problem?

Thanks again,
Tumaini

On Fri, Apr 27, 2012 at 8:09 PM, Mitch S mitchellsundt@gmail.com wrote:

"Sanity Check Failed" typically means that the form definition has
changed. I.e., that the phones have received an updated form with the same
form Id and version, and that the new form definition has additional
questions than the earlier version, or perhaps has fewer questions.

When you go to edit a saved filled-in form based upon that form
definition, the labels and valued don't match -- they fail the sanity check.

In this case, given the other warning, it may be that an integer field
was changed to a select list.

Whenever you update a form definition, you should always change the form
id or version so that it is treated as a new form.

Mitch

On Fri, Apr 27, 2012 at 1:21 AM, Tumaini Kilimba tkilimba@ihi.or.tzwrote:

Dear All,
I have a rather long form , and while training enumerators a number of
them saved their forms for their tea break. On coming back and
choosing to Edit Saved Form, they all get the same error "Sanity Check
Failed".

Does anyone have any idea what that could mean?

The same form also produced a different error this morning when people
tried to open forms they saved yesterday by going to Edit Saved Form,
they got the error "java.lang.Integer cannot be cast to
org.javarosa.core.model.data.helper.Selection".

Also not sure what that could mean.

Are there any user friendly ways to debug ODK forms, as some of the
errors are so vague that it sometimes feels like looking for a needle
in a haystack :-(. It may be that I am missing some debugging tricks?

Thanks in advance,
Tumaini

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com