Issue with Enketo on ODK Central server

Hi all :wave:

A couple of days back, I have installed ODK Central on a Digital Ocean server following with (apparent) success the (great :smiley:) guide in the docs section.

The server runs these versions:
versions:
647569c54f6bbf26ea356eca0d14f7e5d1a89c6b
cddb691e40e84aabff87b9d427e22a50282d6f99 client (v1.1.2)
a33bc6fb3c34fe38894b0e9d0bb404f81da325e6 server (v1.1.1)

The ODK Central dashboard runs great but forms can't be rendered with Enketo.

What I have tried:

  • different forms including simple ones
  • to keep the form as a draft or publish it
  • to create forms via both XML and XLSX upload
  • Firefox and Safari browsers

The error message (attached screenshot) is that the string did not match the expected pattern. An example would be https://test.acornodk.net/-/preview/oSktmbk754DmkPzG9opWlSIqijZJsce for the form https://docs.google.com/spreadsheets/d/1bNZx-CfBtz7AJr7DBBYeKOGKsmH-Bvc9ikUOkWqcHTI/

Any idea on how to make Enketo work?

1 Like

When I load your Enketo link (in current Chrome) I get a different error message:

  • Unexpected token < in JSON at position 0

I downloaded your form file and tested it on my server and it worked, but I am on an older version of Central:

versions:
836112b5bf39de826e1bf141d21db7f7b8d54ecf
 4732f7112a286165241aaf7f971f2c2e38d6bb8a client (v1.0.0)
 e9ffd2c0c3aa1a9475852e1397b8259e2b03165a server (v1.0.3)

EDIT: I updated my Central server, added the form again, and it still works. Although I did get this warning when uploading:

[row : 13] Use the max-pixels parameter to speed up submission sending and save storage space. Learn more: https://xlsform.org/#image

This is on:

versions:
647569c54f6bbf26ea356eca0d14f7e5d1a89c6b
 cddb691e40e84aabff87b9d427e22a50282d6f99 client (v1.1.2)
 a33bc6fb3c34fe38894b0e9d0bb404f81da325e6 server (v1.1.1)

Can you get other survey form files to work in Enketo without issue on your server?

1 Like

Thanks for the details, @Olivier_a and for the troubleshooting, @danbjoseph. @Olivier_a what are your server specs? Do you have more than 1GB of RAM? If not, have you added swap?

If you log into your server backend and type htop (or top if you don't have htop), then try to access an Enketo form, does either your RAM or CPU max out?

Related: Unable to test a form on odk central

Thanks @LN @danbjoseph for your help.

No, I have tried several survey without success.

I have tried with another form. Opening it with Firefox, the error message is like yours (JSON); with Safari, it's still The string did not match the expected pattern. error.

  • Ubuntu Docker 19.03.12 on Ubuntu 20.04
  • 1 vCPUs
  • 1GB / 25GB Disk

I haven't added swap.

The CPU briefly jump to 45% and the RAM can jump to 15%.

I am going to try to reinstall the server again from scratch tomorrow. I will keep you posted.

A suggestion: it would be nice to link in the docs an XLS template that can be used for testing purposes.

I have rebuild the DigitalOcean droplet from scratch and Enketo is now working.

I have no idea of what went wrong on the first attempt.
Thanks @danbjoseph and @LN for helping there! Much appreciated!

3 Likes

That's very strange indeed! Did you add swap this time by any chance? I'm surprised htop didn't show higher resource usage. I verified that with the form you linked to, the JavaScript console showed a 504 Gateway Timeout which we've seen in other contexts where the Enketo transformation doesn't complete quickly. Keep an eye on it and do let us know if you get any other unexpected behavior.

I didn't add swap this time but will keep that possibility in mind once we reach the production stage. I will keep you informed if anything goes funky. So far so good!

1 Like