When debugging xforms, download results now shows 'Failure'

1. What is the problem? Be very detailed.
'Failure' shown instead of an actual error message. Previously a more detailed error message appeared, which really helped for debugging purposes.

2. What app or server are you using and on what device and operating system? Include version numbers.

Android Marshmallow.

3. What you have you tried to fix the problem?
Nothing I can do, I'm afraid.

4. What steps can we take to reproduce the problem?
Please allow detailed error messages again. This has really slowed down my work.

Thank you.
Kind regards,
JD

Hi @J_D1

could you be a bit more specific because it's not clear what your issue is. Please describe what your are doing and what failures you get. If it's possible please attach your form as well.

The problem is the fix for issue #4064 (Show friendlier errors on form download failure).
Before this fix an error message appeared, (i.e. an error linking the instance with the body, etc.).
However, this fix, to me anyway, does not give a 'Friendlier' error message. I would rather see what the actual error is.

@seadowg should know more about that change so maybe he can share some thought?

@J_D1sorry you're running into problems debugging your form. Would you be able to share the form you're working with?

How are you designing and working on your form? Are you using an .xlsx and then using XLSForm Online or pyxform to create the XForm or are you editing an XForm directly?

Sorry, our company does not allow us to share code outside of the company.

To clarify this happens with any .xml form, not just a single form.
We are creating the xml manually, with the help of Twig.

Before v1.28 was released, if an error occurred between the bind, instance or body, ODK would show the error. However, now it only shows 'Failure'. This is not helpful for debugging forms that are written manually. Is it possible to reverse this change?

Thanks,
JD

Could you detail the steps you take within Collect that get you to the message? How do you get the form onto the device and then what sequence of screens are you going through?

We're definitely looking to improve the error messages that people see. I'd like to get a better sense of the kind of error you're seeing (given we're unable to look at the form). If you're not using XLSForm Online or pyxform in your workflow are you using a tool like ODK Validate? If not are you able to try it and see if this also gives you an error?

Hi @seadowg,

Could you detail the steps you take within Collect that get you to the message? How do you get the form onto the device and then what sequence of screens are you going through?

We create the xml forms with the help of Twig. Twig allows us to pre-populate fields that we want to send down to our on-site engineers (so that they don't have fill out information that we already have in the db). Twig also allows us to 'import' blocks of code, keeping the code tidy, as we can change one block of the xml without affecting the rest of the form. The forms are created and populated on our server and sent down to the engineers phones.

I've just tried using Validate (only just heard of it today) and because of the {{ }} in Twig, the validation fails, even with forms that work in ODK.

Could you detail the steps you take within Collect that get you to the message?

The errors typically occur when trying to download a blank form that has an invalid xml (this can be missing tags, definitions in the body that are not defined in the instance, etc.), I cannot recall all the error messaged we use to get, as I've only seen the 'Failure' messages for the last couple of months. I assume the messages will be the same as the messages presented on 'Validate'.

Hope this helps.

Kind regards,
JD

Ah right. Generally we've tried to optimize errors and behaviour in Collect for data collectors rather than form designers/creators.

I'm guessing you're using a custom server? Central validates forms on upload (using pyxform behind the scenes). We for sure want to look at improving the error messages in Collect but I'd strongly recommend trying to integrate either pyxform or Validate into your server's workflow to catch problems in forms before they hit Collect.