Bad index prompt

ODeeKers,
I've gotten an error i've never seen before, and I'm a little stumped on sorting it out.
I'm installing ODK Survey on about 500 phones for a malaria survey in Zambia.

The set up of the phones and the survey is pretty well tested. It works on almost every phone, but I have this one phone (like all the others, it is a Jiayu G3 running Android 4.2.2) that gives an error "Bad Prompt Index".

You can open ODK Survey, but when you go to load one of the surveys it gives you the "please wait..." message, followed closely by a pop-up reading "Bad Prompt Index"

It will produce this error on either of the loaded surveys.

This set up works on other identical phones, I have tried to copy over the entire working /sdcard/opendatakit/ folder from a working phone to this phone, and I can't seem to make it go away.

Any ideas on the cause of this strange error?

~From Zambia

Be sure it is running the same version of ODK Collect. (what version of
ODK Collect are you running?)

It sounds like that one phone may have an older/different version (if you
are downloading from Google Play Store, different devices can get updates
at different times)

Note that ODK Collect uses the /sdcard/odk directory (not
/sdcard/opendatakit)

You might also try deleting the .cache ( /sdcard/odk/.cache ) directory
(this forces the rescanning of the XML files to re-construct a
faster-loading form definition, so it will slow down the very first access
to your forms)

··· On Sat, Jan 31, 2015 at 12:05 AM, wrote:

ODeeKers,
I've gotten an error i've never seen before, and I'm a little stumped on
sorting it out.
I'm installing ODK Survey on about 500 phones for a malaria survey in
Zambia.

The set up of the phones and the survey is pretty well tested. It works on
almost every phone, but I have this one phone (like all the others, it is a
Jiayu G3 running Android 4.2.2) that gives an error "Bad Prompt Index".

You can open ODK Survey, but when you go to load one of the surveys it
gives you the "please wait..." message, followed closely by a pop-up
reading "Bad Prompt Index"

It will produce this error on either of the loaded surveys.

This set up works on other identical phones, I have tried to copy over the
entire working /sdcard/opendatakit/ folder from a working phone to this
phone, and I can't seem to make it go away.

Any ideas on the cause of this strange error?

~From Zambia

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

I am also getting exactly this error on loading a form in ODK Survey and can't find any other reference to this error anywhere. Can anyone assist by suggesting why this might occur and how to fix it.

I have two very similar forms, one loads perfectly well, and the other gives this error

Thanks in advance

Please use the correct names for things.

ODK Collect is the release 1.x tool.
ODK Survey is the not-yet-released 2.0 tool.

I assume you are talking about ODK Collect.

Are the two devices running the same version of ODK Collect?

Are the two devices running the same Android OS?

Are the two devices the same make/model?

Cheaper devices with smaller and lower-resolution screens may not be able
to load the larger forms that more expensive, higher-resolution, tablets
can load.

See steps for clearing the .cache directory in the earlier e-mail.

This error can occur after upgrading to a newer version of ODK Collect.

The .cache folder contains compressed binary representations of the form
definitions on the device. Upon first opening a form after an upgrade, if
the binary representation has changed, the loader may fail with this error.
In nearly all cases, this triggers a silent reloading of the XML file and
overwriting of the binary representation.

If that doesn't occur, deleting the .cache folder will resolve the issue.

··· On Wed, Dec 9, 2015 at 1:52 AM, wrote:

I am also getting exactly this error on loading a form in ODK Survey and
can't find any other reference to this error anywhere. Can anyone assist by
suggesting why this might occur and how to fix it.

I have two very similar forms, one loads perfectly well, and the other
gives this error

Thanks in advance

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

If you are using the 2.0 ODK Survey tool, then I've typically seen the bad
prompt index error if the database table that is being used to store the
form data is not consistent with the form. One way that this could happen
is if you have edited your xlsx file to contain an additional prompt that
would add a column to the database table, but the database has not been
recreated with the appropriate fields. If you are on rev 126, you should
be able to delete the /sdcard/opendatakit/survey/metadata directory and
this should create the necessary tables with the correct number of
columns. You will have to close Survey before doing this to make sure that
the directory can be successfully deleted.
If this does not work and you are using the 2.0 ODK Survey tool, feel free
to attach the problematic form as this will make troubleshooting easier.

Clarice

··· On Wed, Dec 9, 2015 at 1:52 AM, wrote:

I am also getting exactly this error on loading a form in ODK Survey and
can't find any other reference to this error anywhere. Can anyone assist by
suggesting why this might occur and how to fix it.

I have two very similar forms, one loads perfectly well, and the other
gives this error

Thanks in advance

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks very much for your assistance. I am using the ODK Survey, not yet
released beta on a single device. I resolved the problem in the manner
similar to that Clarice suggested, by deleting the sdcard/opendatakit
directory and pushing my tables back to the device
Paul

··· On Wed, Dec 9, 2015 at 8:49 PM, clarice larson wrote:

If you are using the 2.0 ODK Survey tool, then I've typically seen the bad
prompt index error if the database table that is being used to store the
form data is not consistent with the form. One way that this could happen
is if you have edited your xlsx file to contain an additional prompt that
would add a column to the database table, but the database has not been
recreated with the appropriate fields. If you are on rev 126, you should
be able to delete the /sdcard/opendatakit/survey/metadata directory and
this should create the necessary tables with the correct number of
columns. You will have to close Survey before doing this to make sure that
the directory can be successfully deleted.
If this does not work and you are using the 2.0 ODK Survey tool, feel free
to attach the problematic form as this will make troubleshooting easier.

Clarice

On Wed, Dec 9, 2015 at 1:52 AM, paulstorry@gmail.com wrote:

I am also getting exactly this error on loading a form in ODK Survey and
can't find any other reference to this error anywhere. Can anyone assist by
suggesting why this might occur and how to fix it.

I have two very similar forms, one loads perfectly well, and the other
gives this error

Thanks in advance

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit-developers/AOSNy7Fbzu0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.